aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_l2_main.c
diff options
context:
space:
mode:
authorCarsten Otte <cotte@de.ibm.com>2010-06-21 18:57:05 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-23 16:16:34 -0400
commit847a50fd9f3d6a1ee8c8bf646aa8c9a61ea51550 (patch)
tree730f6c00c0969be930ad7306fbc36796416331b8 /drivers/s390/net/qeth_l2_main.c
parentaf039068ca43e29d29ca1b387cb0b3e10eae3b92 (diff)
qeth: Fold qeth_trace debug area
This patch removes the qeth_trace debug area. All relevant data is logged into either qeth_setup or into each card's own debug area. Superfluous information (such as the card number when logging into the card's own debug area) is removed without replacement. Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_l2_main.c')
-rw-r--r--drivers/s390/net/qeth_l2_main.c94
1 files changed, 45 insertions, 49 deletions
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index d43f57a4ac66..e7942ccab987 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -79,7 +79,7 @@ static int qeth_l2_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
79 rc = -EOPNOTSUPP; 79 rc = -EOPNOTSUPP;
80 } 80 }
81 if (rc) 81 if (rc)
82 QETH_DBF_TEXT_(TRACE, 2, "ioce%d", rc); 82 QETH_CARD_TEXT_(card, 2, "ioce%d", rc);
83 return rc; 83 return rc;
84} 84}
85 85
@@ -130,7 +130,7 @@ static int qeth_l2_send_setgroupmac_cb(struct qeth_card *card,
130 struct qeth_ipa_cmd *cmd; 130 struct qeth_ipa_cmd *cmd;
131 __u8 *mac; 131 __u8 *mac;
132 132
133 QETH_DBF_TEXT(TRACE, 2, "L2Sgmacb"); 133 QETH_CARD_TEXT(card, 2, "L2Sgmacb");
134 cmd = (struct qeth_ipa_cmd *) data; 134 cmd = (struct qeth_ipa_cmd *) data;
135 mac = &cmd->data.setdelmac.mac[0]; 135 mac = &cmd->data.setdelmac.mac[0];
136 /* MAC already registered, needed in couple/uncouple case */ 136 /* MAC already registered, needed in couple/uncouple case */
@@ -147,7 +147,7 @@ static int qeth_l2_send_setgroupmac_cb(struct qeth_card *card,
147 147
148static int qeth_l2_send_setgroupmac(struct qeth_card *card, __u8 *mac) 148static int qeth_l2_send_setgroupmac(struct qeth_card *card, __u8 *mac)
149{ 149{
150 QETH_DBF_TEXT(TRACE, 2, "L2Sgmac"); 150 QETH_CARD_TEXT(card, 2, "L2Sgmac");
151 return qeth_l2_send_setdelmac(card, mac, IPA_CMD_SETGMAC, 151 return qeth_l2_send_setdelmac(card, mac, IPA_CMD_SETGMAC,
152 qeth_l2_send_setgroupmac_cb); 152 qeth_l2_send_setgroupmac_cb);
153} 153}
@@ -159,7 +159,7 @@ static int qeth_l2_send_delgroupmac_cb(struct qeth_card *card,
159 struct qeth_ipa_cmd *cmd; 159 struct qeth_ipa_cmd *cmd;
160 __u8 *mac; 160 __u8 *mac;
161 161
162 QETH_DBF_TEXT(TRACE, 2, "L2Dgmacb"); 162 QETH_CARD_TEXT(card, 2, "L2Dgmacb");
163 cmd = (struct qeth_ipa_cmd *) data; 163 cmd = (struct qeth_ipa_cmd *) data;
164 mac = &cmd->data.setdelmac.mac[0]; 164 mac = &cmd->data.setdelmac.mac[0];
165 if (cmd->hdr.return_code) 165 if (cmd->hdr.return_code)
@@ -170,7 +170,7 @@ static int qeth_l2_send_delgroupmac_cb(struct qeth_card *card,
170 170
171static int qeth_l2_send_delgroupmac(struct qeth_card *card, __u8 *mac) 171static int qeth_l2_send_delgroupmac(struct qeth_card *card, __u8 *mac)
172{ 172{
173 QETH_DBF_TEXT(TRACE, 2, "L2Dgmac"); 173 QETH_CARD_TEXT(card, 2, "L2Dgmac");
174 return qeth_l2_send_setdelmac(card, mac, IPA_CMD_DELGMAC, 174 return qeth_l2_send_setdelmac(card, mac, IPA_CMD_DELGMAC,
175 qeth_l2_send_delgroupmac_cb); 175 qeth_l2_send_delgroupmac_cb);
176} 176}
@@ -262,15 +262,14 @@ static int qeth_l2_send_setdelvlan_cb(struct qeth_card *card,
262{ 262{
263 struct qeth_ipa_cmd *cmd; 263 struct qeth_ipa_cmd *cmd;
264 264
265 QETH_DBF_TEXT(TRACE, 2, "L2sdvcb"); 265 QETH_CARD_TEXT(card, 2, "L2sdvcb");
266 cmd = (struct qeth_ipa_cmd *) data; 266 cmd = (struct qeth_ipa_cmd *) data;
267 if (cmd->hdr.return_code) { 267 if (cmd->hdr.return_code) {
268 QETH_DBF_MESSAGE(2, "Error in processing VLAN %i on %s: 0x%x. " 268 QETH_DBF_MESSAGE(2, "Error in processing VLAN %i on %s: 0x%x. "
269 "Continuing\n", cmd->data.setdelvlan.vlan_id, 269 "Continuing\n", cmd->data.setdelvlan.vlan_id,
270 QETH_CARD_IFNAME(card), cmd->hdr.return_code); 270 QETH_CARD_IFNAME(card), cmd->hdr.return_code);
271 QETH_DBF_TEXT_(TRACE, 2, "L2VL%4x", cmd->hdr.command); 271 QETH_CARD_TEXT_(card, 2, "L2VL%4x", cmd->hdr.command);
272 QETH_DBF_TEXT_(TRACE, 2, "L2%s", CARD_BUS_ID(card)); 272 QETH_CARD_TEXT_(card, 2, "err%d", cmd->hdr.return_code);
273 QETH_DBF_TEXT_(TRACE, 2, "err%d", cmd->hdr.return_code);
274 } 273 }
275 return 0; 274 return 0;
276} 275}
@@ -281,7 +280,7 @@ static int qeth_l2_send_setdelvlan(struct qeth_card *card, __u16 i,
281 struct qeth_ipa_cmd *cmd; 280 struct qeth_ipa_cmd *cmd;
282 struct qeth_cmd_buffer *iob; 281 struct qeth_cmd_buffer *iob;
283 282
284 QETH_DBF_TEXT_(TRACE, 4, "L2sdv%x", ipacmd); 283 QETH_CARD_TEXT_(card, 4, "L2sdv%x", ipacmd);
285 iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); 284 iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4);
286 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 285 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
287 cmd->data.setdelvlan.vlan_id = i; 286 cmd->data.setdelvlan.vlan_id = i;
@@ -292,7 +291,7 @@ static int qeth_l2_send_setdelvlan(struct qeth_card *card, __u16 i,
292static void qeth_l2_process_vlans(struct qeth_card *card, int clear) 291static void qeth_l2_process_vlans(struct qeth_card *card, int clear)
293{ 292{
294 struct qeth_vlan_vid *id; 293 struct qeth_vlan_vid *id;
295 QETH_DBF_TEXT(TRACE, 3, "L2prcvln"); 294 QETH_CARD_TEXT(card, 3, "L2prcvln");
296 spin_lock_bh(&card->vlanlock); 295 spin_lock_bh(&card->vlanlock);
297 list_for_each_entry(id, &card->vid_list, list) { 296 list_for_each_entry(id, &card->vid_list, list) {
298 if (clear) 297 if (clear)
@@ -310,13 +309,13 @@ static void qeth_l2_vlan_rx_add_vid(struct net_device *dev, unsigned short vid)
310 struct qeth_card *card = dev->ml_priv; 309 struct qeth_card *card = dev->ml_priv;
311 struct qeth_vlan_vid *id; 310 struct qeth_vlan_vid *id;
312 311
313 QETH_DBF_TEXT_(TRACE, 4, "aid:%d", vid); 312 QETH_CARD_TEXT_(card, 4, "aid:%d", vid);
314 if (card->info.type == QETH_CARD_TYPE_OSM) { 313 if (card->info.type == QETH_CARD_TYPE_OSM) {
315 QETH_DBF_TEXT(TRACE, 3, "aidOSM"); 314 QETH_CARD_TEXT(card, 3, "aidOSM");
316 return; 315 return;
317 } 316 }
318 if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) { 317 if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) {
319 QETH_DBF_TEXT(TRACE, 3, "aidREC"); 318 QETH_CARD_TEXT(card, 3, "aidREC");
320 return; 319 return;
321 } 320 }
322 id = kmalloc(sizeof(struct qeth_vlan_vid), GFP_ATOMIC); 321 id = kmalloc(sizeof(struct qeth_vlan_vid), GFP_ATOMIC);
@@ -334,13 +333,13 @@ static void qeth_l2_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
334 struct qeth_vlan_vid *id, *tmpid = NULL; 333 struct qeth_vlan_vid *id, *tmpid = NULL;
335 struct qeth_card *card = dev->ml_priv; 334 struct qeth_card *card = dev->ml_priv;
336 335
337 QETH_DBF_TEXT_(TRACE, 4, "kid:%d", vid); 336 QETH_CARD_TEXT_(card, 4, "kid:%d", vid);
338 if (card->info.type == QETH_CARD_TYPE_OSM) { 337 if (card->info.type == QETH_CARD_TYPE_OSM) {
339 QETH_DBF_TEXT(TRACE, 3, "kidOSM"); 338 QETH_CARD_TEXT(card, 3, "kidOSM");
340 return; 339 return;
341 } 340 }
342 if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) { 341 if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) {
343 QETH_DBF_TEXT(TRACE, 3, "kidREC"); 342 QETH_CARD_TEXT(card, 3, "kidREC");
344 return; 343 return;
345 } 344 }
346 spin_lock_bh(&card->vlanlock); 345 spin_lock_bh(&card->vlanlock);
@@ -456,7 +455,7 @@ static void qeth_l2_process_inbound_buffer(struct qeth_card *card,
456 /* else unknown */ 455 /* else unknown */
457 default: 456 default:
458 dev_kfree_skb_any(skb); 457 dev_kfree_skb_any(skb);
459 QETH_DBF_TEXT(TRACE, 3, "inbunkno"); 458 QETH_CARD_TEXT(card, 3, "inbunkno");
460 QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN); 459 QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN);
461 continue; 460 continue;
462 } 461 }
@@ -474,7 +473,7 @@ static int qeth_l2_send_setdelmac(struct qeth_card *card, __u8 *mac,
474 struct qeth_ipa_cmd *cmd; 473 struct qeth_ipa_cmd *cmd;
475 struct qeth_cmd_buffer *iob; 474 struct qeth_cmd_buffer *iob;
476 475
477 QETH_DBF_TEXT(TRACE, 2, "L2sdmac"); 476 QETH_CARD_TEXT(card, 2, "L2sdmac");
478 iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); 477 iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4);
479 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 478 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
480 cmd->data.setdelmac.mac_length = OSA_ADDR_LEN; 479 cmd->data.setdelmac.mac_length = OSA_ADDR_LEN;
@@ -488,10 +487,10 @@ static int qeth_l2_send_setmac_cb(struct qeth_card *card,
488{ 487{
489 struct qeth_ipa_cmd *cmd; 488 struct qeth_ipa_cmd *cmd;
490 489
491 QETH_DBF_TEXT(TRACE, 2, "L2Smaccb"); 490 QETH_CARD_TEXT(card, 2, "L2Smaccb");
492 cmd = (struct qeth_ipa_cmd *) data; 491 cmd = (struct qeth_ipa_cmd *) data;
493 if (cmd->hdr.return_code) { 492 if (cmd->hdr.return_code) {
494 QETH_DBF_TEXT_(TRACE, 2, "L2er%x", cmd->hdr.return_code); 493 QETH_CARD_TEXT_(card, 2, "L2er%x", cmd->hdr.return_code);
495 card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED; 494 card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED;
496 switch (cmd->hdr.return_code) { 495 switch (cmd->hdr.return_code) {
497 case IPA_RC_L2_DUP_MAC: 496 case IPA_RC_L2_DUP_MAC:
@@ -523,7 +522,7 @@ static int qeth_l2_send_setmac_cb(struct qeth_card *card,
523 522
524static int qeth_l2_send_setmac(struct qeth_card *card, __u8 *mac) 523static int qeth_l2_send_setmac(struct qeth_card *card, __u8 *mac)
525{ 524{
526 QETH_DBF_TEXT(TRACE, 2, "L2Setmac"); 525 QETH_CARD_TEXT(card, 2, "L2Setmac");
527 return qeth_l2_send_setdelmac(card, mac, IPA_CMD_SETVMAC, 526 return qeth_l2_send_setdelmac(card, mac, IPA_CMD_SETVMAC,
528 qeth_l2_send_setmac_cb); 527 qeth_l2_send_setmac_cb);
529} 528}
@@ -534,10 +533,10 @@ static int qeth_l2_send_delmac_cb(struct qeth_card *card,
534{ 533{
535 struct qeth_ipa_cmd *cmd; 534 struct qeth_ipa_cmd *cmd;
536 535
537 QETH_DBF_TEXT(TRACE, 2, "L2Dmaccb"); 536 QETH_CARD_TEXT(card, 2, "L2Dmaccb");
538 cmd = (struct qeth_ipa_cmd *) data; 537 cmd = (struct qeth_ipa_cmd *) data;
539 if (cmd->hdr.return_code) { 538 if (cmd->hdr.return_code) {
540 QETH_DBF_TEXT_(TRACE, 2, "err%d", cmd->hdr.return_code); 539 QETH_CARD_TEXT_(card, 2, "err%d", cmd->hdr.return_code);
541 cmd->hdr.return_code = -EIO; 540 cmd->hdr.return_code = -EIO;
542 return 0; 541 return 0;
543 } 542 }
@@ -548,7 +547,7 @@ static int qeth_l2_send_delmac_cb(struct qeth_card *card,
548 547
549static int qeth_l2_send_delmac(struct qeth_card *card, __u8 *mac) 548static int qeth_l2_send_delmac(struct qeth_card *card, __u8 *mac)
550{ 549{
551 QETH_DBF_TEXT(TRACE, 2, "L2Delmac"); 550 QETH_CARD_TEXT(card, 2, "L2Delmac");
552 if (!(card->info.mac_bits & QETH_LAYER2_MAC_REGISTERED)) 551 if (!(card->info.mac_bits & QETH_LAYER2_MAC_REGISTERED))
553 return 0; 552 return 0;
554 return qeth_l2_send_setdelmac(card, mac, IPA_CMD_DELVMAC, 553 return qeth_l2_send_setdelmac(card, mac, IPA_CMD_DELVMAC,
@@ -594,23 +593,22 @@ static int qeth_l2_set_mac_address(struct net_device *dev, void *p)
594 struct qeth_card *card = dev->ml_priv; 593 struct qeth_card *card = dev->ml_priv;
595 int rc = 0; 594 int rc = 0;
596 595
597 QETH_DBF_TEXT(TRACE, 3, "setmac"); 596 QETH_CARD_TEXT(card, 3, "setmac");
598 597
599 if (qeth_l2_verify_dev(dev) != QETH_REAL_CARD) { 598 if (qeth_l2_verify_dev(dev) != QETH_REAL_CARD) {
600 QETH_DBF_TEXT(TRACE, 3, "setmcINV"); 599 QETH_CARD_TEXT(card, 3, "setmcINV");
601 return -EOPNOTSUPP; 600 return -EOPNOTSUPP;
602 } 601 }
603 602
604 if (card->info.type == QETH_CARD_TYPE_OSN || 603 if (card->info.type == QETH_CARD_TYPE_OSN ||
605 card->info.type == QETH_CARD_TYPE_OSM || 604 card->info.type == QETH_CARD_TYPE_OSM ||
606 card->info.type == QETH_CARD_TYPE_OSX) { 605 card->info.type == QETH_CARD_TYPE_OSX) {
607 QETH_DBF_TEXT(TRACE, 3, "setmcTYP"); 606 QETH_CARD_TEXT(card, 3, "setmcTYP");
608 return -EOPNOTSUPP; 607 return -EOPNOTSUPP;
609 } 608 }
610 QETH_DBF_TEXT_(TRACE, 3, "%s", CARD_BUS_ID(card)); 609 QETH_CARD_HEX(card, 3, addr->sa_data, OSA_ADDR_LEN);
611 QETH_DBF_HEX(TRACE, 3, addr->sa_data, OSA_ADDR_LEN);
612 if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) { 610 if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) {
613 QETH_DBF_TEXT(TRACE, 3, "setmcREC"); 611 QETH_CARD_TEXT(card, 3, "setmcREC");
614 return -ERESTARTSYS; 612 return -ERESTARTSYS;
615 } 613 }
616 rc = qeth_l2_send_delmac(card, &card->dev->dev_addr[0]); 614 rc = qeth_l2_send_delmac(card, &card->dev->dev_addr[0]);
@@ -627,7 +625,7 @@ static void qeth_l2_set_multicast_list(struct net_device *dev)
627 if (card->info.type == QETH_CARD_TYPE_OSN) 625 if (card->info.type == QETH_CARD_TYPE_OSN)
628 return ; 626 return ;
629 627
630 QETH_DBF_TEXT(TRACE, 3, "setmulti"); 628 QETH_CARD_TEXT(card, 3, "setmulti");
631 if (qeth_threads_running(card, QETH_RECOVER_THREAD) && 629 if (qeth_threads_running(card, QETH_RECOVER_THREAD) &&
632 (card->state != CARD_STATE_UP)) 630 (card->state != CARD_STATE_UP))
633 return; 631 return;
@@ -771,11 +769,10 @@ static void qeth_l2_qdio_input_handler(struct ccw_device *ccwdev,
771 card->perf_stats.inbound_start_time = qeth_get_micros(); 769 card->perf_stats.inbound_start_time = qeth_get_micros();
772 } 770 }
773 if (qdio_err & QDIO_ERROR_ACTIVATE_CHECK_CONDITION) { 771 if (qdio_err & QDIO_ERROR_ACTIVATE_CHECK_CONDITION) {
774 QETH_DBF_TEXT(TRACE, 1, "qdinchk"); 772 QETH_CARD_TEXT(card, 1, "qdinchk");
775 QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card)); 773 QETH_CARD_TEXT_(card, 1, "%04X%04X", first_element,
776 QETH_DBF_TEXT_(TRACE, 1, "%04X%04X", first_element,
777 count); 774 count);
778 QETH_DBF_TEXT_(TRACE, 1, "%04X", queue); 775 QETH_CARD_TEXT_(card, 1, "%04X", queue);
779 qeth_schedule_recovery(card); 776 qeth_schedule_recovery(card);
780 return; 777 return;
781 } 778 }
@@ -799,13 +796,13 @@ static int qeth_l2_open(struct net_device *dev)
799{ 796{
800 struct qeth_card *card = dev->ml_priv; 797 struct qeth_card *card = dev->ml_priv;
801 798
802 QETH_DBF_TEXT(TRACE, 4, "qethopen"); 799 QETH_CARD_TEXT(card, 4, "qethopen");
803 if (card->state != CARD_STATE_SOFTSETUP) 800 if (card->state != CARD_STATE_SOFTSETUP)
804 return -ENODEV; 801 return -ENODEV;
805 802
806 if ((card->info.type != QETH_CARD_TYPE_OSN) && 803 if ((card->info.type != QETH_CARD_TYPE_OSN) &&
807 (!(card->info.mac_bits & QETH_LAYER2_MAC_REGISTERED))) { 804 (!(card->info.mac_bits & QETH_LAYER2_MAC_REGISTERED))) {
808 QETH_DBF_TEXT(TRACE, 4, "nomacadr"); 805 QETH_CARD_TEXT(card, 4, "nomacadr");
809 return -EPERM; 806 return -EPERM;
810 } 807 }
811 card->data.state = CH_STATE_UP; 808 card->data.state = CH_STATE_UP;
@@ -822,7 +819,7 @@ static int qeth_l2_stop(struct net_device *dev)
822{ 819{
823 struct qeth_card *card = dev->ml_priv; 820 struct qeth_card *card = dev->ml_priv;
824 821
825 QETH_DBF_TEXT(TRACE, 4, "qethstop"); 822 QETH_CARD_TEXT(card, 4, "qethstop");
826 netif_tx_disable(dev); 823 netif_tx_disable(dev);
827 if (card->state == CARD_STATE_UP) 824 if (card->state == CARD_STATE_UP)
828 card->state = CARD_STATE_SOFTSETUP; 825 card->state = CARD_STATE_SOFTSETUP;
@@ -1074,11 +1071,10 @@ static int qeth_l2_recover(void *ptr)
1074 int rc = 0; 1071 int rc = 0;
1075 1072
1076 card = (struct qeth_card *) ptr; 1073 card = (struct qeth_card *) ptr;
1077 QETH_DBF_TEXT(TRACE, 2, "recover1"); 1074 QETH_CARD_TEXT(card, 2, "recover1");
1078 QETH_DBF_HEX(TRACE, 2, &card, sizeof(void *));
1079 if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD)) 1075 if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD))
1080 return 0; 1076 return 0;
1081 QETH_DBF_TEXT(TRACE, 2, "recover2"); 1077 QETH_CARD_TEXT(card, 2, "recover2");
1082 dev_warn(&card->gdev->dev, 1078 dev_warn(&card->gdev->dev,
1083 "A recovery process has been started for the device\n"); 1079 "A recovery process has been started for the device\n");
1084 card->use_hard_stop = 1; 1080 card->use_hard_stop = 1;
@@ -1181,12 +1177,12 @@ static int qeth_osn_send_control_data(struct qeth_card *card, int len,
1181 unsigned long flags; 1177 unsigned long flags;
1182 int rc = 0; 1178 int rc = 0;
1183 1179
1184 QETH_DBF_TEXT(TRACE, 5, "osndctrd"); 1180 QETH_CARD_TEXT(card, 5, "osndctrd");
1185 1181
1186 wait_event(card->wait_q, 1182 wait_event(card->wait_q,
1187 atomic_cmpxchg(&card->write.irq_pending, 0, 1) == 0); 1183 atomic_cmpxchg(&card->write.irq_pending, 0, 1) == 0);
1188 qeth_prepare_control_data(card, len, iob); 1184 qeth_prepare_control_data(card, len, iob);
1189 QETH_DBF_TEXT(TRACE, 6, "osnoirqp"); 1185 QETH_CARD_TEXT(card, 6, "osnoirqp");
1190 spin_lock_irqsave(get_ccwdev_lock(card->write.ccwdev), flags); 1186 spin_lock_irqsave(get_ccwdev_lock(card->write.ccwdev), flags);
1191 rc = ccw_device_start(card->write.ccwdev, &card->write.ccw, 1187 rc = ccw_device_start(card->write.ccwdev, &card->write.ccw,
1192 (addr_t) iob, 0, 0); 1188 (addr_t) iob, 0, 0);
@@ -1194,7 +1190,7 @@ static int qeth_osn_send_control_data(struct qeth_card *card, int len,
1194 if (rc) { 1190 if (rc) {
1195 QETH_DBF_MESSAGE(2, "qeth_osn_send_control_data: " 1191 QETH_DBF_MESSAGE(2, "qeth_osn_send_control_data: "
1196 "ccw_device_start rc = %i\n", rc); 1192 "ccw_device_start rc = %i\n", rc);
1197 QETH_DBF_TEXT_(TRACE, 2, " err%d", rc); 1193 QETH_CARD_TEXT_(card, 2, " err%d", rc);
1198 qeth_release_buffer(iob->channel, iob); 1194 qeth_release_buffer(iob->channel, iob);
1199 atomic_set(&card->write.irq_pending, 0); 1195 atomic_set(&card->write.irq_pending, 0);
1200 wake_up(&card->wait_q); 1196 wake_up(&card->wait_q);
@@ -1207,7 +1203,7 @@ static int qeth_osn_send_ipa_cmd(struct qeth_card *card,
1207{ 1203{
1208 u16 s1, s2; 1204 u16 s1, s2;
1209 1205
1210 QETH_DBF_TEXT(TRACE, 4, "osndipa"); 1206 QETH_CARD_TEXT(card, 4, "osndipa");
1211 1207
1212 qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2); 1208 qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2);
1213 s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len); 1209 s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len);
@@ -1225,12 +1221,12 @@ int qeth_osn_assist(struct net_device *dev, void *data, int data_len)
1225 struct qeth_card *card; 1221 struct qeth_card *card;
1226 int rc; 1222 int rc;
1227 1223
1228 QETH_DBF_TEXT(TRACE, 2, "osnsdmc");
1229 if (!dev) 1224 if (!dev)
1230 return -ENODEV; 1225 return -ENODEV;
1231 card = dev->ml_priv; 1226 card = dev->ml_priv;
1232 if (!card) 1227 if (!card)
1233 return -ENODEV; 1228 return -ENODEV;
1229 QETH_CARD_TEXT(card, 2, "osnsdmc");
1234 if ((card->state != CARD_STATE_UP) && 1230 if ((card->state != CARD_STATE_UP) &&
1235 (card->state != CARD_STATE_SOFTSETUP)) 1231 (card->state != CARD_STATE_SOFTSETUP))
1236 return -ENODEV; 1232 return -ENODEV;
@@ -1247,13 +1243,13 @@ int qeth_osn_register(unsigned char *read_dev_no, struct net_device **dev,
1247{ 1243{
1248 struct qeth_card *card; 1244 struct qeth_card *card;
1249 1245
1250 QETH_DBF_TEXT(TRACE, 2, "osnreg");
1251 *dev = qeth_l2_netdev_by_devno(read_dev_no); 1246 *dev = qeth_l2_netdev_by_devno(read_dev_no);
1252 if (*dev == NULL) 1247 if (*dev == NULL)
1253 return -ENODEV; 1248 return -ENODEV;
1254 card = (*dev)->ml_priv; 1249 card = (*dev)->ml_priv;
1255 if (!card) 1250 if (!card)
1256 return -ENODEV; 1251 return -ENODEV;
1252 QETH_CARD_TEXT(card, 2, "osnreg");
1257 if ((assist_cb == NULL) || (data_cb == NULL)) 1253 if ((assist_cb == NULL) || (data_cb == NULL))
1258 return -EINVAL; 1254 return -EINVAL;
1259 card->osn_info.assist_cb = assist_cb; 1255 card->osn_info.assist_cb = assist_cb;
@@ -1266,12 +1262,12 @@ void qeth_osn_deregister(struct net_device *dev)
1266{ 1262{
1267 struct qeth_card *card; 1263 struct qeth_card *card;
1268 1264
1269 QETH_DBF_TEXT(TRACE, 2, "osndereg");
1270 if (!dev) 1265 if (!dev)
1271 return; 1266 return;
1272 card = dev->ml_priv; 1267 card = dev->ml_priv;
1273 if (!card) 1268 if (!card)
1274 return; 1269 return;
1270 QETH_CARD_TEXT(card, 2, "osndereg");
1275 card->osn_info.assist_cb = NULL; 1271 card->osn_info.assist_cb = NULL;
1276 card->osn_info.data_cb = NULL; 1272 card->osn_info.data_cb = NULL;
1277 return; 1273 return;