2 * drivers/s390/net/qeth_l2_main.c
4 * Copyright IBM Corp. 2007, 2009
5 * Author(s): Utz Bacher <utz.bacher@de.ibm.com>,
6 * Frank Pavlic <fpavlic@de.ibm.com>,
7 * Thomas Spatzier <tspat@de.ibm.com>,
8 * Frank Blaschka <frank.blaschka@de.ibm.com>
11 #define KMSG_COMPONENT "qeth"
12 #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
14 #include <linux/module.h>
15 #include <linux/moduleparam.h>
16 #include <linux/string.h>
17 #include <linux/errno.h>
18 #include <linux/kernel.h>
19 #include <linux/slab.h>
20 #include <linux/etherdevice.h>
21 #include <linux/mii.h>
23 #include <linux/list.h>
25 #include "qeth_core.h"
27 static int qeth_l2_set_offline(struct ccwgroup_device
*);
28 static int qeth_l2_stop(struct net_device
*);
29 static int qeth_l2_send_delmac(struct qeth_card
*, __u8
*);
30 static int qeth_l2_send_setdelmac(struct qeth_card
*, __u8
*,
32 int (*reply_cb
) (struct qeth_card
*,
35 static void qeth_l2_set_multicast_list(struct net_device
*);
36 static int qeth_l2_recover(void *);
38 static int qeth_l2_do_ioctl(struct net_device
*dev
, struct ifreq
*rq
, int cmd
)
40 struct qeth_card
*card
= dev
->ml_priv
;
41 struct mii_ioctl_data
*mii_data
;
47 if ((card
->state
!= CARD_STATE_UP
) &&
48 (card
->state
!= CARD_STATE_SOFTSETUP
))
51 if (card
->info
.type
== QETH_CARD_TYPE_OSN
)
55 case SIOC_QETH_ADP_SET_SNMP_CONTROL
:
56 rc
= qeth_snmp_command(card
, rq
->ifr_ifru
.ifru_data
);
58 case SIOC_QETH_GET_CARD_TYPE
:
59 if ((card
->info
.type
== QETH_CARD_TYPE_OSD
||
60 card
->info
.type
== QETH_CARD_TYPE_OSM
||
61 card
->info
.type
== QETH_CARD_TYPE_OSX
) &&
67 mii_data
= if_mii(rq
);
71 mii_data
= if_mii(rq
);
72 if (mii_data
->phy_id
!= 0)
75 mii_data
->val_out
= qeth_mdio_read(dev
,
76 mii_data
->phy_id
, mii_data
->reg_num
);
82 QETH_CARD_TEXT_(card
, 2, "ioce%d", rc
);
86 static int qeth_l2_verify_dev(struct net_device
*dev
)
88 struct qeth_card
*card
;
92 read_lock_irqsave(&qeth_core_card_list
.rwlock
, flags
);
93 list_for_each_entry(card
, &qeth_core_card_list
.list
, list
) {
94 if (card
->dev
== dev
) {
99 read_unlock_irqrestore(&qeth_core_card_list
.rwlock
, flags
);
104 static struct net_device
*qeth_l2_netdev_by_devno(unsigned char *read_dev_no
)
106 struct qeth_card
*card
;
107 struct net_device
*ndev
;
110 struct ccw_dev_id read_devid
;
113 memcpy(&temp_dev_no
, read_dev_no
, 2);
114 read_lock_irqsave(&qeth_core_card_list
.rwlock
, flags
);
115 list_for_each_entry(card
, &qeth_core_card_list
.list
, list
) {
116 ccw_device_get_id(CARD_RDEV(card
), &read_devid
);
117 if (read_devid
.devno
== temp_dev_no
) {
122 read_unlock_irqrestore(&qeth_core_card_list
.rwlock
, flags
);
126 static int qeth_l2_send_setgroupmac_cb(struct qeth_card
*card
,
127 struct qeth_reply
*reply
,
130 struct qeth_ipa_cmd
*cmd
;
133 QETH_CARD_TEXT(card
, 2, "L2Sgmacb");
134 cmd
= (struct qeth_ipa_cmd
*) data
;
135 mac
= &cmd
->data
.setdelmac
.mac
[0];
136 /* MAC already registered, needed in couple/uncouple case */
137 if (cmd
->hdr
.return_code
== IPA_RC_L2_DUP_MAC
) {
138 QETH_DBF_MESSAGE(2, "Group MAC %pM already existing on %s \n",
139 mac
, QETH_CARD_IFNAME(card
));
140 cmd
->hdr
.return_code
= 0;
142 if (cmd
->hdr
.return_code
)
143 QETH_DBF_MESSAGE(2, "Could not set group MAC %pM on %s: %x\n",
144 mac
, QETH_CARD_IFNAME(card
), cmd
->hdr
.return_code
);
148 static int qeth_l2_send_setgroupmac(struct qeth_card
*card
, __u8
*mac
)
150 QETH_CARD_TEXT(card
, 2, "L2Sgmac");
151 return qeth_l2_send_setdelmac(card
, mac
, IPA_CMD_SETGMAC
,
152 qeth_l2_send_setgroupmac_cb
);
155 static int qeth_l2_send_delgroupmac_cb(struct qeth_card
*card
,
156 struct qeth_reply
*reply
,
159 struct qeth_ipa_cmd
*cmd
;
162 QETH_CARD_TEXT(card
, 2, "L2Dgmacb");
163 cmd
= (struct qeth_ipa_cmd
*) data
;
164 mac
= &cmd
->data
.setdelmac
.mac
[0];
165 if (cmd
->hdr
.return_code
)
166 QETH_DBF_MESSAGE(2, "Could not delete group MAC %pM on %s: %x\n",
167 mac
, QETH_CARD_IFNAME(card
), cmd
->hdr
.return_code
);
171 static int qeth_l2_send_delgroupmac(struct qeth_card
*card
, __u8
*mac
)
173 QETH_CARD_TEXT(card
, 2, "L2Dgmac");
174 return qeth_l2_send_setdelmac(card
, mac
, IPA_CMD_DELGMAC
,
175 qeth_l2_send_delgroupmac_cb
);
178 static void qeth_l2_add_mc(struct qeth_card
*card
, __u8
*mac
, int vmac
)
180 struct qeth_mc_mac
*mc
;
183 mc
= kmalloc(sizeof(struct qeth_mc_mac
), GFP_ATOMIC
);
188 memcpy(mc
->mc_addr
, mac
, OSA_ADDR_LEN
);
189 mc
->mc_addrlen
= OSA_ADDR_LEN
;
193 rc
= qeth_l2_send_setdelmac(card
, mac
, IPA_CMD_SETVMAC
,
196 rc
= qeth_l2_send_setgroupmac(card
, mac
);
200 list_add_tail(&mc
->list
, &card
->mc_list
);
205 static void qeth_l2_del_all_mc(struct qeth_card
*card
)
207 struct qeth_mc_mac
*mc
, *tmp
;
209 spin_lock_bh(&card
->mclock
);
210 list_for_each_entry_safe(mc
, tmp
, &card
->mc_list
, list
) {
212 qeth_l2_send_setdelmac(card
, mc
->mc_addr
,
213 IPA_CMD_DELVMAC
, NULL
);
215 qeth_l2_send_delgroupmac(card
, mc
->mc_addr
);
219 spin_unlock_bh(&card
->mclock
);
222 static inline int qeth_l2_get_cast_type(struct qeth_card
*card
,
225 if (card
->info
.type
== QETH_CARD_TYPE_OSN
)
227 if (is_broadcast_ether_addr(skb
->data
))
228 return RTN_BROADCAST
;
229 if (is_multicast_ether_addr(skb
->data
))
230 return RTN_MULTICAST
;
234 static void qeth_l2_fill_header(struct qeth_card
*card
, struct qeth_hdr
*hdr
,
235 struct sk_buff
*skb
, int ipv
, int cast_type
)
237 struct vlan_ethhdr
*veth
= (struct vlan_ethhdr
*)skb_mac_header(skb
);
239 memset(hdr
, 0, sizeof(struct qeth_hdr
));
240 hdr
->hdr
.l2
.id
= QETH_HEADER_TYPE_LAYER2
;
242 /* set byte byte 3 to casting flags */
243 if (cast_type
== RTN_MULTICAST
)
244 hdr
->hdr
.l2
.flags
[2] |= QETH_LAYER2_FLAG_MULTICAST
;
245 else if (cast_type
== RTN_BROADCAST
)
246 hdr
->hdr
.l2
.flags
[2] |= QETH_LAYER2_FLAG_BROADCAST
;
248 hdr
->hdr
.l2
.flags
[2] |= QETH_LAYER2_FLAG_UNICAST
;
250 hdr
->hdr
.l2
.pkt_length
= skb
->len
-QETH_HEADER_SIZE
;
251 /* VSWITCH relies on the VLAN
252 * information to be present in
254 if (veth
->h_vlan_proto
== __constant_htons(ETH_P_8021Q
)) {
255 hdr
->hdr
.l2
.flags
[2] |= QETH_LAYER2_FLAG_VLAN
;
256 hdr
->hdr
.l2
.vlan_id
= ntohs(veth
->h_vlan_TCI
);
260 static int qeth_l2_send_setdelvlan_cb(struct qeth_card
*card
,
261 struct qeth_reply
*reply
, unsigned long data
)
263 struct qeth_ipa_cmd
*cmd
;
265 QETH_CARD_TEXT(card
, 2, "L2sdvcb");
266 cmd
= (struct qeth_ipa_cmd
*) data
;
267 if (cmd
->hdr
.return_code
) {
268 QETH_DBF_MESSAGE(2, "Error in processing VLAN %i on %s: 0x%x. "
269 "Continuing\n", cmd
->data
.setdelvlan
.vlan_id
,
270 QETH_CARD_IFNAME(card
), cmd
->hdr
.return_code
);
271 QETH_CARD_TEXT_(card
, 2, "L2VL%4x", cmd
->hdr
.command
);
272 QETH_CARD_TEXT_(card
, 2, "err%d", cmd
->hdr
.return_code
);
277 static int qeth_l2_send_setdelvlan(struct qeth_card
*card
, __u16 i
,
278 enum qeth_ipa_cmds ipacmd
)
280 struct qeth_ipa_cmd
*cmd
;
281 struct qeth_cmd_buffer
*iob
;
283 QETH_CARD_TEXT_(card
, 4, "L2sdv%x", ipacmd
);
284 iob
= qeth_get_ipacmd_buffer(card
, ipacmd
, QETH_PROT_IPV4
);
285 cmd
= (struct qeth_ipa_cmd
*)(iob
->data
+IPA_PDU_HEADER_SIZE
);
286 cmd
->data
.setdelvlan
.vlan_id
= i
;
287 return qeth_send_ipa_cmd(card
, iob
,
288 qeth_l2_send_setdelvlan_cb
, NULL
);
291 static void qeth_l2_process_vlans(struct qeth_card
*card
, int clear
)
293 struct qeth_vlan_vid
*id
;
294 QETH_CARD_TEXT(card
, 3, "L2prcvln");
295 spin_lock_bh(&card
->vlanlock
);
296 list_for_each_entry(id
, &card
->vid_list
, list
) {
298 qeth_l2_send_setdelvlan(card
, id
->vid
,
301 qeth_l2_send_setdelvlan(card
, id
->vid
,
304 spin_unlock_bh(&card
->vlanlock
);
307 static void qeth_l2_vlan_rx_add_vid(struct net_device
*dev
, unsigned short vid
)
309 struct qeth_card
*card
= dev
->ml_priv
;
310 struct qeth_vlan_vid
*id
;
312 QETH_CARD_TEXT_(card
, 4, "aid:%d", vid
);
315 if (card
->info
.type
== QETH_CARD_TYPE_OSM
) {
316 QETH_CARD_TEXT(card
, 3, "aidOSM");
319 if (qeth_wait_for_threads(card
, QETH_RECOVER_THREAD
)) {
320 QETH_CARD_TEXT(card
, 3, "aidREC");
323 id
= kmalloc(sizeof(struct qeth_vlan_vid
), GFP_ATOMIC
);
326 qeth_l2_send_setdelvlan(card
, vid
, IPA_CMD_SETVLAN
);
327 spin_lock_bh(&card
->vlanlock
);
328 list_add_tail(&id
->list
, &card
->vid_list
);
329 spin_unlock_bh(&card
->vlanlock
);
333 static void qeth_l2_vlan_rx_kill_vid(struct net_device
*dev
, unsigned short vid
)
335 struct qeth_vlan_vid
*id
, *tmpid
= NULL
;
336 struct qeth_card
*card
= dev
->ml_priv
;
338 QETH_CARD_TEXT_(card
, 4, "kid:%d", vid
);
339 if (card
->info
.type
== QETH_CARD_TYPE_OSM
) {
340 QETH_CARD_TEXT(card
, 3, "kidOSM");
343 if (qeth_wait_for_threads(card
, QETH_RECOVER_THREAD
)) {
344 QETH_CARD_TEXT(card
, 3, "kidREC");
347 spin_lock_bh(&card
->vlanlock
);
348 list_for_each_entry(id
, &card
->vid_list
, list
) {
349 if (id
->vid
== vid
) {
355 spin_unlock_bh(&card
->vlanlock
);
357 qeth_l2_send_setdelvlan(card
, vid
, IPA_CMD_DELVLAN
);
360 qeth_l2_set_multicast_list(card
->dev
);
363 static int qeth_l2_stop_card(struct qeth_card
*card
, int recovery_mode
)
367 QETH_DBF_TEXT(SETUP
, 2, "stopcard");
368 QETH_DBF_HEX(SETUP
, 2, &card
, sizeof(void *));
370 qeth_set_allowed_threads(card
, 0, 1);
371 if (card
->read
.state
== CH_STATE_UP
&&
372 card
->write
.state
== CH_STATE_UP
&&
373 (card
->state
== CARD_STATE_UP
)) {
375 card
->info
.type
!= QETH_CARD_TYPE_OSN
) {
376 qeth_l2_stop(card
->dev
);
379 dev_close(card
->dev
);
382 if (!card
->use_hard_stop
||
384 __u8
*mac
= &card
->dev
->dev_addr
[0];
385 rc
= qeth_l2_send_delmac(card
, mac
);
386 QETH_DBF_TEXT_(SETUP
, 2, "Lerr%d", rc
);
388 card
->state
= CARD_STATE_SOFTSETUP
;
390 if (card
->state
== CARD_STATE_SOFTSETUP
) {
391 qeth_l2_process_vlans(card
, 1);
392 if (!card
->use_hard_stop
||
394 qeth_l2_del_all_mc(card
);
395 qeth_clear_ipacmd_list(card
);
396 card
->state
= CARD_STATE_HARDSETUP
;
398 if (card
->state
== CARD_STATE_HARDSETUP
) {
399 qeth_qdio_clear_card(card
, 0);
400 qeth_clear_qdio_buffers(card
);
401 qeth_clear_working_pool_list(card
);
402 card
->state
= CARD_STATE_DOWN
;
404 if (card
->state
== CARD_STATE_DOWN
) {
405 qeth_clear_cmd_buffers(&card
->read
);
406 qeth_clear_cmd_buffers(&card
->write
);
408 card
->use_hard_stop
= 0;
412 static int qeth_l2_process_inbound_buffer(struct qeth_card
*card
,
413 int budget
, int *done
)
417 struct qeth_hdr
*hdr
;
423 skb
= qeth_core_get_next_skb(card
,
424 card
->qdio
.in_q
->bufs
[card
->rx
.b_index
].buffer
,
425 &card
->rx
.b_element
, &card
->rx
.e_offset
, &hdr
);
430 skb
->dev
= card
->dev
;
431 switch (hdr
->hdr
.l2
.id
) {
432 case QETH_HEADER_TYPE_LAYER2
:
433 skb
->pkt_type
= PACKET_HOST
;
434 skb
->protocol
= eth_type_trans(skb
, skb
->dev
);
435 if (card
->options
.checksum_type
== NO_CHECKSUMMING
)
436 skb
->ip_summed
= CHECKSUM_UNNECESSARY
;
438 skb
->ip_summed
= CHECKSUM_NONE
;
439 if (skb
->protocol
== htons(ETH_P_802_2
))
440 *((__u32
*)skb
->cb
) = ++card
->seqno
.pkt_seqno
;
442 netif_receive_skb(skb
);
444 case QETH_HEADER_TYPE_OSN
:
445 if (card
->info
.type
== QETH_CARD_TYPE_OSN
) {
446 skb_push(skb
, sizeof(struct qeth_hdr
));
447 skb_copy_to_linear_data(skb
, hdr
,
448 sizeof(struct qeth_hdr
));
450 card
->osn_info
.data_cb(skb
);
455 dev_kfree_skb_any(skb
);
456 QETH_CARD_TEXT(card
, 3, "inbunkno");
457 QETH_DBF_HEX(CTRL
, 3, hdr
, QETH_DBF_CTRL_LEN
);
462 card
->stats
.rx_packets
++;
463 card
->stats
.rx_bytes
+= len
;
468 static int qeth_l2_poll(struct napi_struct
*napi
, int budget
)
470 struct qeth_card
*card
= container_of(napi
, struct qeth_card
, napi
);
472 struct qeth_qdio_buffer
*buffer
;
474 int new_budget
= budget
;
476 if (card
->options
.performance_stats
) {
477 card
->perf_stats
.inbound_cnt
++;
478 card
->perf_stats
.inbound_start_time
= qeth_get_micros();
482 if (!card
->rx
.b_count
) {
483 card
->rx
.qdio_err
= 0;
484 card
->rx
.b_count
= qdio_get_next_buffers(
485 card
->data
.ccwdev
, 0, &card
->rx
.b_index
,
487 if (card
->rx
.b_count
<= 0) {
488 card
->rx
.b_count
= 0;
492 &card
->qdio
.in_q
->bufs
[card
->rx
.b_index
]
494 card
->rx
.e_offset
= 0;
497 while (card
->rx
.b_count
) {
498 buffer
= &card
->qdio
.in_q
->bufs
[card
->rx
.b_index
];
499 if (!(card
->rx
.qdio_err
&&
500 qeth_check_qdio_errors(card
, buffer
->buffer
,
501 card
->rx
.qdio_err
, "qinerr")))
502 work_done
+= qeth_l2_process_inbound_buffer(
503 card
, new_budget
, &done
);
508 if (card
->options
.performance_stats
)
509 card
->perf_stats
.bufs_rec
++;
510 qeth_put_buffer_pool_entry(card
,
512 qeth_queue_input_buffer(card
, card
->rx
.b_index
);
514 if (card
->rx
.b_count
) {
516 (card
->rx
.b_index
+ 1) %
517 QDIO_MAX_BUFFERS_PER_Q
;
520 ->bufs
[card
->rx
.b_index
]
522 card
->rx
.e_offset
= 0;
526 if (work_done
>= budget
)
529 new_budget
= budget
- work_done
;
534 if (qdio_start_irq(card
->data
.ccwdev
, 0))
535 napi_schedule(&card
->napi
);
537 if (card
->options
.performance_stats
)
538 card
->perf_stats
.inbound_time
+= qeth_get_micros() -
539 card
->perf_stats
.inbound_start_time
;
543 static int qeth_l2_send_setdelmac(struct qeth_card
*card
, __u8
*mac
,
544 enum qeth_ipa_cmds ipacmd
,
545 int (*reply_cb
) (struct qeth_card
*,
549 struct qeth_ipa_cmd
*cmd
;
550 struct qeth_cmd_buffer
*iob
;
552 QETH_CARD_TEXT(card
, 2, "L2sdmac");
553 iob
= qeth_get_ipacmd_buffer(card
, ipacmd
, QETH_PROT_IPV4
);
554 cmd
= (struct qeth_ipa_cmd
*)(iob
->data
+IPA_PDU_HEADER_SIZE
);
555 cmd
->data
.setdelmac
.mac_length
= OSA_ADDR_LEN
;
556 memcpy(&cmd
->data
.setdelmac
.mac
, mac
, OSA_ADDR_LEN
);
557 return qeth_send_ipa_cmd(card
, iob
, reply_cb
, NULL
);
560 static int qeth_l2_send_setmac_cb(struct qeth_card
*card
,
561 struct qeth_reply
*reply
,
564 struct qeth_ipa_cmd
*cmd
;
566 QETH_CARD_TEXT(card
, 2, "L2Smaccb");
567 cmd
= (struct qeth_ipa_cmd
*) data
;
568 if (cmd
->hdr
.return_code
) {
569 QETH_CARD_TEXT_(card
, 2, "L2er%x", cmd
->hdr
.return_code
);
570 card
->info
.mac_bits
&= ~QETH_LAYER2_MAC_REGISTERED
;
571 switch (cmd
->hdr
.return_code
) {
572 case IPA_RC_L2_DUP_MAC
:
573 case IPA_RC_L2_DUP_LAYER3_MAC
:
574 dev_warn(&card
->gdev
->dev
,
575 "MAC address %pM already exists\n",
576 card
->dev
->dev_addr
);
578 case IPA_RC_L2_MAC_NOT_AUTH_BY_HYP
:
579 case IPA_RC_L2_MAC_NOT_AUTH_BY_ADP
:
580 dev_warn(&card
->gdev
->dev
,
581 "MAC address %pM is not authorized\n",
582 card
->dev
->dev_addr
);
587 cmd
->hdr
.return_code
= -EIO
;
589 card
->info
.mac_bits
|= QETH_LAYER2_MAC_REGISTERED
;
590 memcpy(card
->dev
->dev_addr
, cmd
->data
.setdelmac
.mac
,
592 dev_info(&card
->gdev
->dev
,
593 "MAC address %pM successfully registered on device %s\n",
594 card
->dev
->dev_addr
, card
->dev
->name
);
599 static int qeth_l2_send_setmac(struct qeth_card
*card
, __u8
*mac
)
601 QETH_CARD_TEXT(card
, 2, "L2Setmac");
602 return qeth_l2_send_setdelmac(card
, mac
, IPA_CMD_SETVMAC
,
603 qeth_l2_send_setmac_cb
);
606 static int qeth_l2_send_delmac_cb(struct qeth_card
*card
,
607 struct qeth_reply
*reply
,
610 struct qeth_ipa_cmd
*cmd
;
612 QETH_CARD_TEXT(card
, 2, "L2Dmaccb");
613 cmd
= (struct qeth_ipa_cmd
*) data
;
614 if (cmd
->hdr
.return_code
) {
615 QETH_CARD_TEXT_(card
, 2, "err%d", cmd
->hdr
.return_code
);
616 cmd
->hdr
.return_code
= -EIO
;
619 card
->info
.mac_bits
&= ~QETH_LAYER2_MAC_REGISTERED
;
624 static int qeth_l2_send_delmac(struct qeth_card
*card
, __u8
*mac
)
626 QETH_CARD_TEXT(card
, 2, "L2Delmac");
627 if (!(card
->info
.mac_bits
& QETH_LAYER2_MAC_REGISTERED
))
629 return qeth_l2_send_setdelmac(card
, mac
, IPA_CMD_DELVMAC
,
630 qeth_l2_send_delmac_cb
);
633 static int qeth_l2_request_initial_mac(struct qeth_card
*card
)
636 char vendor_pre
[] = {0x02, 0x00, 0x00};
638 QETH_DBF_TEXT(SETUP
, 2, "doL2init");
639 QETH_DBF_TEXT_(SETUP
, 2, "doL2%s", CARD_BUS_ID(card
));
641 rc
= qeth_query_setadapterparms(card
);
643 QETH_DBF_MESSAGE(2, "could not query adapter parameters on "
644 "device %s: x%x\n", CARD_BUS_ID(card
), rc
);
647 if (card
->info
.type
== QETH_CARD_TYPE_IQD
||
648 card
->info
.type
== QETH_CARD_TYPE_OSM
||
649 card
->info
.type
== QETH_CARD_TYPE_OSX
||
650 card
->info
.guestlan
) {
651 rc
= qeth_setadpparms_change_macaddr(card
);
653 QETH_DBF_MESSAGE(2, "couldn't get MAC address on "
654 "device %s: x%x\n", CARD_BUS_ID(card
), rc
);
655 QETH_DBF_TEXT_(SETUP
, 2, "1err%d", rc
);
658 QETH_DBF_HEX(SETUP
, 2, card
->dev
->dev_addr
, OSA_ADDR_LEN
);
660 random_ether_addr(card
->dev
->dev_addr
);
661 memcpy(card
->dev
->dev_addr
, vendor_pre
, 3);
666 static int qeth_l2_set_mac_address(struct net_device
*dev
, void *p
)
668 struct sockaddr
*addr
= p
;
669 struct qeth_card
*card
= dev
->ml_priv
;
672 QETH_CARD_TEXT(card
, 3, "setmac");
674 if (qeth_l2_verify_dev(dev
) != QETH_REAL_CARD
) {
675 QETH_CARD_TEXT(card
, 3, "setmcINV");
679 if (card
->info
.type
== QETH_CARD_TYPE_OSN
||
680 card
->info
.type
== QETH_CARD_TYPE_OSM
||
681 card
->info
.type
== QETH_CARD_TYPE_OSX
) {
682 QETH_CARD_TEXT(card
, 3, "setmcTYP");
685 QETH_CARD_HEX(card
, 3, addr
->sa_data
, OSA_ADDR_LEN
);
686 if (qeth_wait_for_threads(card
, QETH_RECOVER_THREAD
)) {
687 QETH_CARD_TEXT(card
, 3, "setmcREC");
690 rc
= qeth_l2_send_delmac(card
, &card
->dev
->dev_addr
[0]);
692 rc
= qeth_l2_send_setmac(card
, addr
->sa_data
);
696 static void qeth_l2_set_multicast_list(struct net_device
*dev
)
698 struct qeth_card
*card
= dev
->ml_priv
;
699 struct netdev_hw_addr
*ha
;
701 if (card
->info
.type
== QETH_CARD_TYPE_OSN
)
704 QETH_CARD_TEXT(card
, 3, "setmulti");
705 if (qeth_threads_running(card
, QETH_RECOVER_THREAD
) &&
706 (card
->state
!= CARD_STATE_UP
))
708 qeth_l2_del_all_mc(card
);
709 spin_lock_bh(&card
->mclock
);
710 netdev_for_each_mc_addr(ha
, dev
)
711 qeth_l2_add_mc(card
, ha
->addr
, 0);
713 netdev_for_each_uc_addr(ha
, dev
)
714 qeth_l2_add_mc(card
, ha
->addr
, 1);
716 spin_unlock_bh(&card
->mclock
);
717 if (!qeth_adp_supported(card
, IPA_SETADP_SET_PROMISC_MODE
))
719 qeth_setadp_promisc_mode(card
);
722 static int qeth_l2_hard_start_xmit(struct sk_buff
*skb
, struct net_device
*dev
)
725 struct qeth_hdr
*hdr
= NULL
;
727 struct qeth_card
*card
= dev
->ml_priv
;
728 struct sk_buff
*new_skb
= skb
;
729 int ipv
= qeth_get_ip_version(skb
);
730 int cast_type
= qeth_l2_get_cast_type(card
, skb
);
731 struct qeth_qdio_out_q
*queue
= card
->qdio
.out_qs
732 [qeth_get_priority_queue(card
, skb
, ipv
, cast_type
)];
733 int tx_bytes
= skb
->len
;
734 int data_offset
= -1;
735 int elements_needed
= 0;
738 if ((card
->state
!= CARD_STATE_UP
) || !card
->lan_online
) {
739 card
->stats
.tx_carrier_errors
++;
743 if ((card
->info
.type
== QETH_CARD_TYPE_OSN
) &&
744 (skb
->protocol
== htons(ETH_P_IPV6
)))
747 if (card
->options
.performance_stats
) {
748 card
->perf_stats
.outbound_cnt
++;
749 card
->perf_stats
.outbound_start_time
= qeth_get_micros();
751 netif_stop_queue(dev
);
753 if (card
->info
.type
== QETH_CARD_TYPE_OSN
)
754 hdr
= (struct qeth_hdr
*)skb
->data
;
756 if (card
->info
.type
== QETH_CARD_TYPE_IQD
) {
758 data_offset
= ETH_HLEN
;
760 hdr
= kmem_cache_alloc(qeth_core_header_cache
,
765 skb_reset_mac_header(new_skb
);
766 qeth_l2_fill_header(card
, hdr
, new_skb
, ipv
, cast_type
);
767 hdr
->hdr
.l2
.pkt_length
= new_skb
->len
;
768 memcpy(((char *)hdr
) + sizeof(struct qeth_hdr
),
769 skb_mac_header(new_skb
), ETH_HLEN
);
771 /* create a clone with writeable headroom */
772 new_skb
= skb_realloc_headroom(skb
,
773 sizeof(struct qeth_hdr
));
776 hdr
= (struct qeth_hdr
*)skb_push(new_skb
,
777 sizeof(struct qeth_hdr
));
778 skb_set_mac_header(new_skb
, sizeof(struct qeth_hdr
));
779 qeth_l2_fill_header(card
, hdr
, new_skb
, ipv
, cast_type
);
783 elements
= qeth_get_elements_no(card
, (void *)hdr
, new_skb
,
786 if (data_offset
>= 0)
787 kmem_cache_free(qeth_core_header_cache
, hdr
);
791 if (card
->info
.type
!= QETH_CARD_TYPE_IQD
) {
792 if (qeth_hdr_chk_and_bounce(new_skb
,
793 sizeof(struct qeth_hdr_layer2
)))
795 rc
= qeth_do_send_packet(card
, queue
, new_skb
, hdr
,
798 rc
= qeth_do_send_packet_fast(card
, queue
, new_skb
, hdr
,
799 elements
, data_offset
, hd_len
);
801 card
->stats
.tx_packets
++;
802 card
->stats
.tx_bytes
+= tx_bytes
;
804 dev_kfree_skb_any(skb
);
807 if (data_offset
>= 0)
808 kmem_cache_free(qeth_core_header_cache
, hdr
);
812 dev_kfree_skb_any(new_skb
);
813 return NETDEV_TX_BUSY
;
818 netif_wake_queue(dev
);
819 if (card
->options
.performance_stats
)
820 card
->perf_stats
.outbound_time
+= qeth_get_micros() -
821 card
->perf_stats
.outbound_start_time
;
825 card
->stats
.tx_dropped
++;
826 card
->stats
.tx_errors
++;
827 if ((new_skb
!= skb
) && new_skb
)
828 dev_kfree_skb_any(new_skb
);
829 dev_kfree_skb_any(skb
);
830 netif_wake_queue(dev
);
834 static int qeth_l2_open(struct net_device
*dev
)
836 struct qeth_card
*card
= dev
->ml_priv
;
839 QETH_CARD_TEXT(card
, 4, "qethopen");
840 if (card
->state
!= CARD_STATE_SOFTSETUP
)
843 if ((card
->info
.type
!= QETH_CARD_TYPE_OSN
) &&
844 (!(card
->info
.mac_bits
& QETH_LAYER2_MAC_REGISTERED
))) {
845 QETH_CARD_TEXT(card
, 4, "nomacadr");
848 card
->data
.state
= CH_STATE_UP
;
849 card
->state
= CARD_STATE_UP
;
850 netif_start_queue(dev
);
852 if (!card
->lan_online
&& netif_carrier_ok(dev
))
853 netif_carrier_off(dev
);
854 if (qdio_stop_irq(card
->data
.ccwdev
, 0) >= 0) {
855 napi_enable(&card
->napi
);
856 napi_schedule(&card
->napi
);
862 static int qeth_l2_stop(struct net_device
*dev
)
864 struct qeth_card
*card
= dev
->ml_priv
;
866 QETH_CARD_TEXT(card
, 4, "qethstop");
867 netif_tx_disable(dev
);
868 if (card
->state
== CARD_STATE_UP
) {
869 card
->state
= CARD_STATE_SOFTSETUP
;
870 napi_disable(&card
->napi
);
875 static int qeth_l2_probe_device(struct ccwgroup_device
*gdev
)
877 struct qeth_card
*card
= dev_get_drvdata(&gdev
->dev
);
879 INIT_LIST_HEAD(&card
->vid_list
);
880 INIT_LIST_HEAD(&card
->mc_list
);
881 card
->options
.layer2
= 1;
882 card
->discipline
.start_poll
= qeth_qdio_start_poll
;
883 card
->discipline
.input_handler
= (qdio_handler_t
*)
884 qeth_qdio_input_handler
;
885 card
->discipline
.output_handler
= (qdio_handler_t
*)
886 qeth_qdio_output_handler
;
887 card
->discipline
.recover
= qeth_l2_recover
;
891 static void qeth_l2_remove_device(struct ccwgroup_device
*cgdev
)
893 struct qeth_card
*card
= dev_get_drvdata(&cgdev
->dev
);
895 qeth_set_allowed_threads(card
, 0, 1);
896 wait_event(card
->wait_q
, qeth_threads_running(card
, 0xffffffff) == 0);
898 if (cgdev
->state
== CCWGROUP_ONLINE
) {
899 card
->use_hard_stop
= 1;
900 qeth_l2_set_offline(cgdev
);
904 unregister_netdev(card
->dev
);
910 static const struct ethtool_ops qeth_l2_ethtool_ops
= {
911 .get_link
= ethtool_op_get_link
,
912 .get_strings
= qeth_core_get_strings
,
913 .get_ethtool_stats
= qeth_core_get_ethtool_stats
,
914 .get_sset_count
= qeth_core_get_sset_count
,
915 .get_drvinfo
= qeth_core_get_drvinfo
,
916 .get_settings
= qeth_core_ethtool_get_settings
,
919 static const struct ethtool_ops qeth_l2_osn_ops
= {
920 .get_strings
= qeth_core_get_strings
,
921 .get_ethtool_stats
= qeth_core_get_ethtool_stats
,
922 .get_sset_count
= qeth_core_get_sset_count
,
923 .get_drvinfo
= qeth_core_get_drvinfo
,
926 static const struct net_device_ops qeth_l2_netdev_ops
= {
927 .ndo_open
= qeth_l2_open
,
928 .ndo_stop
= qeth_l2_stop
,
929 .ndo_get_stats
= qeth_get_stats
,
930 .ndo_start_xmit
= qeth_l2_hard_start_xmit
,
931 .ndo_validate_addr
= eth_validate_addr
,
932 .ndo_set_multicast_list
= qeth_l2_set_multicast_list
,
933 .ndo_do_ioctl
= qeth_l2_do_ioctl
,
934 .ndo_set_mac_address
= qeth_l2_set_mac_address
,
935 .ndo_change_mtu
= qeth_change_mtu
,
936 .ndo_vlan_rx_add_vid
= qeth_l2_vlan_rx_add_vid
,
937 .ndo_vlan_rx_kill_vid
= qeth_l2_vlan_rx_kill_vid
,
938 .ndo_tx_timeout
= qeth_tx_timeout
,
941 static int qeth_l2_setup_netdev(struct qeth_card
*card
)
943 switch (card
->info
.type
) {
944 case QETH_CARD_TYPE_IQD
:
945 card
->dev
= alloc_netdev(0, "hsi%d", ether_setup
);
947 case QETH_CARD_TYPE_OSN
:
948 card
->dev
= alloc_netdev(0, "osn%d", ether_setup
);
949 card
->dev
->flags
|= IFF_NOARP
;
952 card
->dev
= alloc_etherdev(0);
958 card
->dev
->ml_priv
= card
;
959 card
->dev
->watchdog_timeo
= QETH_TX_TIMEOUT
;
960 card
->dev
->mtu
= card
->info
.initial_mtu
;
961 card
->dev
->netdev_ops
= &qeth_l2_netdev_ops
;
962 if (card
->info
.type
!= QETH_CARD_TYPE_OSN
)
963 SET_ETHTOOL_OPS(card
->dev
, &qeth_l2_ethtool_ops
);
965 SET_ETHTOOL_OPS(card
->dev
, &qeth_l2_osn_ops
);
966 card
->dev
->features
|= NETIF_F_HW_VLAN_FILTER
;
967 card
->info
.broadcast_capable
= 1;
968 qeth_l2_request_initial_mac(card
);
969 SET_NETDEV_DEV(card
->dev
, &card
->gdev
->dev
);
970 netif_napi_add(card
->dev
, &card
->napi
, qeth_l2_poll
, QETH_NAPI_WEIGHT
);
971 return register_netdev(card
->dev
);
974 static int __qeth_l2_set_online(struct ccwgroup_device
*gdev
, int recovery_mode
)
976 struct qeth_card
*card
= dev_get_drvdata(&gdev
->dev
);
978 enum qeth_card_states recover_flag
;
981 mutex_lock(&card
->discipline_mutex
);
982 mutex_lock(&card
->conf_mutex
);
983 QETH_DBF_TEXT(SETUP
, 2, "setonlin");
984 QETH_DBF_HEX(SETUP
, 2, &card
, sizeof(void *));
986 recover_flag
= card
->state
;
987 rc
= qeth_core_hardsetup_card(card
);
989 QETH_DBF_TEXT_(SETUP
, 2, "2err%d", rc
);
994 if (!card
->dev
&& qeth_l2_setup_netdev(card
)) {
999 if (card
->info
.type
!= QETH_CARD_TYPE_OSN
)
1000 qeth_l2_send_setmac(card
, &card
->dev
->dev_addr
[0]);
1002 card
->state
= CARD_STATE_HARDSETUP
;
1003 memset(&card
->rx
, 0, sizeof(struct qeth_rx
));
1004 qeth_print_status_message(card
);
1007 QETH_DBF_TEXT(SETUP
, 2, "softsetp");
1009 rc
= qeth_send_startlan(card
);
1011 QETH_DBF_TEXT_(SETUP
, 2, "1err%d", rc
);
1013 dev_warn(&card
->gdev
->dev
,
1014 "The LAN is offline\n");
1015 card
->lan_online
= 0;
1021 card
->lan_online
= 1;
1023 if ((card
->info
.type
== QETH_CARD_TYPE_OSD
) ||
1024 (card
->info
.type
== QETH_CARD_TYPE_OSX
))
1025 /* configure isolation level */
1026 qeth_set_access_ctrl_online(card
);
1028 if (card
->info
.type
!= QETH_CARD_TYPE_OSN
&&
1029 card
->info
.type
!= QETH_CARD_TYPE_OSM
)
1030 qeth_l2_process_vlans(card
, 0);
1032 netif_tx_disable(card
->dev
);
1034 rc
= qeth_init_qdio_queues(card
);
1036 QETH_DBF_TEXT_(SETUP
, 2, "6err%d", rc
);
1040 card
->state
= CARD_STATE_SOFTSETUP
;
1041 netif_carrier_on(card
->dev
);
1043 qeth_set_allowed_threads(card
, 0xffffffff, 0);
1044 if (recover_flag
== CARD_STATE_RECOVER
) {
1045 if (recovery_mode
&&
1046 card
->info
.type
!= QETH_CARD_TYPE_OSN
) {
1047 qeth_l2_open(card
->dev
);
1050 dev_open(card
->dev
);
1053 /* this also sets saved unicast addresses */
1054 qeth_l2_set_multicast_list(card
->dev
);
1056 /* let user_space know that device is online */
1057 kobject_uevent(&gdev
->dev
.kobj
, KOBJ_CHANGE
);
1059 mutex_unlock(&card
->conf_mutex
);
1060 mutex_unlock(&card
->discipline_mutex
);
1064 card
->use_hard_stop
= 1;
1065 qeth_l2_stop_card(card
, 0);
1066 ccw_device_set_offline(CARD_DDEV(card
));
1067 ccw_device_set_offline(CARD_WDEV(card
));
1068 ccw_device_set_offline(CARD_RDEV(card
));
1069 if (recover_flag
== CARD_STATE_RECOVER
)
1070 card
->state
= CARD_STATE_RECOVER
;
1072 card
->state
= CARD_STATE_DOWN
;
1073 mutex_unlock(&card
->conf_mutex
);
1074 mutex_unlock(&card
->discipline_mutex
);
1078 static int qeth_l2_set_online(struct ccwgroup_device
*gdev
)
1080 return __qeth_l2_set_online(gdev
, 0);
1083 static int __qeth_l2_set_offline(struct ccwgroup_device
*cgdev
,
1086 struct qeth_card
*card
= dev_get_drvdata(&cgdev
->dev
);
1087 int rc
= 0, rc2
= 0, rc3
= 0;
1088 enum qeth_card_states recover_flag
;
1090 mutex_lock(&card
->discipline_mutex
);
1091 mutex_lock(&card
->conf_mutex
);
1092 QETH_DBF_TEXT(SETUP
, 3, "setoffl");
1093 QETH_DBF_HEX(SETUP
, 3, &card
, sizeof(void *));
1095 if (card
->dev
&& netif_carrier_ok(card
->dev
))
1096 netif_carrier_off(card
->dev
);
1097 recover_flag
= card
->state
;
1098 qeth_l2_stop_card(card
, recovery_mode
);
1099 rc
= ccw_device_set_offline(CARD_DDEV(card
));
1100 rc2
= ccw_device_set_offline(CARD_WDEV(card
));
1101 rc3
= ccw_device_set_offline(CARD_RDEV(card
));
1103 rc
= (rc2
) ? rc2
: rc3
;
1105 QETH_DBF_TEXT_(SETUP
, 2, "1err%d", rc
);
1106 if (recover_flag
== CARD_STATE_UP
)
1107 card
->state
= CARD_STATE_RECOVER
;
1108 /* let user_space know that device is offline */
1109 kobject_uevent(&cgdev
->dev
.kobj
, KOBJ_CHANGE
);
1110 mutex_unlock(&card
->conf_mutex
);
1111 mutex_unlock(&card
->discipline_mutex
);
1115 static int qeth_l2_set_offline(struct ccwgroup_device
*cgdev
)
1117 return __qeth_l2_set_offline(cgdev
, 0);
1120 static int qeth_l2_recover(void *ptr
)
1122 struct qeth_card
*card
;
1125 card
= (struct qeth_card
*) ptr
;
1126 QETH_CARD_TEXT(card
, 2, "recover1");
1127 if (!qeth_do_run_thread(card
, QETH_RECOVER_THREAD
))
1129 QETH_CARD_TEXT(card
, 2, "recover2");
1130 dev_warn(&card
->gdev
->dev
,
1131 "A recovery process has been started for the device\n");
1132 card
->use_hard_stop
= 1;
1133 __qeth_l2_set_offline(card
->gdev
, 1);
1134 rc
= __qeth_l2_set_online(card
->gdev
, 1);
1136 dev_info(&card
->gdev
->dev
,
1137 "Device successfully recovered!\n");
1140 dev_close(card
->dev
);
1142 dev_warn(&card
->gdev
->dev
, "The qeth device driver "
1143 "failed to recover an error on the device\n");
1145 qeth_clear_thread_start_bit(card
, QETH_RECOVER_THREAD
);
1146 qeth_clear_thread_running_bit(card
, QETH_RECOVER_THREAD
);
1150 static int __init
qeth_l2_init(void)
1152 pr_info("register layer 2 discipline\n");
1156 static void __exit
qeth_l2_exit(void)
1158 pr_info("unregister layer 2 discipline\n");
1161 static void qeth_l2_shutdown(struct ccwgroup_device
*gdev
)
1163 struct qeth_card
*card
= dev_get_drvdata(&gdev
->dev
);
1164 qeth_qdio_clear_card(card
, 0);
1165 qeth_clear_qdio_buffers(card
);
1168 static int qeth_l2_pm_suspend(struct ccwgroup_device
*gdev
)
1170 struct qeth_card
*card
= dev_get_drvdata(&gdev
->dev
);
1173 netif_device_detach(card
->dev
);
1174 qeth_set_allowed_threads(card
, 0, 1);
1175 wait_event(card
->wait_q
, qeth_threads_running(card
, 0xffffffff) == 0);
1176 if (gdev
->state
== CCWGROUP_OFFLINE
)
1178 if (card
->state
== CARD_STATE_UP
) {
1179 card
->use_hard_stop
= 1;
1180 __qeth_l2_set_offline(card
->gdev
, 1);
1182 __qeth_l2_set_offline(card
->gdev
, 0);
1186 static int qeth_l2_pm_resume(struct ccwgroup_device
*gdev
)
1188 struct qeth_card
*card
= dev_get_drvdata(&gdev
->dev
);
1191 if (gdev
->state
== CCWGROUP_OFFLINE
)
1194 if (card
->state
== CARD_STATE_RECOVER
) {
1195 rc
= __qeth_l2_set_online(card
->gdev
, 1);
1198 dev_close(card
->dev
);
1202 rc
= __qeth_l2_set_online(card
->gdev
, 0);
1204 qeth_set_allowed_threads(card
, 0xffffffff, 0);
1206 netif_device_attach(card
->dev
);
1208 dev_warn(&card
->gdev
->dev
, "The qeth device driver "
1209 "failed to recover an error on the device\n");
1213 struct ccwgroup_driver qeth_l2_ccwgroup_driver
= {
1214 .probe
= qeth_l2_probe_device
,
1215 .remove
= qeth_l2_remove_device
,
1216 .set_online
= qeth_l2_set_online
,
1217 .set_offline
= qeth_l2_set_offline
,
1218 .shutdown
= qeth_l2_shutdown
,
1219 .freeze
= qeth_l2_pm_suspend
,
1220 .thaw
= qeth_l2_pm_resume
,
1221 .restore
= qeth_l2_pm_resume
,
1223 EXPORT_SYMBOL_GPL(qeth_l2_ccwgroup_driver
);
1225 static int qeth_osn_send_control_data(struct qeth_card
*card
, int len
,
1226 struct qeth_cmd_buffer
*iob
)
1228 unsigned long flags
;
1231 QETH_CARD_TEXT(card
, 5, "osndctrd");
1233 wait_event(card
->wait_q
,
1234 atomic_cmpxchg(&card
->write
.irq_pending
, 0, 1) == 0);
1235 qeth_prepare_control_data(card
, len
, iob
);
1236 QETH_CARD_TEXT(card
, 6, "osnoirqp");
1237 spin_lock_irqsave(get_ccwdev_lock(card
->write
.ccwdev
), flags
);
1238 rc
= ccw_device_start(card
->write
.ccwdev
, &card
->write
.ccw
,
1239 (addr_t
) iob
, 0, 0);
1240 spin_unlock_irqrestore(get_ccwdev_lock(card
->write
.ccwdev
), flags
);
1242 QETH_DBF_MESSAGE(2, "qeth_osn_send_control_data: "
1243 "ccw_device_start rc = %i\n", rc
);
1244 QETH_CARD_TEXT_(card
, 2, " err%d", rc
);
1245 qeth_release_buffer(iob
->channel
, iob
);
1246 atomic_set(&card
->write
.irq_pending
, 0);
1247 wake_up(&card
->wait_q
);
1252 static int qeth_osn_send_ipa_cmd(struct qeth_card
*card
,
1253 struct qeth_cmd_buffer
*iob
, int data_len
)
1257 QETH_CARD_TEXT(card
, 4, "osndipa");
1259 qeth_prepare_ipa_cmd(card
, iob
, QETH_PROT_OSN2
);
1260 s1
= (u16
)(IPA_PDU_HEADER_SIZE
+ data_len
);
1262 memcpy(QETH_IPA_PDU_LEN_TOTAL(iob
->data
), &s1
, 2);
1263 memcpy(QETH_IPA_PDU_LEN_PDU1(iob
->data
), &s2
, 2);
1264 memcpy(QETH_IPA_PDU_LEN_PDU2(iob
->data
), &s2
, 2);
1265 memcpy(QETH_IPA_PDU_LEN_PDU3(iob
->data
), &s2
, 2);
1266 return qeth_osn_send_control_data(card
, s1
, iob
);
1269 int qeth_osn_assist(struct net_device
*dev
, void *data
, int data_len
)
1271 struct qeth_cmd_buffer
*iob
;
1272 struct qeth_card
*card
;
1277 card
= dev
->ml_priv
;
1280 QETH_CARD_TEXT(card
, 2, "osnsdmc");
1281 if ((card
->state
!= CARD_STATE_UP
) &&
1282 (card
->state
!= CARD_STATE_SOFTSETUP
))
1284 iob
= qeth_wait_for_buffer(&card
->write
);
1285 memcpy(iob
->data
+IPA_PDU_HEADER_SIZE
, data
, data_len
);
1286 rc
= qeth_osn_send_ipa_cmd(card
, iob
, data_len
);
1289 EXPORT_SYMBOL(qeth_osn_assist
);
1291 int qeth_osn_register(unsigned char *read_dev_no
, struct net_device
**dev
,
1292 int (*assist_cb
)(struct net_device
*, void *),
1293 int (*data_cb
)(struct sk_buff
*))
1295 struct qeth_card
*card
;
1297 *dev
= qeth_l2_netdev_by_devno(read_dev_no
);
1300 card
= (*dev
)->ml_priv
;
1303 QETH_CARD_TEXT(card
, 2, "osnreg");
1304 if ((assist_cb
== NULL
) || (data_cb
== NULL
))
1306 card
->osn_info
.assist_cb
= assist_cb
;
1307 card
->osn_info
.data_cb
= data_cb
;
1310 EXPORT_SYMBOL(qeth_osn_register
);
1312 void qeth_osn_deregister(struct net_device
*dev
)
1314 struct qeth_card
*card
;
1318 card
= dev
->ml_priv
;
1321 QETH_CARD_TEXT(card
, 2, "osndereg");
1322 card
->osn_info
.assist_cb
= NULL
;
1323 card
->osn_info
.data_cb
= NULL
;
1326 EXPORT_SYMBOL(qeth_osn_deregister
);
1328 module_init(qeth_l2_init
);
1329 module_exit(qeth_l2_exit
);
1330 MODULE_AUTHOR("Frank Blaschka <frank.blaschka@de.ibm.com>");
1331 MODULE_DESCRIPTION("qeth layer 2 discipline");
1332 MODULE_LICENSE("GPL");