aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Tiedemann <ptiedem@de.ibm.com>2008-04-01 04:26:58 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-16 20:41:41 -0400
commitd11ba0c40fa8a21511822efee3be8389f94f0431 (patch)
treecee1f480b8f719b12ccd8cb396b6fc464eaf8f13
parentb7624ec1cfaa1218320faa00a061b9891ed28997 (diff)
qeth: improving debug message handling
Improving debug message handling, moving ipa into messages from kernel to dbf, some cleanups and typo fixes. Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r--drivers/s390/net/qeth_core.h93
-rw-r--r--drivers/s390/net/qeth_core_main.c579
-rw-r--r--drivers/s390/net/qeth_core_mpc.c2
-rw-r--r--drivers/s390/net/qeth_core_offl.c60
-rw-r--r--drivers/s390/net/qeth_l2_main.c143
-rw-r--r--drivers/s390/net/qeth_l3.h11
-rw-r--r--drivers/s390/net/qeth_l3_main.c282
7 files changed, 544 insertions, 626 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index 9485e363ca11..66f4f12503c9 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -34,59 +34,53 @@
34 34
35#include "qeth_core_mpc.h" 35#include "qeth_core_mpc.h"
36 36
37#define KMSG_COMPONENT "qeth"
38
37/** 39/**
38 * Debug Facility stuff 40 * Debug Facility stuff
39 */ 41 */
40#define QETH_DBF_SETUP_NAME "qeth_setup" 42enum qeth_dbf_names {
41#define QETH_DBF_SETUP_LEN 8 43 QETH_DBF_SETUP,
42#define QETH_DBF_SETUP_PAGES 8 44 QETH_DBF_QERR,
43#define QETH_DBF_SETUP_NR_AREAS 1 45 QETH_DBF_TRACE,
44#define QETH_DBF_SETUP_LEVEL 5 46 QETH_DBF_MSG,
45 47 QETH_DBF_SENSE,
46#define QETH_DBF_MISC_NAME "qeth_misc" 48 QETH_DBF_MISC,
47#define QETH_DBF_MISC_LEN 128 49 QETH_DBF_CTRL,
48#define QETH_DBF_MISC_PAGES 2 50 QETH_DBF_INFOS /* must be last element */
49#define QETH_DBF_MISC_NR_AREAS 1 51};
50#define QETH_DBF_MISC_LEVEL 2 52
51 53struct qeth_dbf_info {
52#define QETH_DBF_DATA_NAME "qeth_data" 54 char name[DEBUG_MAX_NAME_LEN];
53#define QETH_DBF_DATA_LEN 96 55 int pages;
54#define QETH_DBF_DATA_PAGES 8 56 int areas;
55#define QETH_DBF_DATA_NR_AREAS 1 57 int len;
56#define QETH_DBF_DATA_LEVEL 2 58 int level;
57 59 struct debug_view *view;
58#define QETH_DBF_CONTROL_NAME "qeth_control" 60 debug_info_t *id;
59#define QETH_DBF_CONTROL_LEN 256 61};
60#define QETH_DBF_CONTROL_PAGES 8 62
61#define QETH_DBF_CONTROL_NR_AREAS 1 63#define QETH_DBF_CTRL_LEN 256
62#define QETH_DBF_CONTROL_LEVEL 5
63
64#define QETH_DBF_TRACE_NAME "qeth_trace"
65#define QETH_DBF_TRACE_LEN 8
66#define QETH_DBF_TRACE_PAGES 4
67#define QETH_DBF_TRACE_NR_AREAS 1
68#define QETH_DBF_TRACE_LEVEL 3
69
70#define QETH_DBF_SENSE_NAME "qeth_sense"
71#define QETH_DBF_SENSE_LEN 64
72#define QETH_DBF_SENSE_PAGES 2
73#define QETH_DBF_SENSE_NR_AREAS 1
74#define QETH_DBF_SENSE_LEVEL 2
75
76#define QETH_DBF_QERR_NAME "qeth_qerr"
77#define QETH_DBF_QERR_LEN 8
78#define QETH_DBF_QERR_PAGES 2
79#define QETH_DBF_QERR_NR_AREAS 1
80#define QETH_DBF_QERR_LEVEL 2
81 64
82#define QETH_DBF_TEXT(name, level, text) \ 65#define QETH_DBF_TEXT(name, level, text) \
83 do { \ 66 debug_text_event(qeth_dbf[QETH_DBF_##name].id, level, text)
84 debug_text_event(qeth_dbf_##name, level, text); \
85 } while (0)
86 67
87#define QETH_DBF_HEX(name, level, addr, len) \ 68#define QETH_DBF_HEX(name, level, addr, len) \
69 debug_event(qeth_dbf[QETH_DBF_##name].id, level, (void *)(addr), len)
70
71#define QETH_DBF_MESSAGE(level, text...) \
72 debug_sprintf_event(qeth_dbf[QETH_DBF_MSG].id, level, text)
73
74#define QETH_DBF_TEXT_(name, level, text...) \
88 do { \ 75 do { \
89 debug_event(qeth_dbf_##name, level, (void *)(addr), len); \ 76 if (qeth_dbf_passes(qeth_dbf[QETH_DBF_##name].id, level)) { \
77 char *dbf_txt_buf = \
78 get_cpu_var(QETH_DBF_TXT_BUF); \
79 sprintf(dbf_txt_buf, text); \
80 debug_text_event(qeth_dbf[QETH_DBF_##name].id, \
81 level, dbf_txt_buf); \
82 put_cpu_var(QETH_DBF_TXT_BUF); \
83 } \
90 } while (0) 84 } while (0)
91 85
92/* Allow to sort out low debug levels early to avoid wasted sprints */ 86/* Allow to sort out low debug levels early to avoid wasted sprints */
@@ -826,13 +820,8 @@ void qeth_core_remove_osn_attributes(struct device *);
826 820
827/* exports for qeth discipline device drivers */ 821/* exports for qeth discipline device drivers */
828extern struct qeth_card_list_struct qeth_core_card_list; 822extern struct qeth_card_list_struct qeth_core_card_list;
829extern debug_info_t *qeth_dbf_setup; 823
830extern debug_info_t *qeth_dbf_data; 824extern struct qeth_dbf_info qeth_dbf[QETH_DBF_INFOS];
831extern debug_info_t *qeth_dbf_misc;
832extern debug_info_t *qeth_dbf_control;
833extern debug_info_t *qeth_dbf_trace;
834extern debug_info_t *qeth_dbf_sense;
835extern debug_info_t *qeth_dbf_qerr;
836 825
837void qeth_set_allowed_threads(struct qeth_card *, unsigned long , int); 826void qeth_set_allowed_threads(struct qeth_card *, unsigned long , int);
838int qeth_threads_running(struct qeth_card *, unsigned long); 827int qeth_threads_running(struct qeth_card *, unsigned long);
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index ce27c0f3c4d3..5cfe0ef7719a 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -26,38 +26,35 @@
26#include "qeth_core.h" 26#include "qeth_core.h"
27#include "qeth_core_offl.h" 27#include "qeth_core_offl.h"
28 28
29#define QETH_DBF_TEXT_(name, level, text...) \ 29static DEFINE_PER_CPU(char[256], qeth_core_dbf_txt_buf);
30 do { \ 30#define QETH_DBF_TXT_BUF qeth_core_dbf_txt_buf
31 if (qeth_dbf_passes(qeth_dbf_##name, level)) { \ 31
32 char *dbf_txt_buf = \ 32struct qeth_dbf_info qeth_dbf[QETH_DBF_INFOS] = {
33 get_cpu_var(qeth_core_dbf_txt_buf); \ 33 /* define dbf - Name, Pages, Areas, Maxlen, Level, View, Handle */
34 sprintf(dbf_txt_buf, text); \ 34 /* N P A M L V H */
35 debug_text_event(qeth_dbf_##name, level, dbf_txt_buf); \ 35 [QETH_DBF_SETUP] = {"qeth_setup",
36 put_cpu_var(qeth_core_dbf_txt_buf); \ 36 8, 1, 8, 5, &debug_hex_ascii_view, NULL},
37 } \ 37 [QETH_DBF_QERR] = {"qeth_qerr",
38 } while (0) 38 2, 1, 8, 2, &debug_hex_ascii_view, NULL},
39 [QETH_DBF_TRACE] = {"qeth_trace",
40 4, 1, 8, 3, &debug_hex_ascii_view, NULL},
41 [QETH_DBF_MSG] = {"qeth_msg",
42 8, 1, 128, 3, &debug_sprintf_view, NULL},
43 [QETH_DBF_SENSE] = {"qeth_sense",
44 2, 1, 64, 2, &debug_hex_ascii_view, NULL},
45 [QETH_DBF_MISC] = {"qeth_misc",
46 2, 1, 256, 2, &debug_hex_ascii_view, NULL},
47 [QETH_DBF_CTRL] = {"qeth_control",
48 8, 1, QETH_DBF_CTRL_LEN, 5, &debug_hex_ascii_view, NULL},
49};
50EXPORT_SYMBOL_GPL(qeth_dbf);
39 51
40struct qeth_card_list_struct qeth_core_card_list; 52struct qeth_card_list_struct qeth_core_card_list;
41EXPORT_SYMBOL_GPL(qeth_core_card_list); 53EXPORT_SYMBOL_GPL(qeth_core_card_list);
42debug_info_t *qeth_dbf_setup;
43EXPORT_SYMBOL_GPL(qeth_dbf_setup);
44debug_info_t *qeth_dbf_data;
45EXPORT_SYMBOL_GPL(qeth_dbf_data);
46debug_info_t *qeth_dbf_misc;
47EXPORT_SYMBOL_GPL(qeth_dbf_misc);
48debug_info_t *qeth_dbf_control;
49EXPORT_SYMBOL_GPL(qeth_dbf_control);
50debug_info_t *qeth_dbf_trace;
51EXPORT_SYMBOL_GPL(qeth_dbf_trace);
52debug_info_t *qeth_dbf_sense;
53EXPORT_SYMBOL_GPL(qeth_dbf_sense);
54debug_info_t *qeth_dbf_qerr;
55EXPORT_SYMBOL_GPL(qeth_dbf_qerr);
56 54
57static struct device *qeth_core_root_dev; 55static struct device *qeth_core_root_dev;
58static unsigned int known_devices[][10] = QETH_MODELLIST_ARRAY; 56static unsigned int known_devices[][10] = QETH_MODELLIST_ARRAY;
59static struct lock_class_key qdio_out_skb_queue_key; 57static struct lock_class_key qdio_out_skb_queue_key;
60static DEFINE_PER_CPU(char[256], qeth_core_dbf_txt_buf);
61 58
62static void qeth_send_control_data_cb(struct qeth_channel *, 59static void qeth_send_control_data_cb(struct qeth_channel *,
63 struct qeth_cmd_buffer *); 60 struct qeth_cmd_buffer *);
@@ -219,7 +216,7 @@ void qeth_clear_working_pool_list(struct qeth_card *card)
219{ 216{
220 struct qeth_buffer_pool_entry *pool_entry, *tmp; 217 struct qeth_buffer_pool_entry *pool_entry, *tmp;
221 218
222 QETH_DBF_TEXT(trace, 5, "clwrklst"); 219 QETH_DBF_TEXT(TRACE, 5, "clwrklst");
223 list_for_each_entry_safe(pool_entry, tmp, 220 list_for_each_entry_safe(pool_entry, tmp,
224 &card->qdio.in_buf_pool.entry_list, list){ 221 &card->qdio.in_buf_pool.entry_list, list){
225 list_del(&pool_entry->list); 222 list_del(&pool_entry->list);
@@ -233,7 +230,7 @@ static int qeth_alloc_buffer_pool(struct qeth_card *card)
233 void *ptr; 230 void *ptr;
234 int i, j; 231 int i, j;
235 232
236 QETH_DBF_TEXT(trace, 5, "alocpool"); 233 QETH_DBF_TEXT(TRACE, 5, "alocpool");
237 for (i = 0; i < card->qdio.init_pool.buf_count; ++i) { 234 for (i = 0; i < card->qdio.init_pool.buf_count; ++i) {
238 pool_entry = kmalloc(sizeof(*pool_entry), GFP_KERNEL); 235 pool_entry = kmalloc(sizeof(*pool_entry), GFP_KERNEL);
239 if (!pool_entry) { 236 if (!pool_entry) {
@@ -260,7 +257,7 @@ static int qeth_alloc_buffer_pool(struct qeth_card *card)
260 257
261int qeth_realloc_buffer_pool(struct qeth_card *card, int bufcnt) 258int qeth_realloc_buffer_pool(struct qeth_card *card, int bufcnt)
262{ 259{
263 QETH_DBF_TEXT(trace, 2, "realcbp"); 260 QETH_DBF_TEXT(TRACE, 2, "realcbp");
264 261
265 if ((card->state != CARD_STATE_DOWN) && 262 if ((card->state != CARD_STATE_DOWN) &&
266 (card->state != CARD_STATE_RECOVER)) 263 (card->state != CARD_STATE_RECOVER))
@@ -321,7 +318,7 @@ static int qeth_issue_next_read(struct qeth_card *card)
321 int rc; 318 int rc;
322 struct qeth_cmd_buffer *iob; 319 struct qeth_cmd_buffer *iob;
323 320
324 QETH_DBF_TEXT(trace, 5, "issnxrd"); 321 QETH_DBF_TEXT(TRACE, 5, "issnxrd");
325 if (card->read.state != CH_STATE_UP) 322 if (card->read.state != CH_STATE_UP)
326 return -EIO; 323 return -EIO;
327 iob = qeth_get_buffer(&card->read); 324 iob = qeth_get_buffer(&card->read);
@@ -330,7 +327,7 @@ static int qeth_issue_next_read(struct qeth_card *card)
330 return -ENOMEM; 327 return -ENOMEM;
331 } 328 }
332 qeth_setup_ccw(&card->read, iob->data, QETH_BUFSIZE); 329 qeth_setup_ccw(&card->read, iob->data, QETH_BUFSIZE);
333 QETH_DBF_TEXT(trace, 6, "noirqpnd"); 330 QETH_DBF_TEXT(TRACE, 6, "noirqpnd");
334 rc = ccw_device_start(card->read.ccwdev, &card->read.ccw, 331 rc = ccw_device_start(card->read.ccwdev, &card->read.ccw,
335 (addr_t) iob, 0, 0); 332 (addr_t) iob, 0, 0);
336 if (rc) { 333 if (rc) {
@@ -368,19 +365,19 @@ static void qeth_put_reply(struct qeth_reply *reply)
368 kfree(reply); 365 kfree(reply);
369} 366}
370 367
371static void qeth_issue_ipa_msg(struct qeth_ipa_cmd *cmd, 368static void qeth_issue_ipa_msg(struct qeth_ipa_cmd *cmd, int rc,
372 struct qeth_card *card) 369 struct qeth_card *card)
373{ 370{
374 int rc;
375 int com;
376 char *ipa_name; 371 char *ipa_name;
377 372 int com = cmd->hdr.command;
378 com = cmd->hdr.command;
379 rc = cmd->hdr.return_code;
380 ipa_name = qeth_get_ipa_cmd_name(com); 373 ipa_name = qeth_get_ipa_cmd_name(com);
381 374 if (rc)
382 PRINT_ERR("%s(x%X) for %s returned x%X \"%s\"\n", ipa_name, com, 375 QETH_DBF_MESSAGE(2, "IPA: %s(x%X) for %s returned x%X \"%s\"\n",
383 QETH_CARD_IFNAME(card), rc, qeth_get_ipa_msg(rc)); 376 ipa_name, com, QETH_CARD_IFNAME(card),
377 rc, qeth_get_ipa_msg(rc));
378 else
379 QETH_DBF_MESSAGE(5, "IPA: %s(x%X) for %s succeeded\n",
380 ipa_name, com, QETH_CARD_IFNAME(card));
384} 381}
385 382
386static struct qeth_ipa_cmd *qeth_check_ipa_data(struct qeth_card *card, 383static struct qeth_ipa_cmd *qeth_check_ipa_data(struct qeth_card *card,
@@ -388,14 +385,14 @@ static struct qeth_ipa_cmd *qeth_check_ipa_data(struct qeth_card *card,
388{ 385{
389 struct qeth_ipa_cmd *cmd = NULL; 386 struct qeth_ipa_cmd *cmd = NULL;
390 387
391 QETH_DBF_TEXT(trace, 5, "chkipad"); 388 QETH_DBF_TEXT(TRACE, 5, "chkipad");
392 if (IS_IPA(iob->data)) { 389 if (IS_IPA(iob->data)) {
393 cmd = (struct qeth_ipa_cmd *) PDU_ENCAPSULATION(iob->data); 390 cmd = (struct qeth_ipa_cmd *) PDU_ENCAPSULATION(iob->data);
394 if (IS_IPA_REPLY(cmd)) { 391 if (IS_IPA_REPLY(cmd)) {
395 if (cmd->hdr.return_code && 392 if (cmd->hdr.command < IPA_CMD_SETCCID ||
396 (cmd->hdr.command < IPA_CMD_SETCCID || 393 cmd->hdr.command > IPA_CMD_MODCCID)
397 cmd->hdr.command > IPA_CMD_MODCCID)) 394 qeth_issue_ipa_msg(cmd,
398 qeth_issue_ipa_msg(cmd, card); 395 cmd->hdr.return_code, card);
399 return cmd; 396 return cmd;
400 } else { 397 } else {
401 switch (cmd->hdr.command) { 398 switch (cmd->hdr.command) {
@@ -423,10 +420,10 @@ static struct qeth_ipa_cmd *qeth_check_ipa_data(struct qeth_card *card,
423 case IPA_CMD_MODCCID: 420 case IPA_CMD_MODCCID:
424 return cmd; 421 return cmd;
425 case IPA_CMD_REGISTER_LOCAL_ADDR: 422 case IPA_CMD_REGISTER_LOCAL_ADDR:
426 QETH_DBF_TEXT(trace, 3, "irla"); 423 QETH_DBF_TEXT(TRACE, 3, "irla");
427 break; 424 break;
428 case IPA_CMD_UNREGISTER_LOCAL_ADDR: 425 case IPA_CMD_UNREGISTER_LOCAL_ADDR:
429 QETH_DBF_TEXT(trace, 3, "urla"); 426 QETH_DBF_TEXT(TRACE, 3, "urla");
430 break; 427 break;
431 default: 428 default:
432 PRINT_WARN("Received data is IPA " 429 PRINT_WARN("Received data is IPA "
@@ -443,7 +440,7 @@ void qeth_clear_ipacmd_list(struct qeth_card *card)
443 struct qeth_reply *reply, *r; 440 struct qeth_reply *reply, *r;
444 unsigned long flags; 441 unsigned long flags;
445 442
446 QETH_DBF_TEXT(trace, 4, "clipalst"); 443 QETH_DBF_TEXT(TRACE, 4, "clipalst");
447 444
448 spin_lock_irqsave(&card->lock, flags); 445 spin_lock_irqsave(&card->lock, flags);
449 list_for_each_entry_safe(reply, r, &card->cmd_waiter_list, list) { 446 list_for_each_entry_safe(reply, r, &card->cmd_waiter_list, list) {
@@ -463,16 +460,16 @@ static int qeth_check_idx_response(unsigned char *buffer)
463 if (!buffer) 460 if (!buffer)
464 return 0; 461 return 0;
465 462
466 QETH_DBF_HEX(control, 2, buffer, QETH_DBF_CONTROL_LEN); 463 QETH_DBF_HEX(CTRL, 2, buffer, QETH_DBF_CTRL_LEN);
467 if ((buffer[2] & 0xc0) == 0xc0) { 464 if ((buffer[2] & 0xc0) == 0xc0) {
468 PRINT_WARN("received an IDX TERMINATE " 465 PRINT_WARN("received an IDX TERMINATE "
469 "with cause code 0x%02x%s\n", 466 "with cause code 0x%02x%s\n",
470 buffer[4], 467 buffer[4],
471 ((buffer[4] == 0x22) ? 468 ((buffer[4] == 0x22) ?
472 " -- try another portname" : "")); 469 " -- try another portname" : ""));
473 QETH_DBF_TEXT(trace, 2, "ckidxres"); 470 QETH_DBF_TEXT(TRACE, 2, "ckidxres");
474 QETH_DBF_TEXT(trace, 2, " idxterm"); 471 QETH_DBF_TEXT(TRACE, 2, " idxterm");
475 QETH_DBF_TEXT_(trace, 2, " rc%d", -EIO); 472 QETH_DBF_TEXT_(TRACE, 2, " rc%d", -EIO);
476 return -EIO; 473 return -EIO;
477 } 474 }
478 return 0; 475 return 0;
@@ -483,7 +480,7 @@ static void qeth_setup_ccw(struct qeth_channel *channel, unsigned char *iob,
483{ 480{
484 struct qeth_card *card; 481 struct qeth_card *card;
485 482
486 QETH_DBF_TEXT(trace, 4, "setupccw"); 483 QETH_DBF_TEXT(TRACE, 4, "setupccw");
487 card = CARD_FROM_CDEV(channel->ccwdev); 484 card = CARD_FROM_CDEV(channel->ccwdev);
488 if (channel == &card->read) 485 if (channel == &card->read)
489 memcpy(&channel->ccw, READ_CCW, sizeof(struct ccw1)); 486 memcpy(&channel->ccw, READ_CCW, sizeof(struct ccw1));
@@ -497,7 +494,7 @@ static struct qeth_cmd_buffer *__qeth_get_buffer(struct qeth_channel *channel)
497{ 494{
498 __u8 index; 495 __u8 index;
499 496
500 QETH_DBF_TEXT(trace, 6, "getbuff"); 497 QETH_DBF_TEXT(TRACE, 6, "getbuff");
501 index = channel->io_buf_no; 498 index = channel->io_buf_no;
502 do { 499 do {
503 if (channel->iob[index].state == BUF_STATE_FREE) { 500 if (channel->iob[index].state == BUF_STATE_FREE) {
@@ -518,7 +515,7 @@ void qeth_release_buffer(struct qeth_channel *channel,
518{ 515{
519 unsigned long flags; 516 unsigned long flags;
520 517
521 QETH_DBF_TEXT(trace, 6, "relbuff"); 518 QETH_DBF_TEXT(TRACE, 6, "relbuff");
522 spin_lock_irqsave(&channel->iob_lock, flags); 519 spin_lock_irqsave(&channel->iob_lock, flags);
523 memset(iob->data, 0, QETH_BUFSIZE); 520 memset(iob->data, 0, QETH_BUFSIZE);
524 iob->state = BUF_STATE_FREE; 521 iob->state = BUF_STATE_FREE;
@@ -568,7 +565,7 @@ static void qeth_send_control_data_cb(struct qeth_channel *channel,
568 unsigned long flags; 565 unsigned long flags;
569 int keep_reply; 566 int keep_reply;
570 567
571 QETH_DBF_TEXT(trace, 4, "sndctlcb"); 568 QETH_DBF_TEXT(TRACE, 4, "sndctlcb");
572 569
573 card = CARD_FROM_CDEV(channel->ccwdev); 570 card = CARD_FROM_CDEV(channel->ccwdev);
574 if (qeth_check_idx_response(iob->data)) { 571 if (qeth_check_idx_response(iob->data)) {
@@ -638,7 +635,7 @@ static int qeth_setup_channel(struct qeth_channel *channel)
638{ 635{
639 int cnt; 636 int cnt;
640 637
641 QETH_DBF_TEXT(setup, 2, "setupch"); 638 QETH_DBF_TEXT(SETUP, 2, "setupch");
642 for (cnt = 0; cnt < QETH_CMD_BUFFER_NO; cnt++) { 639 for (cnt = 0; cnt < QETH_CMD_BUFFER_NO; cnt++) {
643 channel->iob[cnt].data = (char *) 640 channel->iob[cnt].data = (char *)
644 kmalloc(QETH_BUFSIZE, GFP_DMA|GFP_KERNEL); 641 kmalloc(QETH_BUFSIZE, GFP_DMA|GFP_KERNEL);
@@ -732,7 +729,7 @@ EXPORT_SYMBOL_GPL(qeth_do_run_thread);
732 729
733void qeth_schedule_recovery(struct qeth_card *card) 730void qeth_schedule_recovery(struct qeth_card *card)
734{ 731{
735 QETH_DBF_TEXT(trace, 2, "startrec"); 732 QETH_DBF_TEXT(TRACE, 2, "startrec");
736 if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0) 733 if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0)
737 schedule_work(&card->kernel_thread_starter); 734 schedule_work(&card->kernel_thread_starter);
738} 735}
@@ -750,7 +747,7 @@ static int qeth_get_problem(struct ccw_device *cdev, struct irb *irb)
750 if (cstat & (SCHN_STAT_CHN_CTRL_CHK | SCHN_STAT_INTF_CTRL_CHK | 747 if (cstat & (SCHN_STAT_CHN_CTRL_CHK | SCHN_STAT_INTF_CTRL_CHK |
751 SCHN_STAT_CHN_DATA_CHK | SCHN_STAT_CHAIN_CHECK | 748 SCHN_STAT_CHN_DATA_CHK | SCHN_STAT_CHAIN_CHECK |
752 SCHN_STAT_PROT_CHECK | SCHN_STAT_PROG_CHECK)) { 749 SCHN_STAT_PROT_CHECK | SCHN_STAT_PROG_CHECK)) {
753 QETH_DBF_TEXT(trace, 2, "CGENCHK"); 750 QETH_DBF_TEXT(TRACE, 2, "CGENCHK");
754 PRINT_WARN("check on device %s, dstat=x%x, cstat=x%x ", 751 PRINT_WARN("check on device %s, dstat=x%x, cstat=x%x ",
755 cdev->dev.bus_id, dstat, cstat); 752 cdev->dev.bus_id, dstat, cstat);
756 print_hex_dump(KERN_WARNING, "qeth: irb ", DUMP_PREFIX_OFFSET, 753 print_hex_dump(KERN_WARNING, "qeth: irb ", DUMP_PREFIX_OFFSET,
@@ -761,23 +758,23 @@ static int qeth_get_problem(struct ccw_device *cdev, struct irb *irb)
761 if (dstat & DEV_STAT_UNIT_CHECK) { 758 if (dstat & DEV_STAT_UNIT_CHECK) {
762 if (sense[SENSE_RESETTING_EVENT_BYTE] & 759 if (sense[SENSE_RESETTING_EVENT_BYTE] &
763 SENSE_RESETTING_EVENT_FLAG) { 760 SENSE_RESETTING_EVENT_FLAG) {
764 QETH_DBF_TEXT(trace, 2, "REVIND"); 761 QETH_DBF_TEXT(TRACE, 2, "REVIND");
765 return 1; 762 return 1;
766 } 763 }
767 if (sense[SENSE_COMMAND_REJECT_BYTE] & 764 if (sense[SENSE_COMMAND_REJECT_BYTE] &
768 SENSE_COMMAND_REJECT_FLAG) { 765 SENSE_COMMAND_REJECT_FLAG) {
769 QETH_DBF_TEXT(trace, 2, "CMDREJi"); 766 QETH_DBF_TEXT(TRACE, 2, "CMDREJi");
770 return 0; 767 return 0;
771 } 768 }
772 if ((sense[2] == 0xaf) && (sense[3] == 0xfe)) { 769 if ((sense[2] == 0xaf) && (sense[3] == 0xfe)) {
773 QETH_DBF_TEXT(trace, 2, "AFFE"); 770 QETH_DBF_TEXT(TRACE, 2, "AFFE");
774 return 1; 771 return 1;
775 } 772 }
776 if ((!sense[0]) && (!sense[1]) && (!sense[2]) && (!sense[3])) { 773 if ((!sense[0]) && (!sense[1]) && (!sense[2]) && (!sense[3])) {
777 QETH_DBF_TEXT(trace, 2, "ZEROSEN"); 774 QETH_DBF_TEXT(TRACE, 2, "ZEROSEN");
778 return 0; 775 return 0;
779 } 776 }
780 QETH_DBF_TEXT(trace, 2, "DGENCHK"); 777 QETH_DBF_TEXT(TRACE, 2, "DGENCHK");
781 return 1; 778 return 1;
782 } 779 }
783 return 0; 780 return 0;
@@ -792,13 +789,13 @@ static long __qeth_check_irb_error(struct ccw_device *cdev,
792 switch (PTR_ERR(irb)) { 789 switch (PTR_ERR(irb)) {
793 case -EIO: 790 case -EIO:
794 PRINT_WARN("i/o-error on device %s\n", cdev->dev.bus_id); 791 PRINT_WARN("i/o-error on device %s\n", cdev->dev.bus_id);
795 QETH_DBF_TEXT(trace, 2, "ckirberr"); 792 QETH_DBF_TEXT(TRACE, 2, "ckirberr");
796 QETH_DBF_TEXT_(trace, 2, " rc%d", -EIO); 793 QETH_DBF_TEXT_(TRACE, 2, " rc%d", -EIO);
797 break; 794 break;
798 case -ETIMEDOUT: 795 case -ETIMEDOUT:
799 PRINT_WARN("timeout on device %s\n", cdev->dev.bus_id); 796 PRINT_WARN("timeout on device %s\n", cdev->dev.bus_id);
800 QETH_DBF_TEXT(trace, 2, "ckirberr"); 797 QETH_DBF_TEXT(TRACE, 2, "ckirberr");
801 QETH_DBF_TEXT_(trace, 2, " rc%d", -ETIMEDOUT); 798 QETH_DBF_TEXT_(TRACE, 2, " rc%d", -ETIMEDOUT);
802 if (intparm == QETH_RCD_PARM) { 799 if (intparm == QETH_RCD_PARM) {
803 struct qeth_card *card = CARD_FROM_CDEV(cdev); 800 struct qeth_card *card = CARD_FROM_CDEV(cdev);
804 801
@@ -811,8 +808,8 @@ static long __qeth_check_irb_error(struct ccw_device *cdev,
811 default: 808 default:
812 PRINT_WARN("unknown error %ld on device %s\n", PTR_ERR(irb), 809 PRINT_WARN("unknown error %ld on device %s\n", PTR_ERR(irb),
813 cdev->dev.bus_id); 810 cdev->dev.bus_id);
814 QETH_DBF_TEXT(trace, 2, "ckirberr"); 811 QETH_DBF_TEXT(TRACE, 2, "ckirberr");
815 QETH_DBF_TEXT(trace, 2, " rc???"); 812 QETH_DBF_TEXT(TRACE, 2, " rc???");
816 } 813 }
817 return PTR_ERR(irb); 814 return PTR_ERR(irb);
818} 815}
@@ -828,7 +825,7 @@ static void qeth_irq(struct ccw_device *cdev, unsigned long intparm,
828 struct qeth_cmd_buffer *iob; 825 struct qeth_cmd_buffer *iob;
829 __u8 index; 826 __u8 index;
830 827
831 QETH_DBF_TEXT(trace, 5, "irq"); 828 QETH_DBF_TEXT(TRACE, 5, "irq");
832 829
833 if (__qeth_check_irb_error(cdev, intparm, irb)) 830 if (__qeth_check_irb_error(cdev, intparm, irb))
834 return; 831 return;
@@ -841,13 +838,13 @@ static void qeth_irq(struct ccw_device *cdev, unsigned long intparm,
841 838
842 if (card->read.ccwdev == cdev) { 839 if (card->read.ccwdev == cdev) {
843 channel = &card->read; 840 channel = &card->read;
844 QETH_DBF_TEXT(trace, 5, "read"); 841 QETH_DBF_TEXT(TRACE, 5, "read");
845 } else if (card->write.ccwdev == cdev) { 842 } else if (card->write.ccwdev == cdev) {
846 channel = &card->write; 843 channel = &card->write;
847 QETH_DBF_TEXT(trace, 5, "write"); 844 QETH_DBF_TEXT(TRACE, 5, "write");
848 } else { 845 } else {
849 channel = &card->data; 846 channel = &card->data;
850 QETH_DBF_TEXT(trace, 5, "data"); 847 QETH_DBF_TEXT(TRACE, 5, "data");
851 } 848 }
852 atomic_set(&channel->irq_pending, 0); 849 atomic_set(&channel->irq_pending, 0);
853 850
@@ -863,12 +860,12 @@ static void qeth_irq(struct ccw_device *cdev, unsigned long intparm,
863 goto out; 860 goto out;
864 861
865 if (intparm == QETH_CLEAR_CHANNEL_PARM) { 862 if (intparm == QETH_CLEAR_CHANNEL_PARM) {
866 QETH_DBF_TEXT(trace, 6, "clrchpar"); 863 QETH_DBF_TEXT(TRACE, 6, "clrchpar");
867 /* we don't have to handle this further */ 864 /* we don't have to handle this further */
868 intparm = 0; 865 intparm = 0;
869 } 866 }
870 if (intparm == QETH_HALT_CHANNEL_PARM) { 867 if (intparm == QETH_HALT_CHANNEL_PARM) {
871 QETH_DBF_TEXT(trace, 6, "hltchpar"); 868 QETH_DBF_TEXT(TRACE, 6, "hltchpar");
872 /* we don't have to handle this further */ 869 /* we don't have to handle this further */
873 intparm = 0; 870 intparm = 0;
874 } 871 }
@@ -954,7 +951,7 @@ void qeth_clear_qdio_buffers(struct qeth_card *card)
954{ 951{
955 int i, j; 952 int i, j;
956 953
957 QETH_DBF_TEXT(trace, 2, "clearqdbf"); 954 QETH_DBF_TEXT(TRACE, 2, "clearqdbf");
958 /* clear outbound buffers to free skbs */ 955 /* clear outbound buffers to free skbs */
959 for (i = 0; i < card->qdio.no_out_queues; ++i) 956 for (i = 0; i < card->qdio.no_out_queues; ++i)
960 if (card->qdio.out_qs[i]) { 957 if (card->qdio.out_qs[i]) {
@@ -969,7 +966,7 @@ static void qeth_free_buffer_pool(struct qeth_card *card)
969{ 966{
970 struct qeth_buffer_pool_entry *pool_entry, *tmp; 967 struct qeth_buffer_pool_entry *pool_entry, *tmp;
971 int i = 0; 968 int i = 0;
972 QETH_DBF_TEXT(trace, 5, "freepool"); 969 QETH_DBF_TEXT(TRACE, 5, "freepool");
973 list_for_each_entry_safe(pool_entry, tmp, 970 list_for_each_entry_safe(pool_entry, tmp,
974 &card->qdio.init_pool.entry_list, init_list){ 971 &card->qdio.init_pool.entry_list, init_list){
975 for (i = 0; i < QETH_MAX_BUFFER_ELEMENTS(card); ++i) 972 for (i = 0; i < QETH_MAX_BUFFER_ELEMENTS(card); ++i)
@@ -983,7 +980,7 @@ static void qeth_free_qdio_buffers(struct qeth_card *card)
983{ 980{
984 int i, j; 981 int i, j;
985 982
986 QETH_DBF_TEXT(trace, 2, "freeqdbf"); 983 QETH_DBF_TEXT(TRACE, 2, "freeqdbf");
987 if (atomic_xchg(&card->qdio.state, QETH_QDIO_UNINITIALIZED) == 984 if (atomic_xchg(&card->qdio.state, QETH_QDIO_UNINITIALIZED) ==
988 QETH_QDIO_UNINITIALIZED) 985 QETH_QDIO_UNINITIALIZED)
989 return; 986 return;
@@ -1008,7 +1005,7 @@ static void qeth_clean_channel(struct qeth_channel *channel)
1008{ 1005{
1009 int cnt; 1006 int cnt;
1010 1007
1011 QETH_DBF_TEXT(setup, 2, "freech"); 1008 QETH_DBF_TEXT(SETUP, 2, "freech");
1012 for (cnt = 0; cnt < QETH_CMD_BUFFER_NO; cnt++) 1009 for (cnt = 0; cnt < QETH_CMD_BUFFER_NO; cnt++)
1013 kfree(channel->iob[cnt].data); 1010 kfree(channel->iob[cnt].data);
1014} 1011}
@@ -1028,7 +1025,7 @@ static int qeth_is_1920_device(struct qeth_card *card)
1028 u8 chpp; 1025 u8 chpp;
1029 } *chp_dsc; 1026 } *chp_dsc;
1030 1027
1031 QETH_DBF_TEXT(setup, 2, "chk_1920"); 1028 QETH_DBF_TEXT(SETUP, 2, "chk_1920");
1032 1029
1033 ccwdev = card->data.ccwdev; 1030 ccwdev = card->data.ccwdev;
1034 chp_dsc = (struct channelPath_dsc *)ccw_device_get_chp_desc(ccwdev, 0); 1031 chp_dsc = (struct channelPath_dsc *)ccw_device_get_chp_desc(ccwdev, 0);
@@ -1037,13 +1034,13 @@ static int qeth_is_1920_device(struct qeth_card *card)
1037 single_queue = ((chp_dsc->chpp & 0x02) == 0x02); 1034 single_queue = ((chp_dsc->chpp & 0x02) == 0x02);
1038 kfree(chp_dsc); 1035 kfree(chp_dsc);
1039 } 1036 }
1040 QETH_DBF_TEXT_(setup, 2, "rc:%x", single_queue); 1037 QETH_DBF_TEXT_(SETUP, 2, "rc:%x", single_queue);
1041 return single_queue; 1038 return single_queue;
1042} 1039}
1043 1040
1044static void qeth_init_qdio_info(struct qeth_card *card) 1041static void qeth_init_qdio_info(struct qeth_card *card)
1045{ 1042{
1046 QETH_DBF_TEXT(setup, 4, "intqdinf"); 1043 QETH_DBF_TEXT(SETUP, 4, "intqdinf");
1047 atomic_set(&card->qdio.state, QETH_QDIO_UNINITIALIZED); 1044 atomic_set(&card->qdio.state, QETH_QDIO_UNINITIALIZED);
1048 /* inbound */ 1045 /* inbound */
1049 card->qdio.in_buf_size = QETH_IN_BUF_SIZE_DEFAULT; 1046 card->qdio.in_buf_size = QETH_IN_BUF_SIZE_DEFAULT;
@@ -1073,7 +1070,7 @@ static int qeth_do_start_thread(struct qeth_card *card, unsigned long thread)
1073 int rc = 0; 1070 int rc = 0;
1074 1071
1075 spin_lock_irqsave(&card->thread_mask_lock, flags); 1072 spin_lock_irqsave(&card->thread_mask_lock, flags);
1076 QETH_DBF_TEXT_(trace, 4, " %02x%02x%02x", 1073 QETH_DBF_TEXT_(TRACE, 4, " %02x%02x%02x",
1077 (u8) card->thread_start_mask, 1074 (u8) card->thread_start_mask,
1078 (u8) card->thread_allowed_mask, 1075 (u8) card->thread_allowed_mask,
1079 (u8) card->thread_running_mask); 1076 (u8) card->thread_running_mask);
@@ -1086,7 +1083,7 @@ static void qeth_start_kernel_thread(struct work_struct *work)
1086{ 1083{
1087 struct qeth_card *card = container_of(work, struct qeth_card, 1084 struct qeth_card *card = container_of(work, struct qeth_card,
1088 kernel_thread_starter); 1085 kernel_thread_starter);
1089 QETH_DBF_TEXT(trace , 2, "strthrd"); 1086 QETH_DBF_TEXT(TRACE , 2, "strthrd");
1090 1087
1091 if (card->read.state != CH_STATE_UP && 1088 if (card->read.state != CH_STATE_UP &&
1092 card->write.state != CH_STATE_UP) 1089 card->write.state != CH_STATE_UP)
@@ -1099,8 +1096,8 @@ static void qeth_start_kernel_thread(struct work_struct *work)
1099static int qeth_setup_card(struct qeth_card *card) 1096static int qeth_setup_card(struct qeth_card *card)
1100{ 1097{
1101 1098
1102 QETH_DBF_TEXT(setup, 2, "setupcrd"); 1099 QETH_DBF_TEXT(SETUP, 2, "setupcrd");
1103 QETH_DBF_HEX(setup, 2, &card, sizeof(void *)); 1100 QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
1104 1101
1105 card->read.state = CH_STATE_DOWN; 1102 card->read.state = CH_STATE_DOWN;
1106 card->write.state = CH_STATE_DOWN; 1103 card->write.state = CH_STATE_DOWN;
@@ -1122,7 +1119,7 @@ static int qeth_setup_card(struct qeth_card *card)
1122 INIT_LIST_HEAD(&card->ip_list); 1119 INIT_LIST_HEAD(&card->ip_list);
1123 card->ip_tbd_list = kmalloc(sizeof(struct list_head), GFP_KERNEL); 1120 card->ip_tbd_list = kmalloc(sizeof(struct list_head), GFP_KERNEL);
1124 if (!card->ip_tbd_list) { 1121 if (!card->ip_tbd_list) {
1125 QETH_DBF_TEXT(setup, 0, "iptbdnom"); 1122 QETH_DBF_TEXT(SETUP, 0, "iptbdnom");
1126 return -ENOMEM; 1123 return -ENOMEM;
1127 } 1124 }
1128 INIT_LIST_HEAD(card->ip_tbd_list); 1125 INIT_LIST_HEAD(card->ip_tbd_list);
@@ -1144,11 +1141,11 @@ static struct qeth_card *qeth_alloc_card(void)
1144{ 1141{
1145 struct qeth_card *card; 1142 struct qeth_card *card;
1146 1143
1147 QETH_DBF_TEXT(setup, 2, "alloccrd"); 1144 QETH_DBF_TEXT(SETUP, 2, "alloccrd");
1148 card = kzalloc(sizeof(struct qeth_card), GFP_DMA|GFP_KERNEL); 1145 card = kzalloc(sizeof(struct qeth_card), GFP_DMA|GFP_KERNEL);
1149 if (!card) 1146 if (!card)
1150 return NULL; 1147 return NULL;
1151 QETH_DBF_HEX(setup, 2, &card, sizeof(void *)); 1148 QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
1152 if (qeth_setup_channel(&card->read)) { 1149 if (qeth_setup_channel(&card->read)) {
1153 kfree(card); 1150 kfree(card);
1154 return NULL; 1151 return NULL;
@@ -1166,7 +1163,7 @@ static int qeth_determine_card_type(struct qeth_card *card)
1166{ 1163{
1167 int i = 0; 1164 int i = 0;
1168 1165
1169 QETH_DBF_TEXT(setup, 2, "detcdtyp"); 1166 QETH_DBF_TEXT(SETUP, 2, "detcdtyp");
1170 1167
1171 card->qdio.do_prio_queueing = QETH_PRIOQ_DEFAULT; 1168 card->qdio.do_prio_queueing = QETH_PRIOQ_DEFAULT;
1172 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE; 1169 card->qdio.default_out_queue = QETH_DEFAULT_QUEUE;
@@ -1197,7 +1194,7 @@ static int qeth_clear_channel(struct qeth_channel *channel)
1197 struct qeth_card *card; 1194 struct qeth_card *card;
1198 int rc; 1195 int rc;
1199 1196
1200 QETH_DBF_TEXT(trace, 3, "clearch"); 1197 QETH_DBF_TEXT(TRACE, 3, "clearch");
1201 card = CARD_FROM_CDEV(channel->ccwdev); 1198 card = CARD_FROM_CDEV(channel->ccwdev);
1202 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); 1199 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);
1203 rc = ccw_device_clear(channel->ccwdev, QETH_CLEAR_CHANNEL_PARM); 1200 rc = ccw_device_clear(channel->ccwdev, QETH_CLEAR_CHANNEL_PARM);
@@ -1221,7 +1218,7 @@ static int qeth_halt_channel(struct qeth_channel *channel)
1221 struct qeth_card *card; 1218 struct qeth_card *card;
1222 int rc; 1219 int rc;
1223 1220
1224 QETH_DBF_TEXT(trace, 3, "haltch"); 1221 QETH_DBF_TEXT(TRACE, 3, "haltch");
1225 card = CARD_FROM_CDEV(channel->ccwdev); 1222 card = CARD_FROM_CDEV(channel->ccwdev);
1226 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); 1223 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);
1227 rc = ccw_device_halt(channel->ccwdev, QETH_HALT_CHANNEL_PARM); 1224 rc = ccw_device_halt(channel->ccwdev, QETH_HALT_CHANNEL_PARM);
@@ -1242,7 +1239,7 @@ static int qeth_halt_channels(struct qeth_card *card)
1242{ 1239{
1243 int rc1 = 0, rc2 = 0, rc3 = 0; 1240 int rc1 = 0, rc2 = 0, rc3 = 0;
1244 1241
1245 QETH_DBF_TEXT(trace, 3, "haltchs"); 1242 QETH_DBF_TEXT(TRACE, 3, "haltchs");
1246 rc1 = qeth_halt_channel(&card->read); 1243 rc1 = qeth_halt_channel(&card->read);
1247 rc2 = qeth_halt_channel(&card->write); 1244 rc2 = qeth_halt_channel(&card->write);
1248 rc3 = qeth_halt_channel(&card->data); 1245 rc3 = qeth_halt_channel(&card->data);
@@ -1257,7 +1254,7 @@ static int qeth_clear_channels(struct qeth_card *card)
1257{ 1254{
1258 int rc1 = 0, rc2 = 0, rc3 = 0; 1255 int rc1 = 0, rc2 = 0, rc3 = 0;
1259 1256
1260 QETH_DBF_TEXT(trace, 3, "clearchs"); 1257 QETH_DBF_TEXT(TRACE, 3, "clearchs");
1261 rc1 = qeth_clear_channel(&card->read); 1258 rc1 = qeth_clear_channel(&card->read);
1262 rc2 = qeth_clear_channel(&card->write); 1259 rc2 = qeth_clear_channel(&card->write);
1263 rc3 = qeth_clear_channel(&card->data); 1260 rc3 = qeth_clear_channel(&card->data);
@@ -1272,8 +1269,8 @@ static int qeth_clear_halt_card(struct qeth_card *card, int halt)
1272{ 1269{
1273 int rc = 0; 1270 int rc = 0;
1274 1271
1275 QETH_DBF_TEXT(trace, 3, "clhacrd"); 1272 QETH_DBF_TEXT(TRACE, 3, "clhacrd");
1276 QETH_DBF_HEX(trace, 3, &card, sizeof(void *)); 1273 QETH_DBF_HEX(TRACE, 3, &card, sizeof(void *));
1277 1274
1278 if (halt) 1275 if (halt)
1279 rc = qeth_halt_channels(card); 1276 rc = qeth_halt_channels(card);
@@ -1286,7 +1283,7 @@ int qeth_qdio_clear_card(struct qeth_card *card, int use_halt)
1286{ 1283{
1287 int rc = 0; 1284 int rc = 0;
1288 1285
1289 QETH_DBF_TEXT(trace, 3, "qdioclr"); 1286 QETH_DBF_TEXT(TRACE, 3, "qdioclr");
1290 switch (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_ESTABLISHED, 1287 switch (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_ESTABLISHED,
1291 QETH_QDIO_CLEANING)) { 1288 QETH_QDIO_CLEANING)) {
1292 case QETH_QDIO_ESTABLISHED: 1289 case QETH_QDIO_ESTABLISHED:
@@ -1297,7 +1294,7 @@ int qeth_qdio_clear_card(struct qeth_card *card, int use_halt)
1297 rc = qdio_cleanup(CARD_DDEV(card), 1294 rc = qdio_cleanup(CARD_DDEV(card),
1298 QDIO_FLAG_CLEANUP_USING_CLEAR); 1295 QDIO_FLAG_CLEANUP_USING_CLEAR);
1299 if (rc) 1296 if (rc)
1300 QETH_DBF_TEXT_(trace, 3, "1err%d", rc); 1297 QETH_DBF_TEXT_(TRACE, 3, "1err%d", rc);
1301 atomic_set(&card->qdio.state, QETH_QDIO_ALLOCATED); 1298 atomic_set(&card->qdio.state, QETH_QDIO_ALLOCATED);
1302 break; 1299 break;
1303 case QETH_QDIO_CLEANING: 1300 case QETH_QDIO_CLEANING:
@@ -1307,7 +1304,7 @@ int qeth_qdio_clear_card(struct qeth_card *card, int use_halt)
1307 } 1304 }
1308 rc = qeth_clear_halt_card(card, use_halt); 1305 rc = qeth_clear_halt_card(card, use_halt);
1309 if (rc) 1306 if (rc)
1310 QETH_DBF_TEXT_(trace, 3, "2err%d", rc); 1307 QETH_DBF_TEXT_(TRACE, 3, "2err%d", rc);
1311 card->state = CARD_STATE_DOWN; 1308 card->state = CARD_STATE_DOWN;
1312 return rc; 1309 return rc;
1313} 1310}
@@ -1367,7 +1364,7 @@ static int qeth_get_unitaddr(struct qeth_card *card)
1367 char *prcd; 1364 char *prcd;
1368 int rc; 1365 int rc;
1369 1366
1370 QETH_DBF_TEXT(setup, 2, "getunit"); 1367 QETH_DBF_TEXT(SETUP, 2, "getunit");
1371 rc = qeth_read_conf_data(card, (void **) &prcd, &length); 1368 rc = qeth_read_conf_data(card, (void **) &prcd, &length);
1372 if (rc) { 1369 if (rc) {
1373 PRINT_ERR("qeth_read_conf_data for device %s returned %i\n", 1370 PRINT_ERR("qeth_read_conf_data for device %s returned %i\n",
@@ -1428,7 +1425,7 @@ static int qeth_idx_activate_get_answer(struct qeth_channel *channel,
1428 int rc; 1425 int rc;
1429 struct qeth_card *card; 1426 struct qeth_card *card;
1430 1427
1431 QETH_DBF_TEXT(setup, 2, "idxanswr"); 1428 QETH_DBF_TEXT(SETUP, 2, "idxanswr");
1432 card = CARD_FROM_CDEV(channel->ccwdev); 1429 card = CARD_FROM_CDEV(channel->ccwdev);
1433 iob = qeth_get_buffer(channel); 1430 iob = qeth_get_buffer(channel);
1434 iob->callback = idx_reply_cb; 1431 iob->callback = idx_reply_cb;
@@ -1438,7 +1435,7 @@ static int qeth_idx_activate_get_answer(struct qeth_channel *channel,
1438 1435
1439 wait_event(card->wait_q, 1436 wait_event(card->wait_q,
1440 atomic_cmpxchg(&channel->irq_pending, 0, 1) == 0); 1437 atomic_cmpxchg(&channel->irq_pending, 0, 1) == 0);
1441 QETH_DBF_TEXT(setup, 6, "noirqpnd"); 1438 QETH_DBF_TEXT(SETUP, 6, "noirqpnd");
1442 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); 1439 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);
1443 rc = ccw_device_start(channel->ccwdev, 1440 rc = ccw_device_start(channel->ccwdev,
1444 &channel->ccw, (addr_t) iob, 0, 0); 1441 &channel->ccw, (addr_t) iob, 0, 0);
@@ -1446,7 +1443,7 @@ static int qeth_idx_activate_get_answer(struct qeth_channel *channel,
1446 1443
1447 if (rc) { 1444 if (rc) {
1448 PRINT_ERR("Error2 in activating channel rc=%d\n", rc); 1445 PRINT_ERR("Error2 in activating channel rc=%d\n", rc);
1449 QETH_DBF_TEXT_(setup, 2, "2err%d", rc); 1446 QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
1450 atomic_set(&channel->irq_pending, 0); 1447 atomic_set(&channel->irq_pending, 0);
1451 wake_up(&card->wait_q); 1448 wake_up(&card->wait_q);
1452 return rc; 1449 return rc;
@@ -1457,7 +1454,7 @@ static int qeth_idx_activate_get_answer(struct qeth_channel *channel,
1457 return rc; 1454 return rc;
1458 if (channel->state != CH_STATE_UP) { 1455 if (channel->state != CH_STATE_UP) {
1459 rc = -ETIME; 1456 rc = -ETIME;
1460 QETH_DBF_TEXT_(setup, 2, "3err%d", rc); 1457 QETH_DBF_TEXT_(SETUP, 2, "3err%d", rc);
1461 qeth_clear_cmd_buffers(channel); 1458 qeth_clear_cmd_buffers(channel);
1462 } else 1459 } else
1463 rc = 0; 1460 rc = 0;
@@ -1477,7 +1474,7 @@ static int qeth_idx_activate_channel(struct qeth_channel *channel,
1477 1474
1478 card = CARD_FROM_CDEV(channel->ccwdev); 1475 card = CARD_FROM_CDEV(channel->ccwdev);
1479 1476
1480 QETH_DBF_TEXT(setup, 2, "idxactch"); 1477 QETH_DBF_TEXT(SETUP, 2, "idxactch");
1481 1478
1482 iob = qeth_get_buffer(channel); 1479 iob = qeth_get_buffer(channel);
1483 iob->callback = idx_reply_cb; 1480 iob->callback = idx_reply_cb;
@@ -1507,7 +1504,7 @@ static int qeth_idx_activate_channel(struct qeth_channel *channel,
1507 1504
1508 wait_event(card->wait_q, 1505 wait_event(card->wait_q,
1509 atomic_cmpxchg(&channel->irq_pending, 0, 1) == 0); 1506 atomic_cmpxchg(&channel->irq_pending, 0, 1) == 0);
1510 QETH_DBF_TEXT(setup, 6, "noirqpnd"); 1507 QETH_DBF_TEXT(SETUP, 6, "noirqpnd");
1511 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); 1508 spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags);
1512 rc = ccw_device_start(channel->ccwdev, 1509 rc = ccw_device_start(channel->ccwdev,
1513 &channel->ccw, (addr_t) iob, 0, 0); 1510 &channel->ccw, (addr_t) iob, 0, 0);
@@ -1515,7 +1512,7 @@ static int qeth_idx_activate_channel(struct qeth_channel *channel,
1515 1512
1516 if (rc) { 1513 if (rc) {
1517 PRINT_ERR("Error1 in activating channel. rc=%d\n", rc); 1514 PRINT_ERR("Error1 in activating channel. rc=%d\n", rc);
1518 QETH_DBF_TEXT_(setup, 2, "1err%d", rc); 1515 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
1519 atomic_set(&channel->irq_pending, 0); 1516 atomic_set(&channel->irq_pending, 0);
1520 wake_up(&card->wait_q); 1517 wake_up(&card->wait_q);
1521 return rc; 1518 return rc;
@@ -1526,7 +1523,7 @@ static int qeth_idx_activate_channel(struct qeth_channel *channel,
1526 return rc; 1523 return rc;
1527 if (channel->state != CH_STATE_ACTIVATING) { 1524 if (channel->state != CH_STATE_ACTIVATING) {
1528 PRINT_WARN("IDX activate timed out!\n"); 1525 PRINT_WARN("IDX activate timed out!\n");
1529 QETH_DBF_TEXT_(setup, 2, "2err%d", -ETIME); 1526 QETH_DBF_TEXT_(SETUP, 2, "2err%d", -ETIME);
1530 qeth_clear_cmd_buffers(channel); 1527 qeth_clear_cmd_buffers(channel);
1531 return -ETIME; 1528 return -ETIME;
1532 } 1529 }
@@ -1548,7 +1545,7 @@ static void qeth_idx_write_cb(struct qeth_channel *channel,
1548 struct qeth_card *card; 1545 struct qeth_card *card;
1549 __u16 temp; 1546 __u16 temp;
1550 1547
1551 QETH_DBF_TEXT(setup , 2, "idxwrcb"); 1548 QETH_DBF_TEXT(SETUP , 2, "idxwrcb");
1552 1549
1553 if (channel->state == CH_STATE_DOWN) { 1550 if (channel->state == CH_STATE_DOWN) {
1554 channel->state = CH_STATE_ACTIVATING; 1551 channel->state = CH_STATE_ACTIVATING;
@@ -1585,7 +1582,7 @@ static void qeth_idx_read_cb(struct qeth_channel *channel,
1585 struct qeth_card *card; 1582 struct qeth_card *card;
1586 __u16 temp; 1583 __u16 temp;
1587 1584
1588 QETH_DBF_TEXT(setup , 2, "idxrdcb"); 1585 QETH_DBF_TEXT(SETUP , 2, "idxrdcb");
1589 if (channel->state == CH_STATE_DOWN) { 1586 if (channel->state == CH_STATE_DOWN) {
1590 channel->state = CH_STATE_ACTIVATING; 1587 channel->state = CH_STATE_ACTIVATING;
1591 goto out; 1588 goto out;
@@ -1645,7 +1642,7 @@ void qeth_prepare_control_data(struct qeth_card *card, int len,
1645 card->seqno.pdu_hdr++; 1642 card->seqno.pdu_hdr++;
1646 memcpy(QETH_PDU_HEADER_ACK_SEQ_NO(iob->data), 1643 memcpy(QETH_PDU_HEADER_ACK_SEQ_NO(iob->data),
1647 &card->seqno.pdu_hdr_ack, QETH_SEQ_NO_LENGTH); 1644 &card->seqno.pdu_hdr_ack, QETH_SEQ_NO_LENGTH);
1648 QETH_DBF_HEX(control, 2, iob->data, QETH_DBF_CONTROL_LEN); 1645 QETH_DBF_HEX(CTRL, 2, iob->data, QETH_DBF_CTRL_LEN);
1649} 1646}
1650EXPORT_SYMBOL_GPL(qeth_prepare_control_data); 1647EXPORT_SYMBOL_GPL(qeth_prepare_control_data);
1651 1648
@@ -1660,11 +1657,11 @@ int qeth_send_control_data(struct qeth_card *card, int len,
1660 struct qeth_reply *reply = NULL; 1657 struct qeth_reply *reply = NULL;
1661 unsigned long timeout; 1658 unsigned long timeout;
1662 1659
1663 QETH_DBF_TEXT(trace, 2, "sendctl"); 1660 QETH_DBF_TEXT(TRACE, 2, "sendctl");
1664 1661
1665 reply = qeth_alloc_reply(card); 1662 reply = qeth_alloc_reply(card);
1666 if (!reply) { 1663 if (!reply) {
1667 PRINT_WARN("Could no alloc qeth_reply!\n"); 1664 PRINT_WARN("Could not alloc qeth_reply!\n");
1668 return -ENOMEM; 1665 return -ENOMEM;
1669 } 1666 }
1670 reply->callback = reply_cb; 1667 reply->callback = reply_cb;
@@ -1677,7 +1674,7 @@ int qeth_send_control_data(struct qeth_card *card, int len,
1677 spin_lock_irqsave(&card->lock, flags); 1674 spin_lock_irqsave(&card->lock, flags);
1678 list_add_tail(&reply->list, &card->cmd_waiter_list); 1675 list_add_tail(&reply->list, &card->cmd_waiter_list);
1679 spin_unlock_irqrestore(&card->lock, flags); 1676 spin_unlock_irqrestore(&card->lock, flags);
1680 QETH_DBF_HEX(control, 2, iob->data, QETH_DBF_CONTROL_LEN); 1677 QETH_DBF_HEX(CTRL, 2, iob->data, QETH_DBF_CTRL_LEN);
1681 1678
1682 while (atomic_cmpxchg(&card->write.irq_pending, 0, 1)) ; 1679 while (atomic_cmpxchg(&card->write.irq_pending, 0, 1)) ;
1683 qeth_prepare_control_data(card, len, iob); 1680 qeth_prepare_control_data(card, len, iob);
@@ -1687,7 +1684,7 @@ int qeth_send_control_data(struct qeth_card *card, int len,
1687 else 1684 else
1688 timeout = jiffies + QETH_TIMEOUT; 1685 timeout = jiffies + QETH_TIMEOUT;
1689 1686
1690 QETH_DBF_TEXT(trace, 6, "noirqpnd"); 1687 QETH_DBF_TEXT(TRACE, 6, "noirqpnd");
1691 spin_lock_irqsave(get_ccwdev_lock(card->write.ccwdev), flags); 1688 spin_lock_irqsave(get_ccwdev_lock(card->write.ccwdev), flags);
1692 rc = ccw_device_start(card->write.ccwdev, &card->write.ccw, 1689 rc = ccw_device_start(card->write.ccwdev, &card->write.ccw,
1693 (addr_t) iob, 0, 0); 1690 (addr_t) iob, 0, 0);
@@ -1695,7 +1692,7 @@ int qeth_send_control_data(struct qeth_card *card, int len,
1695 if (rc) { 1692 if (rc) {
1696 PRINT_WARN("qeth_send_control_data: " 1693 PRINT_WARN("qeth_send_control_data: "
1697 "ccw_device_start rc = %i\n", rc); 1694 "ccw_device_start rc = %i\n", rc);
1698 QETH_DBF_TEXT_(trace, 2, " err%d", rc); 1695 QETH_DBF_TEXT_(TRACE, 2, " err%d", rc);
1699 spin_lock_irqsave(&card->lock, flags); 1696 spin_lock_irqsave(&card->lock, flags);
1700 list_del_init(&reply->list); 1697 list_del_init(&reply->list);
1701 qeth_put_reply(reply); 1698 qeth_put_reply(reply);
@@ -1727,13 +1724,13 @@ static int qeth_cm_enable_cb(struct qeth_card *card, struct qeth_reply *reply,
1727{ 1724{
1728 struct qeth_cmd_buffer *iob; 1725 struct qeth_cmd_buffer *iob;
1729 1726
1730 QETH_DBF_TEXT(setup, 2, "cmenblcb"); 1727 QETH_DBF_TEXT(SETUP, 2, "cmenblcb");
1731 1728
1732 iob = (struct qeth_cmd_buffer *) data; 1729 iob = (struct qeth_cmd_buffer *) data;
1733 memcpy(&card->token.cm_filter_r, 1730 memcpy(&card->token.cm_filter_r,
1734 QETH_CM_ENABLE_RESP_FILTER_TOKEN(iob->data), 1731 QETH_CM_ENABLE_RESP_FILTER_TOKEN(iob->data),
1735 QETH_MPC_TOKEN_LENGTH); 1732 QETH_MPC_TOKEN_LENGTH);
1736 QETH_DBF_TEXT_(setup, 2, " rc%d", iob->rc); 1733 QETH_DBF_TEXT_(SETUP, 2, " rc%d", iob->rc);
1737 return 0; 1734 return 0;
1738} 1735}
1739 1736
@@ -1742,7 +1739,7 @@ static int qeth_cm_enable(struct qeth_card *card)
1742 int rc; 1739 int rc;
1743 struct qeth_cmd_buffer *iob; 1740 struct qeth_cmd_buffer *iob;
1744 1741
1745 QETH_DBF_TEXT(setup, 2, "cmenable"); 1742 QETH_DBF_TEXT(SETUP, 2, "cmenable");
1746 1743
1747 iob = qeth_wait_for_buffer(&card->write); 1744 iob = qeth_wait_for_buffer(&card->write);
1748 memcpy(iob->data, CM_ENABLE, CM_ENABLE_SIZE); 1745 memcpy(iob->data, CM_ENABLE, CM_ENABLE_SIZE);
@@ -1762,13 +1759,13 @@ static int qeth_cm_setup_cb(struct qeth_card *card, struct qeth_reply *reply,
1762 1759
1763 struct qeth_cmd_buffer *iob; 1760 struct qeth_cmd_buffer *iob;
1764 1761
1765 QETH_DBF_TEXT(setup, 2, "cmsetpcb"); 1762 QETH_DBF_TEXT(SETUP, 2, "cmsetpcb");
1766 1763
1767 iob = (struct qeth_cmd_buffer *) data; 1764 iob = (struct qeth_cmd_buffer *) data;
1768 memcpy(&card->token.cm_connection_r, 1765 memcpy(&card->token.cm_connection_r,
1769 QETH_CM_SETUP_RESP_DEST_ADDR(iob->data), 1766 QETH_CM_SETUP_RESP_DEST_ADDR(iob->data),
1770 QETH_MPC_TOKEN_LENGTH); 1767 QETH_MPC_TOKEN_LENGTH);
1771 QETH_DBF_TEXT_(setup, 2, " rc%d", iob->rc); 1768 QETH_DBF_TEXT_(SETUP, 2, " rc%d", iob->rc);
1772 return 0; 1769 return 0;
1773} 1770}
1774 1771
@@ -1777,7 +1774,7 @@ static int qeth_cm_setup(struct qeth_card *card)
1777 int rc; 1774 int rc;
1778 struct qeth_cmd_buffer *iob; 1775 struct qeth_cmd_buffer *iob;
1779 1776
1780 QETH_DBF_TEXT(setup, 2, "cmsetup"); 1777 QETH_DBF_TEXT(SETUP, 2, "cmsetup");
1781 1778
1782 iob = qeth_wait_for_buffer(&card->write); 1779 iob = qeth_wait_for_buffer(&card->write);
1783 memcpy(iob->data, CM_SETUP, CM_SETUP_SIZE); 1780 memcpy(iob->data, CM_SETUP, CM_SETUP_SIZE);
@@ -1878,7 +1875,7 @@ static int qeth_ulp_enable_cb(struct qeth_card *card, struct qeth_reply *reply,
1878 __u8 link_type; 1875 __u8 link_type;
1879 struct qeth_cmd_buffer *iob; 1876 struct qeth_cmd_buffer *iob;
1880 1877
1881 QETH_DBF_TEXT(setup, 2, "ulpenacb"); 1878 QETH_DBF_TEXT(SETUP, 2, "ulpenacb");
1882 1879
1883 iob = (struct qeth_cmd_buffer *) data; 1880 iob = (struct qeth_cmd_buffer *) data;
1884 memcpy(&card->token.ulp_filter_r, 1881 memcpy(&card->token.ulp_filter_r,
@@ -1889,7 +1886,7 @@ static int qeth_ulp_enable_cb(struct qeth_card *card, struct qeth_reply *reply,
1889 mtu = qeth_get_mtu_outof_framesize(framesize); 1886 mtu = qeth_get_mtu_outof_framesize(framesize);
1890 if (!mtu) { 1887 if (!mtu) {
1891 iob->rc = -EINVAL; 1888 iob->rc = -EINVAL;
1892 QETH_DBF_TEXT_(setup, 2, " rc%d", iob->rc); 1889 QETH_DBF_TEXT_(SETUP, 2, " rc%d", iob->rc);
1893 return 0; 1890 return 0;
1894 } 1891 }
1895 card->info.max_mtu = mtu; 1892 card->info.max_mtu = mtu;
@@ -1908,7 +1905,7 @@ static int qeth_ulp_enable_cb(struct qeth_card *card, struct qeth_reply *reply,
1908 card->info.link_type = link_type; 1905 card->info.link_type = link_type;
1909 } else 1906 } else
1910 card->info.link_type = 0; 1907 card->info.link_type = 0;
1911 QETH_DBF_TEXT_(setup, 2, " rc%d", iob->rc); 1908 QETH_DBF_TEXT_(SETUP, 2, " rc%d", iob->rc);
1912 return 0; 1909 return 0;
1913} 1910}
1914 1911
@@ -1919,7 +1916,7 @@ static int qeth_ulp_enable(struct qeth_card *card)
1919 struct qeth_cmd_buffer *iob; 1916 struct qeth_cmd_buffer *iob;
1920 1917
1921 /*FIXME: trace view callbacks*/ 1918 /*FIXME: trace view callbacks*/
1922 QETH_DBF_TEXT(setup, 2, "ulpenabl"); 1919 QETH_DBF_TEXT(SETUP, 2, "ulpenabl");
1923 1920
1924 iob = qeth_wait_for_buffer(&card->write); 1921 iob = qeth_wait_for_buffer(&card->write);
1925 memcpy(iob->data, ULP_ENABLE, ULP_ENABLE_SIZE); 1922 memcpy(iob->data, ULP_ENABLE, ULP_ENABLE_SIZE);
@@ -1952,13 +1949,13 @@ static int qeth_ulp_setup_cb(struct qeth_card *card, struct qeth_reply *reply,
1952{ 1949{
1953 struct qeth_cmd_buffer *iob; 1950 struct qeth_cmd_buffer *iob;
1954 1951
1955 QETH_DBF_TEXT(setup, 2, "ulpstpcb"); 1952 QETH_DBF_TEXT(SETUP, 2, "ulpstpcb");
1956 1953
1957 iob = (struct qeth_cmd_buffer *) data; 1954 iob = (struct qeth_cmd_buffer *) data;
1958 memcpy(&card->token.ulp_connection_r, 1955 memcpy(&card->token.ulp_connection_r,
1959 QETH_ULP_SETUP_RESP_CONNECTION_TOKEN(iob->data), 1956 QETH_ULP_SETUP_RESP_CONNECTION_TOKEN(iob->data),
1960 QETH_MPC_TOKEN_LENGTH); 1957 QETH_MPC_TOKEN_LENGTH);
1961 QETH_DBF_TEXT_(setup, 2, " rc%d", iob->rc); 1958 QETH_DBF_TEXT_(SETUP, 2, " rc%d", iob->rc);
1962 return 0; 1959 return 0;
1963} 1960}
1964 1961
@@ -1969,7 +1966,7 @@ static int qeth_ulp_setup(struct qeth_card *card)
1969 struct qeth_cmd_buffer *iob; 1966 struct qeth_cmd_buffer *iob;
1970 struct ccw_dev_id dev_id; 1967 struct ccw_dev_id dev_id;
1971 1968
1972 QETH_DBF_TEXT(setup, 2, "ulpsetup"); 1969 QETH_DBF_TEXT(SETUP, 2, "ulpsetup");
1973 1970
1974 iob = qeth_wait_for_buffer(&card->write); 1971 iob = qeth_wait_for_buffer(&card->write);
1975 memcpy(iob->data, ULP_SETUP, ULP_SETUP_SIZE); 1972 memcpy(iob->data, ULP_SETUP, ULP_SETUP_SIZE);
@@ -1994,7 +1991,7 @@ static int qeth_alloc_qdio_buffers(struct qeth_card *card)
1994{ 1991{
1995 int i, j; 1992 int i, j;
1996 1993
1997 QETH_DBF_TEXT(setup, 2, "allcqdbf"); 1994 QETH_DBF_TEXT(SETUP, 2, "allcqdbf");
1998 1995
1999 if (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_UNINITIALIZED, 1996 if (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_UNINITIALIZED,
2000 QETH_QDIO_ALLOCATED) != QETH_QDIO_UNINITIALIZED) 1997 QETH_QDIO_ALLOCATED) != QETH_QDIO_UNINITIALIZED)
@@ -2004,8 +2001,8 @@ static int qeth_alloc_qdio_buffers(struct qeth_card *card)
2004 GFP_KERNEL); 2001 GFP_KERNEL);
2005 if (!card->qdio.in_q) 2002 if (!card->qdio.in_q)
2006 goto out_nomem; 2003 goto out_nomem;
2007 QETH_DBF_TEXT(setup, 2, "inq"); 2004 QETH_DBF_TEXT(SETUP, 2, "inq");
2008 QETH_DBF_HEX(setup, 2, &card->qdio.in_q, sizeof(void *)); 2005 QETH_DBF_HEX(SETUP, 2, &card->qdio.in_q, sizeof(void *));
2009 memset(card->qdio.in_q, 0, sizeof(struct qeth_qdio_q)); 2006 memset(card->qdio.in_q, 0, sizeof(struct qeth_qdio_q));
2010 /* give inbound qeth_qdio_buffers their qdio_buffers */ 2007 /* give inbound qeth_qdio_buffers their qdio_buffers */
2011 for (i = 0; i < QDIO_MAX_BUFFERS_PER_Q; ++i) 2008 for (i = 0; i < QDIO_MAX_BUFFERS_PER_Q; ++i)
@@ -2025,8 +2022,8 @@ static int qeth_alloc_qdio_buffers(struct qeth_card *card)
2025 GFP_KERNEL); 2022 GFP_KERNEL);
2026 if (!card->qdio.out_qs[i]) 2023 if (!card->qdio.out_qs[i])
2027 goto out_freeoutq; 2024 goto out_freeoutq;
2028 QETH_DBF_TEXT_(setup, 2, "outq %i", i); 2025 QETH_DBF_TEXT_(SETUP, 2, "outq %i", i);
2029 QETH_DBF_HEX(setup, 2, &card->qdio.out_qs[i], sizeof(void *)); 2026 QETH_DBF_HEX(SETUP, 2, &card->qdio.out_qs[i], sizeof(void *));
2030 memset(card->qdio.out_qs[i], 0, sizeof(struct qeth_qdio_out_q)); 2027 memset(card->qdio.out_qs[i], 0, sizeof(struct qeth_qdio_out_q));
2031 card->qdio.out_qs[i]->queue_no = i; 2028 card->qdio.out_qs[i]->queue_no = i;
2032 /* give outbound qeth_qdio_buffers their qdio_buffers */ 2029 /* give outbound qeth_qdio_buffers their qdio_buffers */
@@ -2086,7 +2083,7 @@ static void qeth_create_qib_param_field_blkt(struct qeth_card *card,
2086 2083
2087static int qeth_qdio_activate(struct qeth_card *card) 2084static int qeth_qdio_activate(struct qeth_card *card)
2088{ 2085{
2089 QETH_DBF_TEXT(setup, 3, "qdioact"); 2086 QETH_DBF_TEXT(SETUP, 3, "qdioact");
2090 return qdio_activate(CARD_DDEV(card), 0); 2087 return qdio_activate(CARD_DDEV(card), 0);
2091} 2088}
2092 2089
@@ -2095,7 +2092,7 @@ static int qeth_dm_act(struct qeth_card *card)
2095 int rc; 2092 int rc;
2096 struct qeth_cmd_buffer *iob; 2093 struct qeth_cmd_buffer *iob;
2097 2094
2098 QETH_DBF_TEXT(setup, 2, "dmact"); 2095 QETH_DBF_TEXT(SETUP, 2, "dmact");
2099 2096
2100 iob = qeth_wait_for_buffer(&card->write); 2097 iob = qeth_wait_for_buffer(&card->write);
2101 memcpy(iob->data, DM_ACT, DM_ACT_SIZE); 2098 memcpy(iob->data, DM_ACT, DM_ACT_SIZE);
@@ -2112,52 +2109,52 @@ static int qeth_mpc_initialize(struct qeth_card *card)
2112{ 2109{
2113 int rc; 2110 int rc;
2114 2111
2115 QETH_DBF_TEXT(setup, 2, "mpcinit"); 2112 QETH_DBF_TEXT(SETUP, 2, "mpcinit");
2116 2113
2117 rc = qeth_issue_next_read(card); 2114 rc = qeth_issue_next_read(card);
2118 if (rc) { 2115 if (rc) {
2119 QETH_DBF_TEXT_(setup, 2, "1err%d", rc); 2116 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
2120 return rc; 2117 return rc;
2121 } 2118 }
2122 rc = qeth_cm_enable(card); 2119 rc = qeth_cm_enable(card);
2123 if (rc) { 2120 if (rc) {
2124 QETH_DBF_TEXT_(setup, 2, "2err%d", rc); 2121 QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
2125 goto out_qdio; 2122 goto out_qdio;
2126 } 2123 }
2127 rc = qeth_cm_setup(card); 2124 rc = qeth_cm_setup(card);
2128 if (rc) { 2125 if (rc) {
2129 QETH_DBF_TEXT_(setup, 2, "3err%d", rc); 2126 QETH_DBF_TEXT_(SETUP, 2, "3err%d", rc);
2130 goto out_qdio; 2127 goto out_qdio;
2131 } 2128 }
2132 rc = qeth_ulp_enable(card); 2129 rc = qeth_ulp_enable(card);
2133 if (rc) { 2130 if (rc) {
2134 QETH_DBF_TEXT_(setup, 2, "4err%d", rc); 2131 QETH_DBF_TEXT_(SETUP, 2, "4err%d", rc);
2135 goto out_qdio; 2132 goto out_qdio;
2136 } 2133 }
2137 rc = qeth_ulp_setup(card); 2134 rc = qeth_ulp_setup(card);
2138 if (rc) { 2135 if (rc) {
2139 QETH_DBF_TEXT_(setup, 2, "5err%d", rc); 2136 QETH_DBF_TEXT_(SETUP, 2, "5err%d", rc);
2140 goto out_qdio; 2137 goto out_qdio;
2141 } 2138 }
2142 rc = qeth_alloc_qdio_buffers(card); 2139 rc = qeth_alloc_qdio_buffers(card);
2143 if (rc) { 2140 if (rc) {
2144 QETH_DBF_TEXT_(setup, 2, "5err%d", rc); 2141 QETH_DBF_TEXT_(SETUP, 2, "5err%d", rc);
2145 goto out_qdio; 2142 goto out_qdio;
2146 } 2143 }
2147 rc = qeth_qdio_establish(card); 2144 rc = qeth_qdio_establish(card);
2148 if (rc) { 2145 if (rc) {
2149 QETH_DBF_TEXT_(setup, 2, "6err%d", rc); 2146 QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc);
2150 qeth_free_qdio_buffers(card); 2147 qeth_free_qdio_buffers(card);
2151 goto out_qdio; 2148 goto out_qdio;
2152 } 2149 }
2153 rc = qeth_qdio_activate(card); 2150 rc = qeth_qdio_activate(card);
2154 if (rc) { 2151 if (rc) {
2155 QETH_DBF_TEXT_(setup, 2, "7err%d", rc); 2152 QETH_DBF_TEXT_(SETUP, 2, "7err%d", rc);
2156 goto out_qdio; 2153 goto out_qdio;
2157 } 2154 }
2158 rc = qeth_dm_act(card); 2155 rc = qeth_dm_act(card);
2159 if (rc) { 2156 if (rc) {
2160 QETH_DBF_TEXT_(setup, 2, "8err%d", rc); 2157 QETH_DBF_TEXT_(SETUP, 2, "8err%d", rc);
2161 goto out_qdio; 2158 goto out_qdio;
2162 } 2159 }
2163 2160
@@ -2261,7 +2258,7 @@ EXPORT_SYMBOL_GPL(qeth_print_status_message);
2261void qeth_put_buffer_pool_entry(struct qeth_card *card, 2258void qeth_put_buffer_pool_entry(struct qeth_card *card,
2262 struct qeth_buffer_pool_entry *entry) 2259 struct qeth_buffer_pool_entry *entry)
2263{ 2260{
2264 QETH_DBF_TEXT(trace, 6, "ptbfplen"); 2261 QETH_DBF_TEXT(TRACE, 6, "ptbfplen");
2265 list_add_tail(&entry->list, &card->qdio.in_buf_pool.entry_list); 2262 list_add_tail(&entry->list, &card->qdio.in_buf_pool.entry_list);
2266} 2263}
2267EXPORT_SYMBOL_GPL(qeth_put_buffer_pool_entry); 2264EXPORT_SYMBOL_GPL(qeth_put_buffer_pool_entry);
@@ -2270,7 +2267,7 @@ static void qeth_initialize_working_pool_list(struct qeth_card *card)
2270{ 2267{
2271 struct qeth_buffer_pool_entry *entry; 2268 struct qeth_buffer_pool_entry *entry;
2272 2269
2273 QETH_DBF_TEXT(trace, 5, "inwrklst"); 2270 QETH_DBF_TEXT(TRACE, 5, "inwrklst");
2274 2271
2275 list_for_each_entry(entry, 2272 list_for_each_entry(entry,
2276 &card->qdio.init_pool.entry_list, init_list) { 2273 &card->qdio.init_pool.entry_list, init_list) {
@@ -2359,7 +2356,7 @@ int qeth_init_qdio_queues(struct qeth_card *card)
2359 int i, j; 2356 int i, j;
2360 int rc; 2357 int rc;
2361 2358
2362 QETH_DBF_TEXT(setup, 2, "initqdqs"); 2359 QETH_DBF_TEXT(SETUP, 2, "initqdqs");
2363 2360
2364 /* inbound queue */ 2361 /* inbound queue */
2365 memset(card->qdio.in_q->qdio_bufs, 0, 2362 memset(card->qdio.in_q->qdio_bufs, 0,
@@ -2373,12 +2370,12 @@ int qeth_init_qdio_queues(struct qeth_card *card)
2373 rc = do_QDIO(CARD_DDEV(card), QDIO_FLAG_SYNC_INPUT, 0, 0, 2370 rc = do_QDIO(CARD_DDEV(card), QDIO_FLAG_SYNC_INPUT, 0, 0,
2374 card->qdio.in_buf_pool.buf_count - 1, NULL); 2371 card->qdio.in_buf_pool.buf_count - 1, NULL);
2375 if (rc) { 2372 if (rc) {
2376 QETH_DBF_TEXT_(setup, 2, "1err%d", rc); 2373 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
2377 return rc; 2374 return rc;
2378 } 2375 }
2379 rc = qdio_synchronize(CARD_DDEV(card), QDIO_FLAG_SYNC_INPUT, 0); 2376 rc = qdio_synchronize(CARD_DDEV(card), QDIO_FLAG_SYNC_INPUT, 0);
2380 if (rc) { 2377 if (rc) {
2381 QETH_DBF_TEXT_(setup, 2, "2err%d", rc); 2378 QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
2382 return rc; 2379 return rc;
2383 } 2380 }
2384 /* outbound queue */ 2381 /* outbound queue */
@@ -2462,11 +2459,8 @@ int qeth_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob,
2462{ 2459{
2463 int rc; 2460 int rc;
2464 char prot_type; 2461 char prot_type;
2465 int cmd;
2466 cmd = ((struct qeth_ipa_cmd *)
2467 (iob->data+IPA_PDU_HEADER_SIZE))->hdr.command;
2468 2462
2469 QETH_DBF_TEXT(trace, 4, "sendipa"); 2463 QETH_DBF_TEXT(TRACE, 4, "sendipa");
2470 2464
2471 if (card->options.layer2) 2465 if (card->options.layer2)
2472 if (card->info.type == QETH_CARD_TYPE_OSN) 2466 if (card->info.type == QETH_CARD_TYPE_OSN)
@@ -2476,14 +2470,8 @@ int qeth_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob,
2476 else 2470 else
2477 prot_type = QETH_PROT_TCPIP; 2471 prot_type = QETH_PROT_TCPIP;
2478 qeth_prepare_ipa_cmd(card, iob, prot_type); 2472 qeth_prepare_ipa_cmd(card, iob, prot_type);
2479 rc = qeth_send_control_data(card, IPA_CMD_LENGTH, iob, 2473 rc = qeth_send_control_data(card, IPA_CMD_LENGTH,
2480 reply_cb, reply_param); 2474 iob, reply_cb, reply_param);
2481 if (rc != 0) {
2482 char *ipa_cmd_name;
2483 ipa_cmd_name = qeth_get_ipa_cmd_name(cmd);
2484 PRINT_ERR("%s %s(%x) returned %s(%x)\n", __FUNCTION__,
2485 ipa_cmd_name, cmd, qeth_get_ipa_msg(rc), rc);
2486 }
2487 return rc; 2475 return rc;
2488} 2476}
2489EXPORT_SYMBOL_GPL(qeth_send_ipa_cmd); 2477EXPORT_SYMBOL_GPL(qeth_send_ipa_cmd);
@@ -2504,7 +2492,7 @@ int qeth_send_startlan(struct qeth_card *card)
2504{ 2492{
2505 int rc; 2493 int rc;
2506 2494
2507 QETH_DBF_TEXT(setup, 2, "strtlan"); 2495 QETH_DBF_TEXT(SETUP, 2, "strtlan");
2508 2496
2509 rc = qeth_send_startstoplan(card, IPA_CMD_STARTLAN, 0); 2497 rc = qeth_send_startstoplan(card, IPA_CMD_STARTLAN, 0);
2510 return rc; 2498 return rc;
@@ -2520,7 +2508,7 @@ int qeth_send_stoplan(struct qeth_card *card)
2520 * TCP/IP (we!) never issue a STOPLAN 2508 * TCP/IP (we!) never issue a STOPLAN
2521 * is this right ?!? 2509 * is this right ?!?
2522 */ 2510 */
2523 QETH_DBF_TEXT(setup, 2, "stoplan"); 2511 QETH_DBF_TEXT(SETUP, 2, "stoplan");
2524 2512
2525 rc = qeth_send_startstoplan(card, IPA_CMD_STOPLAN, 0); 2513 rc = qeth_send_startstoplan(card, IPA_CMD_STOPLAN, 0);
2526 return rc; 2514 return rc;
@@ -2532,7 +2520,7 @@ int qeth_default_setadapterparms_cb(struct qeth_card *card,
2532{ 2520{
2533 struct qeth_ipa_cmd *cmd; 2521 struct qeth_ipa_cmd *cmd;
2534 2522
2535 QETH_DBF_TEXT(trace, 4, "defadpcb"); 2523 QETH_DBF_TEXT(TRACE, 4, "defadpcb");
2536 2524
2537 cmd = (struct qeth_ipa_cmd *) data; 2525 cmd = (struct qeth_ipa_cmd *) data;
2538 if (cmd->hdr.return_code == 0) 2526 if (cmd->hdr.return_code == 0)
@@ -2547,7 +2535,7 @@ static int qeth_query_setadapterparms_cb(struct qeth_card *card,
2547{ 2535{
2548 struct qeth_ipa_cmd *cmd; 2536 struct qeth_ipa_cmd *cmd;
2549 2537
2550 QETH_DBF_TEXT(trace, 3, "quyadpcb"); 2538 QETH_DBF_TEXT(TRACE, 3, "quyadpcb");
2551 2539
2552 cmd = (struct qeth_ipa_cmd *) data; 2540 cmd = (struct qeth_ipa_cmd *) data;
2553 if (cmd->data.setadapterparms.data.query_cmds_supp.lan_type & 0x7f) 2541 if (cmd->data.setadapterparms.data.query_cmds_supp.lan_type & 0x7f)
@@ -2581,7 +2569,7 @@ int qeth_query_setadapterparms(struct qeth_card *card)
2581 int rc; 2569 int rc;
2582 struct qeth_cmd_buffer *iob; 2570 struct qeth_cmd_buffer *iob;
2583 2571
2584 QETH_DBF_TEXT(trace, 3, "queryadp"); 2572 QETH_DBF_TEXT(TRACE, 3, "queryadp");
2585 iob = qeth_get_adapter_cmd(card, IPA_SETADP_QUERY_COMMANDS_SUPPORTED, 2573 iob = qeth_get_adapter_cmd(card, IPA_SETADP_QUERY_COMMANDS_SUPPORTED,
2586 sizeof(struct qeth_ipacmd_setadpparms)); 2574 sizeof(struct qeth_ipacmd_setadpparms));
2587 rc = qeth_send_ipa_cmd(card, iob, qeth_query_setadapterparms_cb, NULL); 2575 rc = qeth_send_ipa_cmd(card, iob, qeth_query_setadapterparms_cb, NULL);
@@ -2593,14 +2581,14 @@ int qeth_check_qdio_errors(struct qdio_buffer *buf, unsigned int qdio_error,
2593 unsigned int siga_error, const char *dbftext) 2581 unsigned int siga_error, const char *dbftext)
2594{ 2582{
2595 if (qdio_error || siga_error) { 2583 if (qdio_error || siga_error) {
2596 QETH_DBF_TEXT(trace, 2, dbftext); 2584 QETH_DBF_TEXT(TRACE, 2, dbftext);
2597 QETH_DBF_TEXT(qerr, 2, dbftext); 2585 QETH_DBF_TEXT(QERR, 2, dbftext);
2598 QETH_DBF_TEXT_(qerr, 2, " F15=%02X", 2586 QETH_DBF_TEXT_(QERR, 2, " F15=%02X",
2599 buf->element[15].flags & 0xff); 2587 buf->element[15].flags & 0xff);
2600 QETH_DBF_TEXT_(qerr, 2, " F14=%02X", 2588 QETH_DBF_TEXT_(QERR, 2, " F14=%02X",
2601 buf->element[14].flags & 0xff); 2589 buf->element[14].flags & 0xff);
2602 QETH_DBF_TEXT_(qerr, 2, " qerr=%X", qdio_error); 2590 QETH_DBF_TEXT_(QERR, 2, " qerr=%X", qdio_error);
2603 QETH_DBF_TEXT_(qerr, 2, " serr=%X", siga_error); 2591 QETH_DBF_TEXT_(QERR, 2, " serr=%X", siga_error);
2604 return 1; 2592 return 1;
2605 } 2593 }
2606 return 0; 2594 return 0;
@@ -2615,7 +2603,7 @@ void qeth_queue_input_buffer(struct qeth_card *card, int index)
2615 int rc; 2603 int rc;
2616 int newcount = 0; 2604 int newcount = 0;
2617 2605
2618 QETH_DBF_TEXT(trace, 6, "queinbuf"); 2606 QETH_DBF_TEXT(TRACE, 6, "queinbuf");
2619 count = (index < queue->next_buf_to_init)? 2607 count = (index < queue->next_buf_to_init)?
2620 card->qdio.in_buf_pool.buf_count - 2608 card->qdio.in_buf_pool.buf_count -
2621 (queue->next_buf_to_init - index) : 2609 (queue->next_buf_to_init - index) :
@@ -2671,8 +2659,8 @@ void qeth_queue_input_buffer(struct qeth_card *card, int index)
2671 PRINT_WARN("qeth_queue_input_buffer's do_QDIO " 2659 PRINT_WARN("qeth_queue_input_buffer's do_QDIO "
2672 "return %i (device %s).\n", 2660 "return %i (device %s).\n",
2673 rc, CARD_DDEV_ID(card)); 2661 rc, CARD_DDEV_ID(card));
2674 QETH_DBF_TEXT(trace, 2, "qinberr"); 2662 QETH_DBF_TEXT(TRACE, 2, "qinberr");
2675 QETH_DBF_TEXT_(trace, 2, "%s", CARD_BUS_ID(card)); 2663 QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card));
2676 } 2664 }
2677 queue->next_buf_to_init = (queue->next_buf_to_init + count) % 2665 queue->next_buf_to_init = (queue->next_buf_to_init + count) %
2678 QDIO_MAX_BUFFERS_PER_Q; 2666 QDIO_MAX_BUFFERS_PER_Q;
@@ -2687,22 +2675,22 @@ static int qeth_handle_send_error(struct qeth_card *card,
2687 int sbalf15 = buffer->buffer->element[15].flags & 0xff; 2675 int sbalf15 = buffer->buffer->element[15].flags & 0xff;
2688 int cc = siga_err & 3; 2676 int cc = siga_err & 3;
2689 2677
2690 QETH_DBF_TEXT(trace, 6, "hdsnderr"); 2678 QETH_DBF_TEXT(TRACE, 6, "hdsnderr");
2691 qeth_check_qdio_errors(buffer->buffer, qdio_err, siga_err, "qouterr"); 2679 qeth_check_qdio_errors(buffer->buffer, qdio_err, siga_err, "qouterr");
2692 switch (cc) { 2680 switch (cc) {
2693 case 0: 2681 case 0:
2694 if (qdio_err) { 2682 if (qdio_err) {
2695 QETH_DBF_TEXT(trace, 1, "lnkfail"); 2683 QETH_DBF_TEXT(TRACE, 1, "lnkfail");
2696 QETH_DBF_TEXT_(trace, 1, "%s", CARD_BUS_ID(card)); 2684 QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card));
2697 QETH_DBF_TEXT_(trace, 1, "%04x %02x", 2685 QETH_DBF_TEXT_(TRACE, 1, "%04x %02x",
2698 (u16)qdio_err, (u8)sbalf15); 2686 (u16)qdio_err, (u8)sbalf15);
2699 return QETH_SEND_ERROR_LINK_FAILURE; 2687 return QETH_SEND_ERROR_LINK_FAILURE;
2700 } 2688 }
2701 return QETH_SEND_ERROR_NONE; 2689 return QETH_SEND_ERROR_NONE;
2702 case 2: 2690 case 2:
2703 if (siga_err & QDIO_SIGA_ERROR_B_BIT_SET) { 2691 if (siga_err & QDIO_SIGA_ERROR_B_BIT_SET) {
2704 QETH_DBF_TEXT(trace, 1, "SIGAcc2B"); 2692 QETH_DBF_TEXT(TRACE, 1, "SIGAcc2B");
2705 QETH_DBF_TEXT_(trace, 1, "%s", CARD_BUS_ID(card)); 2693 QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card));
2706 return QETH_SEND_ERROR_KICK_IT; 2694 return QETH_SEND_ERROR_KICK_IT;
2707 } 2695 }
2708 if ((sbalf15 >= 15) && (sbalf15 <= 31)) 2696 if ((sbalf15 >= 15) && (sbalf15 <= 31))
@@ -2710,13 +2698,13 @@ static int qeth_handle_send_error(struct qeth_card *card,
2710 return QETH_SEND_ERROR_LINK_FAILURE; 2698 return QETH_SEND_ERROR_LINK_FAILURE;
2711 /* look at qdio_error and sbalf 15 */ 2699 /* look at qdio_error and sbalf 15 */
2712 case 1: 2700 case 1:
2713 QETH_DBF_TEXT(trace, 1, "SIGAcc1"); 2701 QETH_DBF_TEXT(TRACE, 1, "SIGAcc1");
2714 QETH_DBF_TEXT_(trace, 1, "%s", CARD_BUS_ID(card)); 2702 QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card));
2715 return QETH_SEND_ERROR_LINK_FAILURE; 2703 return QETH_SEND_ERROR_LINK_FAILURE;
2716 case 3: 2704 case 3:
2717 default: 2705 default:
2718 QETH_DBF_TEXT(trace, 1, "SIGAcc3"); 2706 QETH_DBF_TEXT(TRACE, 1, "SIGAcc3");
2719 QETH_DBF_TEXT_(trace, 1, "%s", CARD_BUS_ID(card)); 2707 QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card));
2720 return QETH_SEND_ERROR_KICK_IT; 2708 return QETH_SEND_ERROR_KICK_IT;
2721 } 2709 }
2722} 2710}
@@ -2731,7 +2719,7 @@ static void qeth_switch_to_packing_if_needed(struct qeth_qdio_out_q *queue)
2731 if (atomic_read(&queue->used_buffers) 2719 if (atomic_read(&queue->used_buffers)
2732 >= QETH_HIGH_WATERMARK_PACK){ 2720 >= QETH_HIGH_WATERMARK_PACK){
2733 /* switch non-PACKING -> PACKING */ 2721 /* switch non-PACKING -> PACKING */
2734 QETH_DBF_TEXT(trace, 6, "np->pack"); 2722 QETH_DBF_TEXT(TRACE, 6, "np->pack");
2735 if (queue->card->options.performance_stats) 2723 if (queue->card->options.performance_stats)
2736 queue->card->perf_stats.sc_dp_p++; 2724 queue->card->perf_stats.sc_dp_p++;
2737 queue->do_pack = 1; 2725 queue->do_pack = 1;
@@ -2754,7 +2742,7 @@ static int qeth_switch_to_nonpacking_if_needed(struct qeth_qdio_out_q *queue)
2754 if (atomic_read(&queue->used_buffers) 2742 if (atomic_read(&queue->used_buffers)
2755 <= QETH_LOW_WATERMARK_PACK) { 2743 <= QETH_LOW_WATERMARK_PACK) {
2756 /* switch PACKING -> non-PACKING */ 2744 /* switch PACKING -> non-PACKING */
2757 QETH_DBF_TEXT(trace, 6, "pack->np"); 2745 QETH_DBF_TEXT(TRACE, 6, "pack->np");
2758 if (queue->card->options.performance_stats) 2746 if (queue->card->options.performance_stats)
2759 queue->card->perf_stats.sc_p_dp++; 2747 queue->card->perf_stats.sc_p_dp++;
2760 queue->do_pack = 0; 2748 queue->do_pack = 0;
@@ -2804,7 +2792,7 @@ static void qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int,
2804 int i; 2792 int i;
2805 unsigned int qdio_flags; 2793 unsigned int qdio_flags;
2806 2794
2807 QETH_DBF_TEXT(trace, 6, "flushbuf"); 2795 QETH_DBF_TEXT(TRACE, 6, "flushbuf");
2808 2796
2809 for (i = index; i < index + count; ++i) { 2797 for (i = index; i < index + count; ++i) {
2810 buf = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q]; 2798 buf = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q];
@@ -2858,9 +2846,9 @@ static void qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int,
2858 qeth_get_micros() - 2846 qeth_get_micros() -
2859 queue->card->perf_stats.outbound_do_qdio_start_time; 2847 queue->card->perf_stats.outbound_do_qdio_start_time;
2860 if (rc) { 2848 if (rc) {
2861 QETH_DBF_TEXT(trace, 2, "flushbuf"); 2849 QETH_DBF_TEXT(TRACE, 2, "flushbuf");
2862 QETH_DBF_TEXT_(trace, 2, " err%d", rc); 2850 QETH_DBF_TEXT_(TRACE, 2, " err%d", rc);
2863 QETH_DBF_TEXT_(trace, 2, "%s", CARD_DDEV_ID(queue->card)); 2851 QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_DDEV_ID(queue->card));
2864 queue->card->stats.tx_errors += count; 2852 queue->card->stats.tx_errors += count;
2865 /* this must not happen under normal circumstances. if it 2853 /* this must not happen under normal circumstances. if it
2866 * happens something is really wrong -> recover */ 2854 * happens something is really wrong -> recover */
@@ -2922,12 +2910,12 @@ void qeth_qdio_output_handler(struct ccw_device *ccwdev, unsigned int status,
2922 struct qeth_qdio_out_buffer *buffer; 2910 struct qeth_qdio_out_buffer *buffer;
2923 int i; 2911 int i;
2924 2912
2925 QETH_DBF_TEXT(trace, 6, "qdouhdl"); 2913 QETH_DBF_TEXT(TRACE, 6, "qdouhdl");
2926 if (status & QDIO_STATUS_LOOK_FOR_ERROR) { 2914 if (status & QDIO_STATUS_LOOK_FOR_ERROR) {
2927 if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION) { 2915 if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION) {
2928 QETH_DBF_TEXT(trace, 2, "achkcond"); 2916 QETH_DBF_TEXT(TRACE, 2, "achkcond");
2929 QETH_DBF_TEXT_(trace, 2, "%s", CARD_BUS_ID(card)); 2917 QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card));
2930 QETH_DBF_TEXT_(trace, 2, "%08x", status); 2918 QETH_DBF_TEXT_(TRACE, 2, "%08x", status);
2931 netif_stop_queue(card->dev); 2919 netif_stop_queue(card->dev);
2932 qeth_schedule_recovery(card); 2920 qeth_schedule_recovery(card);
2933 return; 2921 return;
@@ -3075,7 +3063,7 @@ struct sk_buff *qeth_prepare_skb(struct qeth_card *card, struct sk_buff *skb,
3075{ 3063{
3076 struct sk_buff *new_skb; 3064 struct sk_buff *new_skb;
3077 3065
3078 QETH_DBF_TEXT(trace, 6, "prepskb"); 3066 QETH_DBF_TEXT(TRACE, 6, "prepskb");
3079 3067
3080 new_skb = qeth_realloc_headroom(card, skb, 3068 new_skb = qeth_realloc_headroom(card, skb,
3081 sizeof(struct qeth_hdr)); 3069 sizeof(struct qeth_hdr));
@@ -3162,7 +3150,7 @@ static int qeth_fill_buffer(struct qeth_qdio_out_q *queue,
3162 struct qeth_hdr_tso *hdr; 3150 struct qeth_hdr_tso *hdr;
3163 int flush_cnt = 0, hdr_len, large_send = 0; 3151 int flush_cnt = 0, hdr_len, large_send = 0;
3164 3152
3165 QETH_DBF_TEXT(trace, 6, "qdfillbf"); 3153 QETH_DBF_TEXT(TRACE, 6, "qdfillbf");
3166 3154
3167 buffer = buf->buffer; 3155 buffer = buf->buffer;
3168 atomic_inc(&skb->users); 3156 atomic_inc(&skb->users);
@@ -3191,12 +3179,12 @@ static int qeth_fill_buffer(struct qeth_qdio_out_q *queue,
3191 (int *)&buf->next_element_to_fill); 3179 (int *)&buf->next_element_to_fill);
3192 3180
3193 if (!queue->do_pack) { 3181 if (!queue->do_pack) {
3194 QETH_DBF_TEXT(trace, 6, "fillbfnp"); 3182 QETH_DBF_TEXT(TRACE, 6, "fillbfnp");
3195 /* set state to PRIMED -> will be flushed */ 3183 /* set state to PRIMED -> will be flushed */
3196 atomic_set(&buf->state, QETH_QDIO_BUF_PRIMED); 3184 atomic_set(&buf->state, QETH_QDIO_BUF_PRIMED);
3197 flush_cnt = 1; 3185 flush_cnt = 1;
3198 } else { 3186 } else {
3199 QETH_DBF_TEXT(trace, 6, "fillbfpa"); 3187 QETH_DBF_TEXT(TRACE, 6, "fillbfpa");
3200 if (queue->card->options.performance_stats) 3188 if (queue->card->options.performance_stats)
3201 queue->card->perf_stats.skbs_sent_pack++; 3189 queue->card->perf_stats.skbs_sent_pack++;
3202 if (buf->next_element_to_fill >= 3190 if (buf->next_element_to_fill >=
@@ -3222,7 +3210,7 @@ int qeth_do_send_packet_fast(struct qeth_card *card,
3222 int flush_cnt = 0; 3210 int flush_cnt = 0;
3223 int index; 3211 int index;
3224 3212
3225 QETH_DBF_TEXT(trace, 6, "dosndpfa"); 3213 QETH_DBF_TEXT(TRACE, 6, "dosndpfa");
3226 3214
3227 /* spin until we get the queue ... */ 3215 /* spin until we get the queue ... */
3228 while (atomic_cmpxchg(&queue->state, QETH_OUT_Q_UNLOCKED, 3216 while (atomic_cmpxchg(&queue->state, QETH_OUT_Q_UNLOCKED,
@@ -3275,7 +3263,7 @@ int qeth_do_send_packet(struct qeth_card *card, struct qeth_qdio_out_q *queue,
3275 int tmp; 3263 int tmp;
3276 int rc = 0; 3264 int rc = 0;
3277 3265
3278 QETH_DBF_TEXT(trace, 6, "dosndpkt"); 3266 QETH_DBF_TEXT(TRACE, 6, "dosndpkt");
3279 3267
3280 /* spin until we get the queue ... */ 3268 /* spin until we get the queue ... */
3281 while (atomic_cmpxchg(&queue->state, QETH_OUT_Q_UNLOCKED, 3269 while (atomic_cmpxchg(&queue->state, QETH_OUT_Q_UNLOCKED,
@@ -3382,14 +3370,14 @@ static int qeth_setadp_promisc_mode_cb(struct qeth_card *card,
3382 struct qeth_ipa_cmd *cmd; 3370 struct qeth_ipa_cmd *cmd;
3383 struct qeth_ipacmd_setadpparms *setparms; 3371 struct qeth_ipacmd_setadpparms *setparms;
3384 3372
3385 QETH_DBF_TEXT(trace, 4, "prmadpcb"); 3373 QETH_DBF_TEXT(TRACE, 4, "prmadpcb");
3386 3374
3387 cmd = (struct qeth_ipa_cmd *) data; 3375 cmd = (struct qeth_ipa_cmd *) data;
3388 setparms = &(cmd->data.setadapterparms); 3376 setparms = &(cmd->data.setadapterparms);
3389 3377
3390 qeth_default_setadapterparms_cb(card, reply, (unsigned long)cmd); 3378 qeth_default_setadapterparms_cb(card, reply, (unsigned long)cmd);
3391 if (cmd->hdr.return_code) { 3379 if (cmd->hdr.return_code) {
3392 QETH_DBF_TEXT_(trace, 4, "prmrc%2.2x", cmd->hdr.return_code); 3380 QETH_DBF_TEXT_(TRACE, 4, "prmrc%2.2x", cmd->hdr.return_code);
3393 setparms->data.mode = SET_PROMISC_MODE_OFF; 3381 setparms->data.mode = SET_PROMISC_MODE_OFF;
3394 } 3382 }
3395 card->info.promisc_mode = setparms->data.mode; 3383 card->info.promisc_mode = setparms->data.mode;
@@ -3403,7 +3391,7 @@ void qeth_setadp_promisc_mode(struct qeth_card *card)
3403 struct qeth_cmd_buffer *iob; 3391 struct qeth_cmd_buffer *iob;
3404 struct qeth_ipa_cmd *cmd; 3392 struct qeth_ipa_cmd *cmd;
3405 3393
3406 QETH_DBF_TEXT(trace, 4, "setprom"); 3394 QETH_DBF_TEXT(TRACE, 4, "setprom");
3407 3395
3408 if (((dev->flags & IFF_PROMISC) && 3396 if (((dev->flags & IFF_PROMISC) &&
3409 (card->info.promisc_mode == SET_PROMISC_MODE_ON)) || 3397 (card->info.promisc_mode == SET_PROMISC_MODE_ON)) ||
@@ -3413,7 +3401,7 @@ void qeth_setadp_promisc_mode(struct qeth_card *card)
3413 mode = SET_PROMISC_MODE_OFF; 3401 mode = SET_PROMISC_MODE_OFF;
3414 if (dev->flags & IFF_PROMISC) 3402 if (dev->flags & IFF_PROMISC)
3415 mode = SET_PROMISC_MODE_ON; 3403 mode = SET_PROMISC_MODE_ON;
3416 QETH_DBF_TEXT_(trace, 4, "mode:%x", mode); 3404 QETH_DBF_TEXT_(TRACE, 4, "mode:%x", mode);
3417 3405
3418 iob = qeth_get_adapter_cmd(card, IPA_SETADP_SET_PROMISC_MODE, 3406 iob = qeth_get_adapter_cmd(card, IPA_SETADP_SET_PROMISC_MODE,
3419 sizeof(struct qeth_ipacmd_setadpparms)); 3407 sizeof(struct qeth_ipacmd_setadpparms));
@@ -3430,9 +3418,9 @@ int qeth_change_mtu(struct net_device *dev, int new_mtu)
3430 3418
3431 card = netdev_priv(dev); 3419 card = netdev_priv(dev);
3432 3420
3433 QETH_DBF_TEXT(trace, 4, "chgmtu"); 3421 QETH_DBF_TEXT(TRACE, 4, "chgmtu");
3434 sprintf(dbf_text, "%8x", new_mtu); 3422 sprintf(dbf_text, "%8x", new_mtu);
3435 QETH_DBF_TEXT(trace, 4, dbf_text); 3423 QETH_DBF_TEXT(TRACE, 4, dbf_text);
3436 3424
3437 if (new_mtu < 64) 3425 if (new_mtu < 64)
3438 return -EINVAL; 3426 return -EINVAL;
@@ -3452,7 +3440,7 @@ struct net_device_stats *qeth_get_stats(struct net_device *dev)
3452 3440
3453 card = netdev_priv(dev); 3441 card = netdev_priv(dev);
3454 3442
3455 QETH_DBF_TEXT(trace, 5, "getstat"); 3443 QETH_DBF_TEXT(TRACE, 5, "getstat");
3456 3444
3457 return &card->stats; 3445 return &card->stats;
3458} 3446}
@@ -3463,7 +3451,7 @@ static int qeth_setadpparms_change_macaddr_cb(struct qeth_card *card,
3463{ 3451{
3464 struct qeth_ipa_cmd *cmd; 3452 struct qeth_ipa_cmd *cmd;
3465 3453
3466 QETH_DBF_TEXT(trace, 4, "chgmaccb"); 3454 QETH_DBF_TEXT(TRACE, 4, "chgmaccb");
3467 3455
3468 cmd = (struct qeth_ipa_cmd *) data; 3456 cmd = (struct qeth_ipa_cmd *) data;
3469 if (!card->options.layer2 || 3457 if (!card->options.layer2 ||
@@ -3483,7 +3471,7 @@ int qeth_setadpparms_change_macaddr(struct qeth_card *card)
3483 struct qeth_cmd_buffer *iob; 3471 struct qeth_cmd_buffer *iob;
3484 struct qeth_ipa_cmd *cmd; 3472 struct qeth_ipa_cmd *cmd;
3485 3473
3486 QETH_DBF_TEXT(trace, 4, "chgmac"); 3474 QETH_DBF_TEXT(TRACE, 4, "chgmac");
3487 3475
3488 iob = qeth_get_adapter_cmd(card, IPA_SETADP_ALTER_MAC_ADDRESS, 3476 iob = qeth_get_adapter_cmd(card, IPA_SETADP_ALTER_MAC_ADDRESS,
3489 sizeof(struct qeth_ipacmd_setadpparms)); 3477 sizeof(struct qeth_ipacmd_setadpparms));
@@ -3581,7 +3569,7 @@ static int qeth_send_ipa_snmp_cmd(struct qeth_card *card,
3581{ 3569{
3582 u16 s1, s2; 3570 u16 s1, s2;
3583 3571
3584 QETH_DBF_TEXT(trace, 4, "sendsnmp"); 3572 QETH_DBF_TEXT(TRACE, 4, "sendsnmp");
3585 3573
3586 memcpy(iob->data, IPA_PDU_HEADER, IPA_PDU_HEADER_SIZE); 3574 memcpy(iob->data, IPA_PDU_HEADER, IPA_PDU_HEADER_SIZE);
3587 memcpy(QETH_IPA_CMD_DEST_ADDR(iob->data), 3575 memcpy(QETH_IPA_CMD_DEST_ADDR(iob->data),
@@ -3606,7 +3594,7 @@ static int qeth_snmp_command_cb(struct qeth_card *card,
3606 unsigned char *data; 3594 unsigned char *data;
3607 __u16 data_len; 3595 __u16 data_len;
3608 3596
3609 QETH_DBF_TEXT(trace, 3, "snpcmdcb"); 3597 QETH_DBF_TEXT(TRACE, 3, "snpcmdcb");
3610 3598
3611 cmd = (struct qeth_ipa_cmd *) sdata; 3599 cmd = (struct qeth_ipa_cmd *) sdata;
3612 data = (unsigned char *)((char *)cmd - reply->offset); 3600 data = (unsigned char *)((char *)cmd - reply->offset);
@@ -3614,13 +3602,13 @@ static int qeth_snmp_command_cb(struct qeth_card *card,
3614 snmp = &cmd->data.setadapterparms.data.snmp; 3602 snmp = &cmd->data.setadapterparms.data.snmp;
3615 3603
3616 if (cmd->hdr.return_code) { 3604 if (cmd->hdr.return_code) {
3617 QETH_DBF_TEXT_(trace, 4, "scer1%i", cmd->hdr.return_code); 3605 QETH_DBF_TEXT_(TRACE, 4, "scer1%i", cmd->hdr.return_code);
3618 return 0; 3606 return 0;
3619 } 3607 }
3620 if (cmd->data.setadapterparms.hdr.return_code) { 3608 if (cmd->data.setadapterparms.hdr.return_code) {
3621 cmd->hdr.return_code = 3609 cmd->hdr.return_code =
3622 cmd->data.setadapterparms.hdr.return_code; 3610 cmd->data.setadapterparms.hdr.return_code;
3623 QETH_DBF_TEXT_(trace, 4, "scer2%i", cmd->hdr.return_code); 3611 QETH_DBF_TEXT_(TRACE, 4, "scer2%i", cmd->hdr.return_code);
3624 return 0; 3612 return 0;
3625 } 3613 }
3626 data_len = *((__u16 *)QETH_IPA_PDU_LEN_PDU1(data)); 3614 data_len = *((__u16 *)QETH_IPA_PDU_LEN_PDU1(data));
@@ -3631,13 +3619,13 @@ static int qeth_snmp_command_cb(struct qeth_card *card,
3631 3619
3632 /* check if there is enough room in userspace */ 3620 /* check if there is enough room in userspace */
3633 if ((qinfo->udata_len - qinfo->udata_offset) < data_len) { 3621 if ((qinfo->udata_len - qinfo->udata_offset) < data_len) {
3634 QETH_DBF_TEXT_(trace, 4, "scer3%i", -ENOMEM); 3622 QETH_DBF_TEXT_(TRACE, 4, "scer3%i", -ENOMEM);
3635 cmd->hdr.return_code = -ENOMEM; 3623 cmd->hdr.return_code = -ENOMEM;
3636 return 0; 3624 return 0;
3637 } 3625 }
3638 QETH_DBF_TEXT_(trace, 4, "snore%i", 3626 QETH_DBF_TEXT_(TRACE, 4, "snore%i",
3639 cmd->data.setadapterparms.hdr.used_total); 3627 cmd->data.setadapterparms.hdr.used_total);
3640 QETH_DBF_TEXT_(trace, 4, "sseqn%i", 3628 QETH_DBF_TEXT_(TRACE, 4, "sseqn%i",
3641 cmd->data.setadapterparms.hdr.seq_no); 3629 cmd->data.setadapterparms.hdr.seq_no);
3642 /*copy entries to user buffer*/ 3630 /*copy entries to user buffer*/
3643 if (cmd->data.setadapterparms.hdr.seq_no == 1) { 3631 if (cmd->data.setadapterparms.hdr.seq_no == 1) {
@@ -3651,9 +3639,9 @@ static int qeth_snmp_command_cb(struct qeth_card *card,
3651 } 3639 }
3652 qinfo->udata_offset += data_len; 3640 qinfo->udata_offset += data_len;
3653 /* check if all replies received ... */ 3641 /* check if all replies received ... */
3654 QETH_DBF_TEXT_(trace, 4, "srtot%i", 3642 QETH_DBF_TEXT_(TRACE, 4, "srtot%i",
3655 cmd->data.setadapterparms.hdr.used_total); 3643 cmd->data.setadapterparms.hdr.used_total);
3656 QETH_DBF_TEXT_(trace, 4, "srseq%i", 3644 QETH_DBF_TEXT_(TRACE, 4, "srseq%i",
3657 cmd->data.setadapterparms.hdr.seq_no); 3645 cmd->data.setadapterparms.hdr.seq_no);
3658 if (cmd->data.setadapterparms.hdr.seq_no < 3646 if (cmd->data.setadapterparms.hdr.seq_no <
3659 cmd->data.setadapterparms.hdr.used_total) 3647 cmd->data.setadapterparms.hdr.used_total)
@@ -3670,7 +3658,7 @@ int qeth_snmp_command(struct qeth_card *card, char __user *udata)
3670 struct qeth_arp_query_info qinfo = {0, }; 3658 struct qeth_arp_query_info qinfo = {0, };
3671 int rc = 0; 3659 int rc = 0;
3672 3660
3673 QETH_DBF_TEXT(trace, 3, "snmpcmd"); 3661 QETH_DBF_TEXT(TRACE, 3, "snmpcmd");
3674 3662
3675 if (card->info.guestlan) 3663 if (card->info.guestlan)
3676 return -EOPNOTSUPP; 3664 return -EOPNOTSUPP;
@@ -3686,7 +3674,7 @@ int qeth_snmp_command(struct qeth_card *card, char __user *udata)
3686 return -EFAULT; 3674 return -EFAULT;
3687 ureq = kmalloc(req_len+sizeof(struct qeth_snmp_ureq_hdr), GFP_KERNEL); 3675 ureq = kmalloc(req_len+sizeof(struct qeth_snmp_ureq_hdr), GFP_KERNEL);
3688 if (!ureq) { 3676 if (!ureq) {
3689 QETH_DBF_TEXT(trace, 2, "snmpnome"); 3677 QETH_DBF_TEXT(TRACE, 2, "snmpnome");
3690 return -ENOMEM; 3678 return -ENOMEM;
3691 } 3679 }
3692 if (copy_from_user(ureq, udata, 3680 if (copy_from_user(ureq, udata,
@@ -3741,7 +3729,7 @@ static int qeth_qdio_establish(struct qeth_card *card)
3741 int i, j, k; 3729 int i, j, k;
3742 int rc = 0; 3730 int rc = 0;
3743 3731
3744 QETH_DBF_TEXT(setup, 2, "qdioest"); 3732 QETH_DBF_TEXT(SETUP, 2, "qdioest");
3745 3733
3746 qib_param_field = kzalloc(QDIO_MAX_BUFFERS_PER_Q * sizeof(char), 3734 qib_param_field = kzalloc(QDIO_MAX_BUFFERS_PER_Q * sizeof(char),
3747 GFP_KERNEL); 3735 GFP_KERNEL);
@@ -3810,8 +3798,8 @@ static int qeth_qdio_establish(struct qeth_card *card)
3810static void qeth_core_free_card(struct qeth_card *card) 3798static void qeth_core_free_card(struct qeth_card *card)
3811{ 3799{
3812 3800
3813 QETH_DBF_TEXT(setup, 2, "freecrd"); 3801 QETH_DBF_TEXT(SETUP, 2, "freecrd");
3814 QETH_DBF_HEX(setup, 2, &card, sizeof(void *)); 3802 QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
3815 qeth_clean_channel(&card->read); 3803 qeth_clean_channel(&card->read);
3816 qeth_clean_channel(&card->write); 3804 qeth_clean_channel(&card->write);
3817 if (card->dev) 3805 if (card->dev)
@@ -3868,7 +3856,7 @@ int qeth_core_hardsetup_card(struct qeth_card *card)
3868 int mpno; 3856 int mpno;
3869 int rc; 3857 int rc;
3870 3858
3871 QETH_DBF_TEXT(setup, 2, "hrdsetup"); 3859 QETH_DBF_TEXT(SETUP, 2, "hrdsetup");
3872 atomic_set(&card->force_alloc_skb, 0); 3860 atomic_set(&card->force_alloc_skb, 0);
3873retry: 3861retry:
3874 if (retries < 3) { 3862 if (retries < 3) {
@@ -3882,10 +3870,10 @@ retry:
3882 } 3870 }
3883 rc = qeth_qdio_clear_card(card, card->info.type != QETH_CARD_TYPE_IQD); 3871 rc = qeth_qdio_clear_card(card, card->info.type != QETH_CARD_TYPE_IQD);
3884 if (rc == -ERESTARTSYS) { 3872 if (rc == -ERESTARTSYS) {
3885 QETH_DBF_TEXT(setup, 2, "break1"); 3873 QETH_DBF_TEXT(SETUP, 2, "break1");
3886 return rc; 3874 return rc;
3887 } else if (rc) { 3875 } else if (rc) {
3888 QETH_DBF_TEXT_(setup, 2, "1err%d", rc); 3876 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
3889 if (--retries < 0) 3877 if (--retries < 0)
3890 goto out; 3878 goto out;
3891 else 3879 else
@@ -3894,7 +3882,7 @@ retry:
3894 3882
3895 rc = qeth_get_unitaddr(card); 3883 rc = qeth_get_unitaddr(card);
3896 if (rc) { 3884 if (rc) {
3897 QETH_DBF_TEXT_(setup, 2, "2err%d", rc); 3885 QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
3898 return rc; 3886 return rc;
3899 } 3887 }
3900 3888
@@ -3909,10 +3897,10 @@ retry:
3909 qeth_init_func_level(card); 3897 qeth_init_func_level(card);
3910 rc = qeth_idx_activate_channel(&card->read, qeth_idx_read_cb); 3898 rc = qeth_idx_activate_channel(&card->read, qeth_idx_read_cb);
3911 if (rc == -ERESTARTSYS) { 3899 if (rc == -ERESTARTSYS) {
3912 QETH_DBF_TEXT(setup, 2, "break2"); 3900 QETH_DBF_TEXT(SETUP, 2, "break2");
3913 return rc; 3901 return rc;
3914 } else if (rc) { 3902 } else if (rc) {
3915 QETH_DBF_TEXT_(setup, 2, "3err%d", rc); 3903 QETH_DBF_TEXT_(SETUP, 2, "3err%d", rc);
3916 if (--retries < 0) 3904 if (--retries < 0)
3917 goto out; 3905 goto out;
3918 else 3906 else
@@ -3920,10 +3908,10 @@ retry:
3920 } 3908 }
3921 rc = qeth_idx_activate_channel(&card->write, qeth_idx_write_cb); 3909 rc = qeth_idx_activate_channel(&card->write, qeth_idx_write_cb);
3922 if (rc == -ERESTARTSYS) { 3910 if (rc == -ERESTARTSYS) {
3923 QETH_DBF_TEXT(setup, 2, "break3"); 3911 QETH_DBF_TEXT(SETUP, 2, "break3");
3924 return rc; 3912 return rc;
3925 } else if (rc) { 3913 } else if (rc) {
3926 QETH_DBF_TEXT_(setup, 2, "4err%d", rc); 3914 QETH_DBF_TEXT_(SETUP, 2, "4err%d", rc);
3927 if (--retries < 0) 3915 if (--retries < 0)
3928 goto out; 3916 goto out;
3929 else 3917 else
@@ -3931,7 +3919,7 @@ retry:
3931 } 3919 }
3932 rc = qeth_mpc_initialize(card); 3920 rc = qeth_mpc_initialize(card);
3933 if (rc) { 3921 if (rc) {
3934 QETH_DBF_TEXT_(setup, 2, "5err%d", rc); 3922 QETH_DBF_TEXT_(SETUP, 2, "5err%d", rc);
3935 goto out; 3923 goto out;
3936 } 3924 }
3937 return 0; 3925 return 0;
@@ -3992,7 +3980,7 @@ struct sk_buff *qeth_core_get_next_skb(struct qeth_card *card,
3992 int use_rx_sg = 0; 3980 int use_rx_sg = 0;
3993 int frag = 0; 3981 int frag = 0;
3994 3982
3995 QETH_DBF_TEXT(trace, 6, "nextskb"); 3983 QETH_DBF_TEXT(TRACE, 6, "nextskb");
3996 /* qeth_hdr must not cross element boundaries */ 3984 /* qeth_hdr must not cross element boundaries */
3997 if (element->length < offset + sizeof(struct qeth_hdr)) { 3985 if (element->length < offset + sizeof(struct qeth_hdr)) {
3998 if (qeth_is_last_sbale(element)) 3986 if (qeth_is_last_sbale(element))
@@ -4048,13 +4036,13 @@ struct sk_buff *qeth_core_get_next_skb(struct qeth_card *card,
4048 skb_len -= data_len; 4036 skb_len -= data_len;
4049 if (skb_len) { 4037 if (skb_len) {
4050 if (qeth_is_last_sbale(element)) { 4038 if (qeth_is_last_sbale(element)) {
4051 QETH_DBF_TEXT(trace, 4, "unexeob"); 4039 QETH_DBF_TEXT(TRACE, 4, "unexeob");
4052 QETH_DBF_TEXT_(trace, 4, "%s", 4040 QETH_DBF_TEXT_(TRACE, 4, "%s",
4053 CARD_BUS_ID(card)); 4041 CARD_BUS_ID(card));
4054 QETH_DBF_TEXT(qerr, 2, "unexeob"); 4042 QETH_DBF_TEXT(QERR, 2, "unexeob");
4055 QETH_DBF_TEXT_(qerr, 2, "%s", 4043 QETH_DBF_TEXT_(QERR, 2, "%s",
4056 CARD_BUS_ID(card)); 4044 CARD_BUS_ID(card));
4057 QETH_DBF_HEX(misc, 4, buffer, sizeof(*buffer)); 4045 QETH_DBF_HEX(MISC, 4, buffer, sizeof(*buffer));
4058 dev_kfree_skb_any(skb); 4046 dev_kfree_skb_any(skb);
4059 card->stats.rx_errors++; 4047 card->stats.rx_errors++;
4060 return NULL; 4048 return NULL;
@@ -4077,8 +4065,8 @@ no_mem:
4077 if (net_ratelimit()) { 4065 if (net_ratelimit()) {
4078 PRINT_WARN("No memory for packet received on %s.\n", 4066 PRINT_WARN("No memory for packet received on %s.\n",
4079 QETH_CARD_IFNAME(card)); 4067 QETH_CARD_IFNAME(card));
4080 QETH_DBF_TEXT(trace, 2, "noskbmem"); 4068 QETH_DBF_TEXT(TRACE, 2, "noskbmem");
4081 QETH_DBF_TEXT_(trace, 2, "%s", CARD_BUS_ID(card)); 4069 QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card));
4082 } 4070 }
4083 card->stats.rx_dropped++; 4071 card->stats.rx_dropped++;
4084 return NULL; 4072 return NULL;
@@ -4087,80 +4075,39 @@ EXPORT_SYMBOL_GPL(qeth_core_get_next_skb);
4087 4075
4088static void qeth_unregister_dbf_views(void) 4076static void qeth_unregister_dbf_views(void)
4089{ 4077{
4090 if (qeth_dbf_setup) 4078 int x;
4091 debug_unregister(qeth_dbf_setup); 4079 for (x = 0; x < QETH_DBF_INFOS; x++) {
4092 if (qeth_dbf_qerr) 4080 debug_unregister(qeth_dbf[x].id);
4093 debug_unregister(qeth_dbf_qerr); 4081 qeth_dbf[x].id = NULL;
4094 if (qeth_dbf_sense) 4082 }
4095 debug_unregister(qeth_dbf_sense);
4096 if (qeth_dbf_misc)
4097 debug_unregister(qeth_dbf_misc);
4098 if (qeth_dbf_data)
4099 debug_unregister(qeth_dbf_data);
4100 if (qeth_dbf_control)
4101 debug_unregister(qeth_dbf_control);
4102 if (qeth_dbf_trace)
4103 debug_unregister(qeth_dbf_trace);
4104} 4083}
4105 4084
4106static int qeth_register_dbf_views(void) 4085static int qeth_register_dbf_views(void)
4107{ 4086{
4108 qeth_dbf_setup = debug_register(QETH_DBF_SETUP_NAME, 4087 int ret;
4109 QETH_DBF_SETUP_PAGES, 4088 int x;
4110 QETH_DBF_SETUP_NR_AREAS, 4089
4111 QETH_DBF_SETUP_LEN); 4090 for (x = 0; x < QETH_DBF_INFOS; x++) {
4112 qeth_dbf_misc = debug_register(QETH_DBF_MISC_NAME, 4091 /* register the areas */
4113 QETH_DBF_MISC_PAGES, 4092 qeth_dbf[x].id = debug_register(qeth_dbf[x].name,
4114 QETH_DBF_MISC_NR_AREAS, 4093 qeth_dbf[x].pages,
4115 QETH_DBF_MISC_LEN); 4094 qeth_dbf[x].areas,
4116 qeth_dbf_data = debug_register(QETH_DBF_DATA_NAME, 4095 qeth_dbf[x].len);
4117 QETH_DBF_DATA_PAGES, 4096 if (qeth_dbf[x].id == NULL) {
4118 QETH_DBF_DATA_NR_AREAS, 4097 qeth_unregister_dbf_views();
4119 QETH_DBF_DATA_LEN); 4098 return -ENOMEM;
4120 qeth_dbf_control = debug_register(QETH_DBF_CONTROL_NAME, 4099 }
4121 QETH_DBF_CONTROL_PAGES,
4122 QETH_DBF_CONTROL_NR_AREAS,
4123 QETH_DBF_CONTROL_LEN);
4124 qeth_dbf_sense = debug_register(QETH_DBF_SENSE_NAME,
4125 QETH_DBF_SENSE_PAGES,
4126 QETH_DBF_SENSE_NR_AREAS,
4127 QETH_DBF_SENSE_LEN);
4128 qeth_dbf_qerr = debug_register(QETH_DBF_QERR_NAME,
4129 QETH_DBF_QERR_PAGES,
4130 QETH_DBF_QERR_NR_AREAS,
4131 QETH_DBF_QERR_LEN);
4132 qeth_dbf_trace = debug_register(QETH_DBF_TRACE_NAME,
4133 QETH_DBF_TRACE_PAGES,
4134 QETH_DBF_TRACE_NR_AREAS,
4135 QETH_DBF_TRACE_LEN);
4136
4137 if ((qeth_dbf_setup == NULL) || (qeth_dbf_misc == NULL) ||
4138 (qeth_dbf_data == NULL) || (qeth_dbf_control == NULL) ||
4139 (qeth_dbf_sense == NULL) || (qeth_dbf_qerr == NULL) ||
4140 (qeth_dbf_trace == NULL)) {
4141 qeth_unregister_dbf_views();
4142 return -ENOMEM;
4143 }
4144 debug_register_view(qeth_dbf_setup, &debug_hex_ascii_view);
4145 debug_set_level(qeth_dbf_setup, QETH_DBF_SETUP_LEVEL);
4146
4147 debug_register_view(qeth_dbf_misc, &debug_hex_ascii_view);
4148 debug_set_level(qeth_dbf_misc, QETH_DBF_MISC_LEVEL);
4149
4150 debug_register_view(qeth_dbf_data, &debug_hex_ascii_view);
4151 debug_set_level(qeth_dbf_data, QETH_DBF_DATA_LEVEL);
4152
4153 debug_register_view(qeth_dbf_control, &debug_hex_ascii_view);
4154 debug_set_level(qeth_dbf_control, QETH_DBF_CONTROL_LEVEL);
4155
4156 debug_register_view(qeth_dbf_sense, &debug_hex_ascii_view);
4157 debug_set_level(qeth_dbf_sense, QETH_DBF_SENSE_LEVEL);
4158 4100
4159 debug_register_view(qeth_dbf_qerr, &debug_hex_ascii_view); 4101 /* register a view */
4160 debug_set_level(qeth_dbf_qerr, QETH_DBF_QERR_LEVEL); 4102 ret = debug_register_view(qeth_dbf[x].id, qeth_dbf[x].view);
4103 if (ret) {
4104 qeth_unregister_dbf_views();
4105 return ret;
4106 }
4161 4107
4162 debug_register_view(qeth_dbf_trace, &debug_hex_ascii_view); 4108 /* set a passing level */
4163 debug_set_level(qeth_dbf_trace, QETH_DBF_TRACE_LEVEL); 4109 debug_set_level(qeth_dbf[x].id, qeth_dbf[x].level);
4110 }
4164 4111
4165 return 0; 4112 return 0;
4166} 4113}
@@ -4205,17 +4152,17 @@ static int qeth_core_probe_device(struct ccwgroup_device *gdev)
4205 int rc; 4152 int rc;
4206 unsigned long flags; 4153 unsigned long flags;
4207 4154
4208 QETH_DBF_TEXT(setup, 2, "probedev"); 4155 QETH_DBF_TEXT(SETUP, 2, "probedev");
4209 4156
4210 dev = &gdev->dev; 4157 dev = &gdev->dev;
4211 if (!get_device(dev)) 4158 if (!get_device(dev))
4212 return -ENODEV; 4159 return -ENODEV;
4213 4160
4214 QETH_DBF_TEXT_(setup, 2, "%s", gdev->dev.bus_id); 4161 QETH_DBF_TEXT_(SETUP, 2, "%s", gdev->dev.bus_id);
4215 4162
4216 card = qeth_alloc_card(); 4163 card = qeth_alloc_card();
4217 if (!card) { 4164 if (!card) {
4218 QETH_DBF_TEXT_(setup, 2, "1err%d", -ENOMEM); 4165 QETH_DBF_TEXT_(SETUP, 2, "1err%d", -ENOMEM);
4219 rc = -ENOMEM; 4166 rc = -ENOMEM;
4220 goto err_dev; 4167 goto err_dev;
4221 } 4168 }
@@ -4231,12 +4178,12 @@ static int qeth_core_probe_device(struct ccwgroup_device *gdev)
4231 rc = qeth_determine_card_type(card); 4178 rc = qeth_determine_card_type(card);
4232 if (rc) { 4179 if (rc) {
4233 PRINT_WARN("%s: not a valid card type\n", __func__); 4180 PRINT_WARN("%s: not a valid card type\n", __func__);
4234 QETH_DBF_TEXT_(setup, 2, "3err%d", rc); 4181 QETH_DBF_TEXT_(SETUP, 2, "3err%d", rc);
4235 goto err_card; 4182 goto err_card;
4236 } 4183 }
4237 rc = qeth_setup_card(card); 4184 rc = qeth_setup_card(card);
4238 if (rc) { 4185 if (rc) {
4239 QETH_DBF_TEXT_(setup, 2, "2err%d", rc); 4186 QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
4240 goto err_card; 4187 goto err_card;
4241 } 4188 }
4242 4189
diff --git a/drivers/s390/net/qeth_core_mpc.c b/drivers/s390/net/qeth_core_mpc.c
index 441533f2062e..06f4de1f0507 100644
--- a/drivers/s390/net/qeth_core_mpc.c
+++ b/drivers/s390/net/qeth_core_mpc.c
@@ -230,7 +230,7 @@ static struct ipa_cmd_names qeth_ipa_cmd_names[] = {
230 {IPA_CMD_STARTLAN, "startlan"}, 230 {IPA_CMD_STARTLAN, "startlan"},
231 {IPA_CMD_STOPLAN, "stoplan"}, 231 {IPA_CMD_STOPLAN, "stoplan"},
232 {IPA_CMD_SETVMAC, "setvmac"}, 232 {IPA_CMD_SETVMAC, "setvmac"},
233 {IPA_CMD_DELVMAC, "delvmca"}, 233 {IPA_CMD_DELVMAC, "delvmac"},
234 {IPA_CMD_SETGMAC, "setgmac"}, 234 {IPA_CMD_SETGMAC, "setgmac"},
235 {IPA_CMD_DELGMAC, "delgmac"}, 235 {IPA_CMD_DELGMAC, "delgmac"},
236 {IPA_CMD_SETVLAN, "setvlan"}, 236 {IPA_CMD_SETVLAN, "setvlan"},
diff --git a/drivers/s390/net/qeth_core_offl.c b/drivers/s390/net/qeth_core_offl.c
index 8b407d6a83cf..822df8362856 100644
--- a/drivers/s390/net/qeth_core_offl.c
+++ b/drivers/s390/net/qeth_core_offl.c
@@ -31,7 +31,7 @@ int qeth_eddp_check_buffers_for_context(struct qeth_qdio_out_q *queue,
31 int skbs_in_buffer; 31 int skbs_in_buffer;
32 int buffers_needed = 0; 32 int buffers_needed = 0;
33 33
34 QETH_DBF_TEXT(trace, 5, "eddpcbfc"); 34 QETH_DBF_TEXT(TRACE, 5, "eddpcbfc");
35 while (elements_needed > 0) { 35 while (elements_needed > 0) {
36 buffers_needed++; 36 buffers_needed++;
37 if (atomic_read(&queue->bufs[index].state) != 37 if (atomic_read(&queue->bufs[index].state) !=
@@ -51,7 +51,7 @@ static void qeth_eddp_free_context(struct qeth_eddp_context *ctx)
51{ 51{
52 int i; 52 int i;
53 53
54 QETH_DBF_TEXT(trace, 5, "eddpfctx"); 54 QETH_DBF_TEXT(TRACE, 5, "eddpfctx");
55 for (i = 0; i < ctx->num_pages; ++i) 55 for (i = 0; i < ctx->num_pages; ++i)
56 free_page((unsigned long)ctx->pages[i]); 56 free_page((unsigned long)ctx->pages[i]);
57 kfree(ctx->pages); 57 kfree(ctx->pages);
@@ -76,7 +76,7 @@ void qeth_eddp_buf_release_contexts(struct qeth_qdio_out_buffer *buf)
76{ 76{
77 struct qeth_eddp_context_reference *ref; 77 struct qeth_eddp_context_reference *ref;
78 78
79 QETH_DBF_TEXT(trace, 6, "eddprctx"); 79 QETH_DBF_TEXT(TRACE, 6, "eddprctx");
80 while (!list_empty(&buf->ctx_list)) { 80 while (!list_empty(&buf->ctx_list)) {
81 ref = list_entry(buf->ctx_list.next, 81 ref = list_entry(buf->ctx_list.next,
82 struct qeth_eddp_context_reference, list); 82 struct qeth_eddp_context_reference, list);
@@ -91,7 +91,7 @@ static int qeth_eddp_buf_ref_context(struct qeth_qdio_out_buffer *buf,
91{ 91{
92 struct qeth_eddp_context_reference *ref; 92 struct qeth_eddp_context_reference *ref;
93 93
94 QETH_DBF_TEXT(trace, 6, "eddprfcx"); 94 QETH_DBF_TEXT(TRACE, 6, "eddprfcx");
95 ref = kmalloc(sizeof(struct qeth_eddp_context_reference), GFP_ATOMIC); 95 ref = kmalloc(sizeof(struct qeth_eddp_context_reference), GFP_ATOMIC);
96 if (ref == NULL) 96 if (ref == NULL)
97 return -ENOMEM; 97 return -ENOMEM;
@@ -112,7 +112,7 @@ int qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue,
112 int must_refcnt = 1; 112 int must_refcnt = 1;
113 int i; 113 int i;
114 114
115 QETH_DBF_TEXT(trace, 5, "eddpfibu"); 115 QETH_DBF_TEXT(TRACE, 5, "eddpfibu");
116 while (elements > 0) { 116 while (elements > 0) {
117 buf = &queue->bufs[index]; 117 buf = &queue->bufs[index];
118 if (atomic_read(&buf->state) != QETH_QDIO_BUF_EMPTY) { 118 if (atomic_read(&buf->state) != QETH_QDIO_BUF_EMPTY) {
@@ -166,7 +166,7 @@ int qeth_eddp_fill_buffer(struct qeth_qdio_out_q *queue,
166 } 166 }
167out_check: 167out_check:
168 if (!queue->do_pack) { 168 if (!queue->do_pack) {
169 QETH_DBF_TEXT(trace, 6, "fillbfnp"); 169 QETH_DBF_TEXT(TRACE, 6, "fillbfnp");
170 /* set state to PRIMED -> will be flushed */ 170 /* set state to PRIMED -> will be flushed */
171 if (buf->next_element_to_fill > 0) { 171 if (buf->next_element_to_fill > 0) {
172 atomic_set(&buf->state, QETH_QDIO_BUF_PRIMED); 172 atomic_set(&buf->state, QETH_QDIO_BUF_PRIMED);
@@ -175,7 +175,7 @@ out_check:
175 } else { 175 } else {
176 if (queue->card->options.performance_stats) 176 if (queue->card->options.performance_stats)
177 queue->card->perf_stats.skbs_sent_pack++; 177 queue->card->perf_stats.skbs_sent_pack++;
178 QETH_DBF_TEXT(trace, 6, "fillbfpa"); 178 QETH_DBF_TEXT(TRACE, 6, "fillbfpa");
179 if (buf->next_element_to_fill >= 179 if (buf->next_element_to_fill >=
180 QETH_MAX_BUFFER_ELEMENTS(queue->card)) { 180 QETH_MAX_BUFFER_ELEMENTS(queue->card)) {
181 /* 181 /*
@@ -199,7 +199,7 @@ static void qeth_eddp_create_segment_hdrs(struct qeth_eddp_context *ctx,
199 int pkt_len; 199 int pkt_len;
200 struct qeth_eddp_element *element; 200 struct qeth_eddp_element *element;
201 201
202 QETH_DBF_TEXT(trace, 5, "eddpcrsh"); 202 QETH_DBF_TEXT(TRACE, 5, "eddpcrsh");
203 page = ctx->pages[ctx->offset >> PAGE_SHIFT]; 203 page = ctx->pages[ctx->offset >> PAGE_SHIFT];
204 page_offset = ctx->offset % PAGE_SIZE; 204 page_offset = ctx->offset % PAGE_SIZE;
205 element = &ctx->elements[ctx->num_elements]; 205 element = &ctx->elements[ctx->num_elements];
@@ -257,7 +257,7 @@ static void qeth_eddp_copy_data_tcp(char *dst, struct qeth_eddp_data *eddp,
257 int copy_len; 257 int copy_len;
258 u8 *src; 258 u8 *src;
259 259
260 QETH_DBF_TEXT(trace, 5, "eddpcdtc"); 260 QETH_DBF_TEXT(TRACE, 5, "eddpcdtc");
261 if (skb_shinfo(eddp->skb)->nr_frags == 0) { 261 if (skb_shinfo(eddp->skb)->nr_frags == 0) {
262 skb_copy_from_linear_data_offset(eddp->skb, eddp->skb_offset, 262 skb_copy_from_linear_data_offset(eddp->skb, eddp->skb_offset,
263 dst, len); 263 dst, len);
@@ -305,7 +305,7 @@ static void qeth_eddp_create_segment_data_tcp(struct qeth_eddp_context *ctx,
305 struct qeth_eddp_element *element; 305 struct qeth_eddp_element *element;
306 int first_lap = 1; 306 int first_lap = 1;
307 307
308 QETH_DBF_TEXT(trace, 5, "eddpcsdt"); 308 QETH_DBF_TEXT(TRACE, 5, "eddpcsdt");
309 page = ctx->pages[ctx->offset >> PAGE_SHIFT]; 309 page = ctx->pages[ctx->offset >> PAGE_SHIFT];
310 page_offset = ctx->offset % PAGE_SIZE; 310 page_offset = ctx->offset % PAGE_SIZE;
311 element = &ctx->elements[ctx->num_elements]; 311 element = &ctx->elements[ctx->num_elements];
@@ -346,7 +346,7 @@ static __wsum qeth_eddp_check_tcp4_hdr(struct qeth_eddp_data *eddp,
346{ 346{
347 __wsum phcsum; /* pseudo header checksum */ 347 __wsum phcsum; /* pseudo header checksum */
348 348
349 QETH_DBF_TEXT(trace, 5, "eddpckt4"); 349 QETH_DBF_TEXT(TRACE, 5, "eddpckt4");
350 eddp->th.tcp.h.check = 0; 350 eddp->th.tcp.h.check = 0;
351 /* compute pseudo header checksum */ 351 /* compute pseudo header checksum */
352 phcsum = csum_tcpudp_nofold(eddp->nh.ip4.h.saddr, eddp->nh.ip4.h.daddr, 352 phcsum = csum_tcpudp_nofold(eddp->nh.ip4.h.saddr, eddp->nh.ip4.h.daddr,
@@ -361,7 +361,7 @@ static __wsum qeth_eddp_check_tcp6_hdr(struct qeth_eddp_data *eddp,
361 __be32 proto; 361 __be32 proto;
362 __wsum phcsum; /* pseudo header checksum */ 362 __wsum phcsum; /* pseudo header checksum */
363 363
364 QETH_DBF_TEXT(trace, 5, "eddpckt6"); 364 QETH_DBF_TEXT(TRACE, 5, "eddpckt6");
365 eddp->th.tcp.h.check = 0; 365 eddp->th.tcp.h.check = 0;
366 /* compute pseudo header checksum */ 366 /* compute pseudo header checksum */
367 phcsum = csum_partial((u8 *)&eddp->nh.ip6.h.saddr, 367 phcsum = csum_partial((u8 *)&eddp->nh.ip6.h.saddr,
@@ -378,7 +378,7 @@ static struct qeth_eddp_data *qeth_eddp_create_eddp_data(struct qeth_hdr *qh,
378{ 378{
379 struct qeth_eddp_data *eddp; 379 struct qeth_eddp_data *eddp;
380 380
381 QETH_DBF_TEXT(trace, 5, "eddpcrda"); 381 QETH_DBF_TEXT(TRACE, 5, "eddpcrda");
382 eddp = kzalloc(sizeof(struct qeth_eddp_data), GFP_ATOMIC); 382 eddp = kzalloc(sizeof(struct qeth_eddp_data), GFP_ATOMIC);
383 if (eddp) { 383 if (eddp) {
384 eddp->nhl = nhl; 384 eddp->nhl = nhl;
@@ -398,7 +398,7 @@ static void __qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx,
398 int data_len; 398 int data_len;
399 __wsum hcsum; 399 __wsum hcsum;
400 400
401 QETH_DBF_TEXT(trace, 5, "eddpftcp"); 401 QETH_DBF_TEXT(TRACE, 5, "eddpftcp");
402 eddp->skb_offset = sizeof(struct qeth_hdr) + eddp->nhl + eddp->thl; 402 eddp->skb_offset = sizeof(struct qeth_hdr) + eddp->nhl + eddp->thl;
403 if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2) { 403 if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2) {
404 eddp->skb_offset += sizeof(struct ethhdr); 404 eddp->skb_offset += sizeof(struct ethhdr);
@@ -457,7 +457,7 @@ static int qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx,
457{ 457{
458 struct qeth_eddp_data *eddp = NULL; 458 struct qeth_eddp_data *eddp = NULL;
459 459
460 QETH_DBF_TEXT(trace, 5, "eddpficx"); 460 QETH_DBF_TEXT(TRACE, 5, "eddpficx");
461 /* create our segmentation headers and copy original headers */ 461 /* create our segmentation headers and copy original headers */
462 if (skb->protocol == htons(ETH_P_IP)) 462 if (skb->protocol == htons(ETH_P_IP))
463 eddp = qeth_eddp_create_eddp_data(qhdr, 463 eddp = qeth_eddp_create_eddp_data(qhdr,
@@ -473,7 +473,7 @@ static int qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx,
473 tcp_hdrlen(skb)); 473 tcp_hdrlen(skb));
474 474
475 if (eddp == NULL) { 475 if (eddp == NULL) {
476 QETH_DBF_TEXT(trace, 2, "eddpfcnm"); 476 QETH_DBF_TEXT(TRACE, 2, "eddpfcnm");
477 return -ENOMEM; 477 return -ENOMEM;
478 } 478 }
479 if (qhdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) { 479 if (qhdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) {
@@ -499,7 +499,7 @@ static void qeth_eddp_calc_num_pages(struct qeth_eddp_context *ctx,
499{ 499{
500 int skbs_per_page; 500 int skbs_per_page;
501 501
502 QETH_DBF_TEXT(trace, 5, "eddpcanp"); 502 QETH_DBF_TEXT(TRACE, 5, "eddpcanp");
503 /* can we put multiple skbs in one page? */ 503 /* can we put multiple skbs in one page? */
504 skbs_per_page = PAGE_SIZE / (skb_shinfo(skb)->gso_size + hdr_len); 504 skbs_per_page = PAGE_SIZE / (skb_shinfo(skb)->gso_size + hdr_len);
505 if (skbs_per_page > 1) { 505 if (skbs_per_page > 1) {
@@ -524,30 +524,30 @@ static struct qeth_eddp_context *qeth_eddp_create_context_generic(
524 u8 *addr; 524 u8 *addr;
525 int i; 525 int i;
526 526
527 QETH_DBF_TEXT(trace, 5, "creddpcg"); 527 QETH_DBF_TEXT(TRACE, 5, "creddpcg");
528 /* create the context and allocate pages */ 528 /* create the context and allocate pages */
529 ctx = kzalloc(sizeof(struct qeth_eddp_context), GFP_ATOMIC); 529 ctx = kzalloc(sizeof(struct qeth_eddp_context), GFP_ATOMIC);
530 if (ctx == NULL) { 530 if (ctx == NULL) {
531 QETH_DBF_TEXT(trace, 2, "ceddpcn1"); 531 QETH_DBF_TEXT(TRACE, 2, "ceddpcn1");
532 return NULL; 532 return NULL;
533 } 533 }
534 ctx->type = QETH_LARGE_SEND_EDDP; 534 ctx->type = QETH_LARGE_SEND_EDDP;
535 qeth_eddp_calc_num_pages(ctx, skb, hdr_len); 535 qeth_eddp_calc_num_pages(ctx, skb, hdr_len);
536 if (ctx->elements_per_skb > QETH_MAX_BUFFER_ELEMENTS(card)) { 536 if (ctx->elements_per_skb > QETH_MAX_BUFFER_ELEMENTS(card)) {
537 QETH_DBF_TEXT(trace, 2, "ceddpcis"); 537 QETH_DBF_TEXT(TRACE, 2, "ceddpcis");
538 kfree(ctx); 538 kfree(ctx);
539 return NULL; 539 return NULL;
540 } 540 }
541 ctx->pages = kcalloc(ctx->num_pages, sizeof(u8 *), GFP_ATOMIC); 541 ctx->pages = kcalloc(ctx->num_pages, sizeof(u8 *), GFP_ATOMIC);
542 if (ctx->pages == NULL) { 542 if (ctx->pages == NULL) {
543 QETH_DBF_TEXT(trace, 2, "ceddpcn2"); 543 QETH_DBF_TEXT(TRACE, 2, "ceddpcn2");
544 kfree(ctx); 544 kfree(ctx);
545 return NULL; 545 return NULL;
546 } 546 }
547 for (i = 0; i < ctx->num_pages; ++i) { 547 for (i = 0; i < ctx->num_pages; ++i) {
548 addr = (u8 *)get_zeroed_page(GFP_ATOMIC); 548 addr = (u8 *)get_zeroed_page(GFP_ATOMIC);
549 if (addr == NULL) { 549 if (addr == NULL) {
550 QETH_DBF_TEXT(trace, 2, "ceddpcn3"); 550 QETH_DBF_TEXT(TRACE, 2, "ceddpcn3");
551 ctx->num_pages = i; 551 ctx->num_pages = i;
552 qeth_eddp_free_context(ctx); 552 qeth_eddp_free_context(ctx);
553 return NULL; 553 return NULL;
@@ -557,7 +557,7 @@ static struct qeth_eddp_context *qeth_eddp_create_context_generic(
557 ctx->elements = kcalloc(ctx->num_elements, 557 ctx->elements = kcalloc(ctx->num_elements,
558 sizeof(struct qeth_eddp_element), GFP_ATOMIC); 558 sizeof(struct qeth_eddp_element), GFP_ATOMIC);
559 if (ctx->elements == NULL) { 559 if (ctx->elements == NULL) {
560 QETH_DBF_TEXT(trace, 2, "ceddpcn4"); 560 QETH_DBF_TEXT(TRACE, 2, "ceddpcn4");
561 qeth_eddp_free_context(ctx); 561 qeth_eddp_free_context(ctx);
562 return NULL; 562 return NULL;
563 } 563 }
@@ -573,7 +573,7 @@ static struct qeth_eddp_context *qeth_eddp_create_context_tcp(
573{ 573{
574 struct qeth_eddp_context *ctx = NULL; 574 struct qeth_eddp_context *ctx = NULL;
575 575
576 QETH_DBF_TEXT(trace, 5, "creddpct"); 576 QETH_DBF_TEXT(TRACE, 5, "creddpct");
577 if (skb->protocol == htons(ETH_P_IP)) 577 if (skb->protocol == htons(ETH_P_IP))
578 ctx = qeth_eddp_create_context_generic(card, skb, 578 ctx = qeth_eddp_create_context_generic(card, skb,
579 (sizeof(struct qeth_hdr) + 579 (sizeof(struct qeth_hdr) +
@@ -584,14 +584,14 @@ static struct qeth_eddp_context *qeth_eddp_create_context_tcp(
584 sizeof(struct qeth_hdr) + sizeof(struct ipv6hdr) + 584 sizeof(struct qeth_hdr) + sizeof(struct ipv6hdr) +
585 tcp_hdrlen(skb)); 585 tcp_hdrlen(skb));
586 else 586 else
587 QETH_DBF_TEXT(trace, 2, "cetcpinv"); 587 QETH_DBF_TEXT(TRACE, 2, "cetcpinv");
588 588
589 if (ctx == NULL) { 589 if (ctx == NULL) {
590 QETH_DBF_TEXT(trace, 2, "creddpnl"); 590 QETH_DBF_TEXT(TRACE, 2, "creddpnl");
591 return NULL; 591 return NULL;
592 } 592 }
593 if (qeth_eddp_fill_context_tcp(ctx, skb, qhdr)) { 593 if (qeth_eddp_fill_context_tcp(ctx, skb, qhdr)) {
594 QETH_DBF_TEXT(trace, 2, "ceddptfe"); 594 QETH_DBF_TEXT(TRACE, 2, "ceddptfe");
595 qeth_eddp_free_context(ctx); 595 qeth_eddp_free_context(ctx);
596 return NULL; 596 return NULL;
597 } 597 }
@@ -603,12 +603,12 @@ struct qeth_eddp_context *qeth_eddp_create_context(struct qeth_card *card,
603 struct sk_buff *skb, struct qeth_hdr *qhdr, 603 struct sk_buff *skb, struct qeth_hdr *qhdr,
604 unsigned char sk_protocol) 604 unsigned char sk_protocol)
605{ 605{
606 QETH_DBF_TEXT(trace, 5, "creddpc"); 606 QETH_DBF_TEXT(TRACE, 5, "creddpc");
607 switch (sk_protocol) { 607 switch (sk_protocol) {
608 case IPPROTO_TCP: 608 case IPPROTO_TCP:
609 return qeth_eddp_create_context_tcp(card, skb, qhdr); 609 return qeth_eddp_create_context_tcp(card, skb, qhdr);
610 default: 610 default:
611 QETH_DBF_TEXT(trace, 2, "eddpinvp"); 611 QETH_DBF_TEXT(TRACE, 2, "eddpinvp");
612 } 612 }
613 return NULL; 613 return NULL;
614} 614}
@@ -622,7 +622,7 @@ void qeth_tso_fill_header(struct qeth_card *card, struct qeth_hdr *qhdr,
622 struct iphdr *iph = ip_hdr(skb); 622 struct iphdr *iph = ip_hdr(skb);
623 struct ipv6hdr *ip6h = ipv6_hdr(skb); 623 struct ipv6hdr *ip6h = ipv6_hdr(skb);
624 624
625 QETH_DBF_TEXT(trace, 5, "tsofhdr"); 625 QETH_DBF_TEXT(TRACE, 5, "tsofhdr");
626 626
627 /*fix header to TSO values ...*/ 627 /*fix header to TSO values ...*/
628 hdr->hdr.hdr.l3.id = QETH_HEADER_TYPE_TSO; 628 hdr->hdr.hdr.l3.id = QETH_HEADER_TYPE_TSO;
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 0263d9406fcf..3921d1631a78 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -22,16 +22,7 @@
22#include "qeth_core.h" 22#include "qeth_core.h"
23#include "qeth_core_offl.h" 23#include "qeth_core_offl.h"
24 24
25#define QETH_DBF_TEXT_(name, level, text...) \ 25#define QETH_DBF_TXT_BUF qeth_l2_dbf_txt_buf
26 do { \
27 if (qeth_dbf_passes(qeth_dbf_##name, level)) { \
28 char *dbf_txt_buf = get_cpu_var(qeth_l2_dbf_txt_buf); \
29 sprintf(dbf_txt_buf, text); \
30 debug_text_event(qeth_dbf_##name, level, dbf_txt_buf); \
31 put_cpu_var(qeth_l2_dbf_txt_buf); \
32 } \
33 } while (0)
34
35static DEFINE_PER_CPU(char[256], qeth_l2_dbf_txt_buf); 26static DEFINE_PER_CPU(char[256], qeth_l2_dbf_txt_buf);
36 27
37static int qeth_l2_set_offline(struct ccwgroup_device *); 28static int qeth_l2_set_offline(struct ccwgroup_device *);
@@ -87,7 +78,7 @@ static int qeth_l2_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
87 rc = -EOPNOTSUPP; 78 rc = -EOPNOTSUPP;
88 } 79 }
89 if (rc) 80 if (rc)
90 QETH_DBF_TEXT_(trace, 2, "ioce%d", rc); 81 QETH_DBF_TEXT_(TRACE, 2, "ioce%d", rc);
91 return rc; 82 return rc;
92} 83}
93 84
@@ -141,7 +132,7 @@ static int qeth_l2_send_setgroupmac_cb(struct qeth_card *card,
141 struct qeth_ipa_cmd *cmd; 132 struct qeth_ipa_cmd *cmd;
142 __u8 *mac; 133 __u8 *mac;
143 134
144 QETH_DBF_TEXT(trace, 2, "L2Sgmacb"); 135 QETH_DBF_TEXT(TRACE, 2, "L2Sgmacb");
145 cmd = (struct qeth_ipa_cmd *) data; 136 cmd = (struct qeth_ipa_cmd *) data;
146 mac = &cmd->data.setdelmac.mac[0]; 137 mac = &cmd->data.setdelmac.mac[0];
147 /* MAC already registered, needed in couple/uncouple case */ 138 /* MAC already registered, needed in couple/uncouple case */
@@ -162,7 +153,7 @@ static int qeth_l2_send_setgroupmac_cb(struct qeth_card *card,
162 153
163static int qeth_l2_send_setgroupmac(struct qeth_card *card, __u8 *mac) 154static int qeth_l2_send_setgroupmac(struct qeth_card *card, __u8 *mac)
164{ 155{
165 QETH_DBF_TEXT(trace, 2, "L2Sgmac"); 156 QETH_DBF_TEXT(TRACE, 2, "L2Sgmac");
166 return qeth_l2_send_setdelmac(card, mac, IPA_CMD_SETGMAC, 157 return qeth_l2_send_setdelmac(card, mac, IPA_CMD_SETGMAC,
167 qeth_l2_send_setgroupmac_cb); 158 qeth_l2_send_setgroupmac_cb);
168} 159}
@@ -174,7 +165,7 @@ static int qeth_l2_send_delgroupmac_cb(struct qeth_card *card,
174 struct qeth_ipa_cmd *cmd; 165 struct qeth_ipa_cmd *cmd;
175 __u8 *mac; 166 __u8 *mac;
176 167
177 QETH_DBF_TEXT(trace, 2, "L2Dgmacb"); 168 QETH_DBF_TEXT(TRACE, 2, "L2Dgmacb");
178 cmd = (struct qeth_ipa_cmd *) data; 169 cmd = (struct qeth_ipa_cmd *) data;
179 mac = &cmd->data.setdelmac.mac[0]; 170 mac = &cmd->data.setdelmac.mac[0];
180 if (cmd->hdr.return_code) 171 if (cmd->hdr.return_code)
@@ -187,7 +178,7 @@ static int qeth_l2_send_delgroupmac_cb(struct qeth_card *card,
187 178
188static int qeth_l2_send_delgroupmac(struct qeth_card *card, __u8 *mac) 179static int qeth_l2_send_delgroupmac(struct qeth_card *card, __u8 *mac)
189{ 180{
190 QETH_DBF_TEXT(trace, 2, "L2Dgmac"); 181 QETH_DBF_TEXT(TRACE, 2, "L2Dgmac");
191 return qeth_l2_send_setdelmac(card, mac, IPA_CMD_DELGMAC, 182 return qeth_l2_send_setdelmac(card, mac, IPA_CMD_DELGMAC,
192 qeth_l2_send_delgroupmac_cb); 183 qeth_l2_send_delgroupmac_cb);
193} 184}
@@ -289,15 +280,15 @@ static int qeth_l2_send_setdelvlan_cb(struct qeth_card *card,
289{ 280{
290 struct qeth_ipa_cmd *cmd; 281 struct qeth_ipa_cmd *cmd;
291 282
292 QETH_DBF_TEXT(trace, 2, "L2sdvcb"); 283 QETH_DBF_TEXT(TRACE, 2, "L2sdvcb");
293 cmd = (struct qeth_ipa_cmd *) data; 284 cmd = (struct qeth_ipa_cmd *) data;
294 if (cmd->hdr.return_code) { 285 if (cmd->hdr.return_code) {
295 PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. " 286 PRINT_ERR("Error in processing VLAN %i on %s: 0x%x. "
296 "Continuing\n", cmd->data.setdelvlan.vlan_id, 287 "Continuing\n", cmd->data.setdelvlan.vlan_id,
297 QETH_CARD_IFNAME(card), cmd->hdr.return_code); 288 QETH_CARD_IFNAME(card), cmd->hdr.return_code);
298 QETH_DBF_TEXT_(trace, 2, "L2VL%4x", cmd->hdr.command); 289 QETH_DBF_TEXT_(TRACE, 2, "L2VL%4x", cmd->hdr.command);
299 QETH_DBF_TEXT_(trace, 2, "L2%s", CARD_BUS_ID(card)); 290 QETH_DBF_TEXT_(TRACE, 2, "L2%s", CARD_BUS_ID(card));
300 QETH_DBF_TEXT_(trace, 2, "err%d", cmd->hdr.return_code); 291 QETH_DBF_TEXT_(TRACE, 2, "err%d", cmd->hdr.return_code);
301 } 292 }
302 return 0; 293 return 0;
303} 294}
@@ -308,7 +299,7 @@ static int qeth_l2_send_setdelvlan(struct qeth_card *card, __u16 i,
308 struct qeth_ipa_cmd *cmd; 299 struct qeth_ipa_cmd *cmd;
309 struct qeth_cmd_buffer *iob; 300 struct qeth_cmd_buffer *iob;
310 301
311 QETH_DBF_TEXT_(trace, 4, "L2sdv%x", ipacmd); 302 QETH_DBF_TEXT_(TRACE, 4, "L2sdv%x", ipacmd);
312 iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); 303 iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4);
313 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 304 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
314 cmd->data.setdelvlan.vlan_id = i; 305 cmd->data.setdelvlan.vlan_id = i;
@@ -319,7 +310,7 @@ static int qeth_l2_send_setdelvlan(struct qeth_card *card, __u16 i,
319static void qeth_l2_process_vlans(struct qeth_card *card, int clear) 310static void qeth_l2_process_vlans(struct qeth_card *card, int clear)
320{ 311{
321 struct qeth_vlan_vid *id; 312 struct qeth_vlan_vid *id;
322 QETH_DBF_TEXT(trace, 3, "L2prcvln"); 313 QETH_DBF_TEXT(TRACE, 3, "L2prcvln");
323 spin_lock_bh(&card->vlanlock); 314 spin_lock_bh(&card->vlanlock);
324 list_for_each_entry(id, &card->vid_list, list) { 315 list_for_each_entry(id, &card->vid_list, list) {
325 if (clear) 316 if (clear)
@@ -337,7 +328,7 @@ static void qeth_l2_vlan_rx_add_vid(struct net_device *dev, unsigned short vid)
337 struct qeth_card *card = netdev_priv(dev); 328 struct qeth_card *card = netdev_priv(dev);
338 struct qeth_vlan_vid *id; 329 struct qeth_vlan_vid *id;
339 330
340 QETH_DBF_TEXT_(trace, 4, "aid:%d", vid); 331 QETH_DBF_TEXT_(TRACE, 4, "aid:%d", vid);
341 id = kmalloc(sizeof(struct qeth_vlan_vid), GFP_ATOMIC); 332 id = kmalloc(sizeof(struct qeth_vlan_vid), GFP_ATOMIC);
342 if (id) { 333 if (id) {
343 id->vid = vid; 334 id->vid = vid;
@@ -355,7 +346,7 @@ static void qeth_l2_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
355 struct qeth_vlan_vid *id, *tmpid = NULL; 346 struct qeth_vlan_vid *id, *tmpid = NULL;
356 struct qeth_card *card = netdev_priv(dev); 347 struct qeth_card *card = netdev_priv(dev);
357 348
358 QETH_DBF_TEXT_(trace, 4, "kid:%d", vid); 349 QETH_DBF_TEXT_(TRACE, 4, "kid:%d", vid);
359 spin_lock_bh(&card->vlanlock); 350 spin_lock_bh(&card->vlanlock);
360 list_for_each_entry(id, &card->vid_list, list) { 351 list_for_each_entry(id, &card->vid_list, list) {
361 if (id->vid == vid) { 352 if (id->vid == vid) {
@@ -376,8 +367,8 @@ static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
376{ 367{
377 int rc = 0; 368 int rc = 0;
378 369
379 QETH_DBF_TEXT(setup , 2, "stopcard"); 370 QETH_DBF_TEXT(SETUP , 2, "stopcard");
380 QETH_DBF_HEX(setup, 2, &card, sizeof(void *)); 371 QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
381 372
382 qeth_set_allowed_threads(card, 0, 1); 373 qeth_set_allowed_threads(card, 0, 1);
383 if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) 374 if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD))
@@ -396,7 +387,7 @@ static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
396 if (!card->use_hard_stop) { 387 if (!card->use_hard_stop) {
397 __u8 *mac = &card->dev->dev_addr[0]; 388 __u8 *mac = &card->dev->dev_addr[0];
398 rc = qeth_l2_send_delmac(card, mac); 389 rc = qeth_l2_send_delmac(card, mac);
399 QETH_DBF_TEXT_(setup, 2, "Lerr%d", rc); 390 QETH_DBF_TEXT_(SETUP, 2, "Lerr%d", rc);
400 } 391 }
401 card->state = CARD_STATE_SOFTSETUP; 392 card->state = CARD_STATE_SOFTSETUP;
402 } 393 }
@@ -465,8 +456,8 @@ static void qeth_l2_process_inbound_buffer(struct qeth_card *card,
465 break; 456 break;
466 default: 457 default:
467 dev_kfree_skb_any(skb); 458 dev_kfree_skb_any(skb);
468 QETH_DBF_TEXT(trace, 3, "inbunkno"); 459 QETH_DBF_TEXT(TRACE, 3, "inbunkno");
469 QETH_DBF_HEX(control, 3, hdr, QETH_DBF_CONTROL_LEN); 460 QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN);
470 continue; 461 continue;
471 } 462 }
472 card->dev->last_rx = jiffies; 463 card->dev->last_rx = jiffies;
@@ -484,7 +475,7 @@ static int qeth_l2_send_setdelmac(struct qeth_card *card, __u8 *mac,
484 struct qeth_ipa_cmd *cmd; 475 struct qeth_ipa_cmd *cmd;
485 struct qeth_cmd_buffer *iob; 476 struct qeth_cmd_buffer *iob;
486 477
487 QETH_DBF_TEXT(trace, 2, "L2sdmac"); 478 QETH_DBF_TEXT(TRACE, 2, "L2sdmac");
488 iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); 479 iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4);
489 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 480 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
490 cmd->data.setdelmac.mac_length = OSA_ADDR_LEN; 481 cmd->data.setdelmac.mac_length = OSA_ADDR_LEN;
@@ -498,10 +489,10 @@ static int qeth_l2_send_setmac_cb(struct qeth_card *card,
498{ 489{
499 struct qeth_ipa_cmd *cmd; 490 struct qeth_ipa_cmd *cmd;
500 491
501 QETH_DBF_TEXT(trace, 2, "L2Smaccb"); 492 QETH_DBF_TEXT(TRACE, 2, "L2Smaccb");
502 cmd = (struct qeth_ipa_cmd *) data; 493 cmd = (struct qeth_ipa_cmd *) data;
503 if (cmd->hdr.return_code) { 494 if (cmd->hdr.return_code) {
504 QETH_DBF_TEXT_(trace, 2, "L2er%x", cmd->hdr.return_code); 495 QETH_DBF_TEXT_(TRACE, 2, "L2er%x", cmd->hdr.return_code);
505 card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED; 496 card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED;
506 cmd->hdr.return_code = -EIO; 497 cmd->hdr.return_code = -EIO;
507 } else { 498 } else {
@@ -520,7 +511,7 @@ static int qeth_l2_send_setmac_cb(struct qeth_card *card,
520 511
521static int qeth_l2_send_setmac(struct qeth_card *card, __u8 *mac) 512static int qeth_l2_send_setmac(struct qeth_card *card, __u8 *mac)
522{ 513{
523 QETH_DBF_TEXT(trace, 2, "L2Setmac"); 514 QETH_DBF_TEXT(TRACE, 2, "L2Setmac");
524 return qeth_l2_send_setdelmac(card, mac, IPA_CMD_SETVMAC, 515 return qeth_l2_send_setdelmac(card, mac, IPA_CMD_SETVMAC,
525 qeth_l2_send_setmac_cb); 516 qeth_l2_send_setmac_cb);
526} 517}
@@ -531,10 +522,10 @@ static int qeth_l2_send_delmac_cb(struct qeth_card *card,
531{ 522{
532 struct qeth_ipa_cmd *cmd; 523 struct qeth_ipa_cmd *cmd;
533 524
534 QETH_DBF_TEXT(trace, 2, "L2Dmaccb"); 525 QETH_DBF_TEXT(TRACE, 2, "L2Dmaccb");
535 cmd = (struct qeth_ipa_cmd *) data; 526 cmd = (struct qeth_ipa_cmd *) data;
536 if (cmd->hdr.return_code) { 527 if (cmd->hdr.return_code) {
537 QETH_DBF_TEXT_(trace, 2, "err%d", cmd->hdr.return_code); 528 QETH_DBF_TEXT_(TRACE, 2, "err%d", cmd->hdr.return_code);
538 cmd->hdr.return_code = -EIO; 529 cmd->hdr.return_code = -EIO;
539 return 0; 530 return 0;
540 } 531 }
@@ -545,7 +536,7 @@ static int qeth_l2_send_delmac_cb(struct qeth_card *card,
545 536
546static int qeth_l2_send_delmac(struct qeth_card *card, __u8 *mac) 537static int qeth_l2_send_delmac(struct qeth_card *card, __u8 *mac)
547{ 538{
548 QETH_DBF_TEXT(trace, 2, "L2Delmac"); 539 QETH_DBF_TEXT(TRACE, 2, "L2Delmac");
549 if (!(card->info.mac_bits & QETH_LAYER2_MAC_REGISTERED)) 540 if (!(card->info.mac_bits & QETH_LAYER2_MAC_REGISTERED))
550 return 0; 541 return 0;
551 return qeth_l2_send_setdelmac(card, mac, IPA_CMD_DELVMAC, 542 return qeth_l2_send_setdelmac(card, mac, IPA_CMD_DELVMAC,
@@ -557,8 +548,8 @@ static int qeth_l2_request_initial_mac(struct qeth_card *card)
557 int rc = 0; 548 int rc = 0;
558 char vendor_pre[] = {0x02, 0x00, 0x00}; 549 char vendor_pre[] = {0x02, 0x00, 0x00};
559 550
560 QETH_DBF_TEXT(setup, 2, "doL2init"); 551 QETH_DBF_TEXT(SETUP, 2, "doL2init");
561 QETH_DBF_TEXT_(setup, 2, "doL2%s", CARD_BUS_ID(card)); 552 QETH_DBF_TEXT_(SETUP, 2, "doL2%s", CARD_BUS_ID(card));
562 553
563 rc = qeth_query_setadapterparms(card); 554 rc = qeth_query_setadapterparms(card);
564 if (rc) { 555 if (rc) {
@@ -572,10 +563,10 @@ static int qeth_l2_request_initial_mac(struct qeth_card *card)
572 PRINT_WARN("couldn't get MAC address on " 563 PRINT_WARN("couldn't get MAC address on "
573 "device %s: x%x\n", 564 "device %s: x%x\n",
574 CARD_BUS_ID(card), rc); 565 CARD_BUS_ID(card), rc);
575 QETH_DBF_TEXT_(setup, 2, "1err%d", rc); 566 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
576 return rc; 567 return rc;
577 } 568 }
578 QETH_DBF_HEX(setup, 2, card->dev->dev_addr, OSA_ADDR_LEN); 569 QETH_DBF_HEX(SETUP, 2, card->dev->dev_addr, OSA_ADDR_LEN);
579 } else { 570 } else {
580 random_ether_addr(card->dev->dev_addr); 571 random_ether_addr(card->dev->dev_addr);
581 memcpy(card->dev->dev_addr, vendor_pre, 3); 572 memcpy(card->dev->dev_addr, vendor_pre, 3);
@@ -589,21 +580,21 @@ static int qeth_l2_set_mac_address(struct net_device *dev, void *p)
589 struct qeth_card *card = netdev_priv(dev); 580 struct qeth_card *card = netdev_priv(dev);
590 int rc = 0; 581 int rc = 0;
591 582
592 QETH_DBF_TEXT(trace, 3, "setmac"); 583 QETH_DBF_TEXT(TRACE, 3, "setmac");
593 584
594 if (qeth_l2_verify_dev(dev) != QETH_REAL_CARD) { 585 if (qeth_l2_verify_dev(dev) != QETH_REAL_CARD) {
595 QETH_DBF_TEXT(trace, 3, "setmcINV"); 586 QETH_DBF_TEXT(TRACE, 3, "setmcINV");
596 return -EOPNOTSUPP; 587 return -EOPNOTSUPP;
597 } 588 }
598 589
599 if (card->info.type == QETH_CARD_TYPE_OSN) { 590 if (card->info.type == QETH_CARD_TYPE_OSN) {
600 PRINT_WARN("Setting MAC address on %s is not supported.\n", 591 PRINT_WARN("Setting MAC address on %s is not supported.\n",
601 dev->name); 592 dev->name);
602 QETH_DBF_TEXT(trace, 3, "setmcOSN"); 593 QETH_DBF_TEXT(TRACE, 3, "setmcOSN");
603 return -EOPNOTSUPP; 594 return -EOPNOTSUPP;
604 } 595 }
605 QETH_DBF_TEXT_(trace, 3, "%s", CARD_BUS_ID(card)); 596 QETH_DBF_TEXT_(TRACE, 3, "%s", CARD_BUS_ID(card));
606 QETH_DBF_HEX(trace, 3, addr->sa_data, OSA_ADDR_LEN); 597 QETH_DBF_HEX(TRACE, 3, addr->sa_data, OSA_ADDR_LEN);
607 rc = qeth_l2_send_delmac(card, &card->dev->dev_addr[0]); 598 rc = qeth_l2_send_delmac(card, &card->dev->dev_addr[0]);
608 if (!rc) 599 if (!rc)
609 rc = qeth_l2_send_setmac(card, addr->sa_data); 600 rc = qeth_l2_send_setmac(card, addr->sa_data);
@@ -618,7 +609,7 @@ static void qeth_l2_set_multicast_list(struct net_device *dev)
618 if (card->info.type == QETH_CARD_TYPE_OSN) 609 if (card->info.type == QETH_CARD_TYPE_OSN)
619 return ; 610 return ;
620 611
621 QETH_DBF_TEXT(trace, 3, "setmulti"); 612 QETH_DBF_TEXT(TRACE, 3, "setmulti");
622 qeth_l2_del_all_mc(card); 613 qeth_l2_del_all_mc(card);
623 spin_lock_bh(&card->mclock); 614 spin_lock_bh(&card->mclock);
624 for (dm = dev->mc_list; dm; dm = dm->next) 615 for (dm = dev->mc_list; dm; dm = dm->next)
@@ -644,7 +635,7 @@ static int qeth_l2_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
644 enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO; 635 enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO;
645 struct qeth_eddp_context *ctx = NULL; 636 struct qeth_eddp_context *ctx = NULL;
646 637
647 QETH_DBF_TEXT(trace, 6, "l2xmit"); 638 QETH_DBF_TEXT(TRACE, 6, "l2xmit");
648 639
649 if ((card->state != CARD_STATE_UP) || !card->lan_online) { 640 if ((card->state != CARD_STATE_UP) || !card->lan_online) {
650 card->stats.tx_carrier_errors++; 641 card->stats.tx_carrier_errors++;
@@ -756,7 +747,7 @@ static void qeth_l2_qdio_input_handler(struct ccw_device *ccwdev,
756 int index; 747 int index;
757 int i; 748 int i;
758 749
759 QETH_DBF_TEXT(trace, 6, "qdinput"); 750 QETH_DBF_TEXT(TRACE, 6, "qdinput");
760 card = (struct qeth_card *) card_ptr; 751 card = (struct qeth_card *) card_ptr;
761 net_dev = card->dev; 752 net_dev = card->dev;
762 if (card->options.performance_stats) { 753 if (card->options.performance_stats) {
@@ -765,11 +756,11 @@ static void qeth_l2_qdio_input_handler(struct ccw_device *ccwdev,
765 } 756 }
766 if (status & QDIO_STATUS_LOOK_FOR_ERROR) { 757 if (status & QDIO_STATUS_LOOK_FOR_ERROR) {
767 if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION) { 758 if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION) {
768 QETH_DBF_TEXT(trace, 1, "qdinchk"); 759 QETH_DBF_TEXT(TRACE, 1, "qdinchk");
769 QETH_DBF_TEXT_(trace, 1, "%s", CARD_BUS_ID(card)); 760 QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card));
770 QETH_DBF_TEXT_(trace, 1, "%04X%04X", first_element, 761 QETH_DBF_TEXT_(TRACE, 1, "%04X%04X", first_element,
771 count); 762 count);
772 QETH_DBF_TEXT_(trace, 1, "%04X%04X", queue, status); 763 QETH_DBF_TEXT_(TRACE, 1, "%04X%04X", queue, status);
773 qeth_schedule_recovery(card); 764 qeth_schedule_recovery(card);
774 return; 765 return;
775 } 766 }
@@ -794,13 +785,13 @@ static int qeth_l2_open(struct net_device *dev)
794{ 785{
795 struct qeth_card *card = netdev_priv(dev); 786 struct qeth_card *card = netdev_priv(dev);
796 787
797 QETH_DBF_TEXT(trace, 4, "qethopen"); 788 QETH_DBF_TEXT(TRACE, 4, "qethopen");
798 if (card->state != CARD_STATE_SOFTSETUP) 789 if (card->state != CARD_STATE_SOFTSETUP)
799 return -ENODEV; 790 return -ENODEV;
800 791
801 if ((card->info.type != QETH_CARD_TYPE_OSN) && 792 if ((card->info.type != QETH_CARD_TYPE_OSN) &&
802 (!(card->info.mac_bits & QETH_LAYER2_MAC_REGISTERED))) { 793 (!(card->info.mac_bits & QETH_LAYER2_MAC_REGISTERED))) {
803 QETH_DBF_TEXT(trace, 4, "nomacadr"); 794 QETH_DBF_TEXT(TRACE, 4, "nomacadr");
804 return -EPERM; 795 return -EPERM;
805 } 796 }
806 card->data.state = CH_STATE_UP; 797 card->data.state = CH_STATE_UP;
@@ -818,7 +809,7 @@ static int qeth_l2_stop(struct net_device *dev)
818{ 809{
819 struct qeth_card *card = netdev_priv(dev); 810 struct qeth_card *card = netdev_priv(dev);
820 811
821 QETH_DBF_TEXT(trace, 4, "qethstop"); 812 QETH_DBF_TEXT(TRACE, 4, "qethstop");
822 netif_tx_disable(dev); 813 netif_tx_disable(dev);
823 card->dev->flags &= ~IFF_UP; 814 card->dev->flags &= ~IFF_UP;
824 if (card->state == CARD_STATE_UP) 815 if (card->state == CARD_STATE_UP)
@@ -934,8 +925,8 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
934 enum qeth_card_states recover_flag; 925 enum qeth_card_states recover_flag;
935 926
936 BUG_ON(!card); 927 BUG_ON(!card);
937 QETH_DBF_TEXT(setup, 2, "setonlin"); 928 QETH_DBF_TEXT(SETUP, 2, "setonlin");
938 QETH_DBF_HEX(setup, 2, &card, sizeof(void *)); 929 QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
939 930
940 qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1); 931 qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1);
941 if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) { 932 if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) {
@@ -947,23 +938,23 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
947 recover_flag = card->state; 938 recover_flag = card->state;
948 rc = ccw_device_set_online(CARD_RDEV(card)); 939 rc = ccw_device_set_online(CARD_RDEV(card));
949 if (rc) { 940 if (rc) {
950 QETH_DBF_TEXT_(setup, 2, "1err%d", rc); 941 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
951 return -EIO; 942 return -EIO;
952 } 943 }
953 rc = ccw_device_set_online(CARD_WDEV(card)); 944 rc = ccw_device_set_online(CARD_WDEV(card));
954 if (rc) { 945 if (rc) {
955 QETH_DBF_TEXT_(setup, 2, "1err%d", rc); 946 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
956 return -EIO; 947 return -EIO;
957 } 948 }
958 rc = ccw_device_set_online(CARD_DDEV(card)); 949 rc = ccw_device_set_online(CARD_DDEV(card));
959 if (rc) { 950 if (rc) {
960 QETH_DBF_TEXT_(setup, 2, "1err%d", rc); 951 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
961 return -EIO; 952 return -EIO;
962 } 953 }
963 954
964 rc = qeth_core_hardsetup_card(card); 955 rc = qeth_core_hardsetup_card(card);
965 if (rc) { 956 if (rc) {
966 QETH_DBF_TEXT_(setup, 2, "2err%d", rc); 957 QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
967 goto out_remove; 958 goto out_remove;
968 } 959 }
969 960
@@ -977,11 +968,11 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
977 qeth_print_status_message(card); 968 qeth_print_status_message(card);
978 969
979 /* softsetup */ 970 /* softsetup */
980 QETH_DBF_TEXT(setup, 2, "softsetp"); 971 QETH_DBF_TEXT(SETUP, 2, "softsetp");
981 972
982 rc = qeth_send_startlan(card); 973 rc = qeth_send_startlan(card);
983 if (rc) { 974 if (rc) {
984 QETH_DBF_TEXT_(setup, 2, "1err%d", rc); 975 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
985 if (rc == 0xe080) { 976 if (rc == 0xe080) {
986 PRINT_WARN("LAN on card %s if offline! " 977 PRINT_WARN("LAN on card %s if offline! "
987 "Waiting for STARTLAN from card.\n", 978 "Waiting for STARTLAN from card.\n",
@@ -1001,7 +992,7 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
1001 992
1002 rc = qeth_init_qdio_queues(card); 993 rc = qeth_init_qdio_queues(card);
1003 if (rc) { 994 if (rc) {
1004 QETH_DBF_TEXT_(setup, 2, "6err%d", rc); 995 QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc);
1005 goto out_remove; 996 goto out_remove;
1006 } 997 }
1007 card->state = CARD_STATE_SOFTSETUP; 998 card->state = CARD_STATE_SOFTSETUP;
@@ -1048,8 +1039,8 @@ static int __qeth_l2_set_offline(struct ccwgroup_device *cgdev,
1048 int rc = 0, rc2 = 0, rc3 = 0; 1039 int rc = 0, rc2 = 0, rc3 = 0;
1049 enum qeth_card_states recover_flag; 1040 enum qeth_card_states recover_flag;
1050 1041
1051 QETH_DBF_TEXT(setup, 3, "setoffl"); 1042 QETH_DBF_TEXT(SETUP, 3, "setoffl");
1052 QETH_DBF_HEX(setup, 3, &card, sizeof(void *)); 1043 QETH_DBF_HEX(SETUP, 3, &card, sizeof(void *));
1053 1044
1054 if (card->dev && netif_carrier_ok(card->dev)) 1045 if (card->dev && netif_carrier_ok(card->dev))
1055 netif_carrier_off(card->dev); 1046 netif_carrier_off(card->dev);
@@ -1065,7 +1056,7 @@ static int __qeth_l2_set_offline(struct ccwgroup_device *cgdev,
1065 if (!rc) 1056 if (!rc)
1066 rc = (rc2) ? rc2 : rc3; 1057 rc = (rc2) ? rc2 : rc3;
1067 if (rc) 1058 if (rc)
1068 QETH_DBF_TEXT_(setup, 2, "1err%d", rc); 1059 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
1069 if (recover_flag == CARD_STATE_UP) 1060 if (recover_flag == CARD_STATE_UP)
1070 card->state = CARD_STATE_RECOVER; 1061 card->state = CARD_STATE_RECOVER;
1071 /* let user_space know that device is offline */ 1062 /* let user_space know that device is offline */
@@ -1084,11 +1075,11 @@ static int qeth_l2_recover(void *ptr)
1084 int rc = 0; 1075 int rc = 0;
1085 1076
1086 card = (struct qeth_card *) ptr; 1077 card = (struct qeth_card *) ptr;
1087 QETH_DBF_TEXT(trace, 2, "recover1"); 1078 QETH_DBF_TEXT(TRACE, 2, "recover1");
1088 QETH_DBF_HEX(trace, 2, &card, sizeof(void *)); 1079 QETH_DBF_HEX(TRACE, 2, &card, sizeof(void *));
1089 if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD)) 1080 if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD))
1090 return 0; 1081 return 0;
1091 QETH_DBF_TEXT(trace, 2, "recover2"); 1082 QETH_DBF_TEXT(TRACE, 2, "recover2");
1092 PRINT_WARN("Recovery of device %s started ...\n", 1083 PRINT_WARN("Recovery of device %s started ...\n",
1093 CARD_BUS_ID(card)); 1084 CARD_BUS_ID(card));
1094 card->use_hard_stop = 1; 1085 card->use_hard_stop = 1;
@@ -1139,12 +1130,12 @@ static int qeth_osn_send_control_data(struct qeth_card *card, int len,
1139 unsigned long flags; 1130 unsigned long flags;
1140 int rc = 0; 1131 int rc = 0;
1141 1132
1142 QETH_DBF_TEXT(trace, 5, "osndctrd"); 1133 QETH_DBF_TEXT(TRACE, 5, "osndctrd");
1143 1134
1144 wait_event(card->wait_q, 1135 wait_event(card->wait_q,
1145 atomic_cmpxchg(&card->write.irq_pending, 0, 1) == 0); 1136 atomic_cmpxchg(&card->write.irq_pending, 0, 1) == 0);
1146 qeth_prepare_control_data(card, len, iob); 1137 qeth_prepare_control_data(card, len, iob);
1147 QETH_DBF_TEXT(trace, 6, "osnoirqp"); 1138 QETH_DBF_TEXT(TRACE, 6, "osnoirqp");
1148 spin_lock_irqsave(get_ccwdev_lock(card->write.ccwdev), flags); 1139 spin_lock_irqsave(get_ccwdev_lock(card->write.ccwdev), flags);
1149 rc = ccw_device_start(card->write.ccwdev, &card->write.ccw, 1140 rc = ccw_device_start(card->write.ccwdev, &card->write.ccw,
1150 (addr_t) iob, 0, 0); 1141 (addr_t) iob, 0, 0);
@@ -1152,7 +1143,7 @@ static int qeth_osn_send_control_data(struct qeth_card *card, int len,
1152 if (rc) { 1143 if (rc) {
1153 PRINT_WARN("qeth_osn_send_control_data: " 1144 PRINT_WARN("qeth_osn_send_control_data: "
1154 "ccw_device_start rc = %i\n", rc); 1145 "ccw_device_start rc = %i\n", rc);
1155 QETH_DBF_TEXT_(trace, 2, " err%d", rc); 1146 QETH_DBF_TEXT_(TRACE, 2, " err%d", rc);
1156 qeth_release_buffer(iob->channel, iob); 1147 qeth_release_buffer(iob->channel, iob);
1157 atomic_set(&card->write.irq_pending, 0); 1148 atomic_set(&card->write.irq_pending, 0);
1158 wake_up(&card->wait_q); 1149 wake_up(&card->wait_q);
@@ -1165,7 +1156,7 @@ static int qeth_osn_send_ipa_cmd(struct qeth_card *card,
1165{ 1156{
1166 u16 s1, s2; 1157 u16 s1, s2;
1167 1158
1168 QETH_DBF_TEXT(trace, 4, "osndipa"); 1159 QETH_DBF_TEXT(TRACE, 4, "osndipa");
1169 1160
1170 qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2); 1161 qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2);
1171 s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len); 1162 s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len);
@@ -1183,7 +1174,7 @@ int qeth_osn_assist(struct net_device *dev, void *data, int data_len)
1183 struct qeth_card *card; 1174 struct qeth_card *card;
1184 int rc; 1175 int rc;
1185 1176
1186 QETH_DBF_TEXT(trace, 2, "osnsdmc"); 1177 QETH_DBF_TEXT(TRACE, 2, "osnsdmc");
1187 if (!dev) 1178 if (!dev)
1188 return -ENODEV; 1179 return -ENODEV;
1189 card = netdev_priv(dev); 1180 card = netdev_priv(dev);
@@ -1205,7 +1196,7 @@ int qeth_osn_register(unsigned char *read_dev_no, struct net_device **dev,
1205{ 1196{
1206 struct qeth_card *card; 1197 struct qeth_card *card;
1207 1198
1208 QETH_DBF_TEXT(trace, 2, "osnreg"); 1199 QETH_DBF_TEXT(TRACE, 2, "osnreg");
1209 *dev = qeth_l2_netdev_by_devno(read_dev_no); 1200 *dev = qeth_l2_netdev_by_devno(read_dev_no);
1210 if (*dev == NULL) 1201 if (*dev == NULL)
1211 return -ENODEV; 1202 return -ENODEV;
@@ -1224,7 +1215,7 @@ void qeth_osn_deregister(struct net_device *dev)
1224{ 1215{
1225 struct qeth_card *card; 1216 struct qeth_card *card;
1226 1217
1227 QETH_DBF_TEXT(trace, 2, "osndereg"); 1218 QETH_DBF_TEXT(TRACE, 2, "osndereg");
1228 if (!dev) 1219 if (!dev)
1229 return; 1220 return;
1230 card = netdev_priv(dev); 1221 card = netdev_priv(dev);
diff --git a/drivers/s390/net/qeth_l3.h b/drivers/s390/net/qeth_l3.h
index f639cc3af22b..1be353593a59 100644
--- a/drivers/s390/net/qeth_l3.h
+++ b/drivers/s390/net/qeth_l3.h
@@ -13,16 +13,7 @@
13 13
14#include "qeth_core.h" 14#include "qeth_core.h"
15 15
16#define QETH_DBF_TEXT_(name, level, text...) \ 16#define QETH_DBF_TXT_BUF qeth_l3_dbf_txt_buf
17 do { \
18 if (qeth_dbf_passes(qeth_dbf_##name, level)) { \
19 char *dbf_txt_buf = get_cpu_var(qeth_l3_dbf_txt_buf); \
20 sprintf(dbf_txt_buf, text); \
21 debug_text_event(qeth_dbf_##name, level, dbf_txt_buf); \
22 put_cpu_var(qeth_l3_dbf_txt_buf); \
23 } \
24 } while (0)
25
26DECLARE_PER_CPU(char[256], qeth_l3_dbf_txt_buf); 17DECLARE_PER_CPU(char[256], qeth_l3_dbf_txt_buf);
27 18
28struct qeth_ipaddr { 19struct qeth_ipaddr {
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index e95220a2638d..c5e90eecae45 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -259,7 +259,7 @@ static int __qeth_l3_insert_ip_todo(struct qeth_card *card,
259 addr->users += add ? 1 : -1; 259 addr->users += add ? 1 : -1;
260 if (add && (addr->type == QETH_IP_TYPE_NORMAL) && 260 if (add && (addr->type == QETH_IP_TYPE_NORMAL) &&
261 qeth_l3_is_addr_covered_by_ipato(card, addr)) { 261 qeth_l3_is_addr_covered_by_ipato(card, addr)) {
262 QETH_DBF_TEXT(trace, 2, "tkovaddr"); 262 QETH_DBF_TEXT(TRACE, 2, "tkovaddr");
263 addr->set_flags |= QETH_IPA_SETIP_TAKEOVER_FLAG; 263 addr->set_flags |= QETH_IPA_SETIP_TAKEOVER_FLAG;
264 } 264 }
265 list_add_tail(&addr->entry, card->ip_tbd_list); 265 list_add_tail(&addr->entry, card->ip_tbd_list);
@@ -273,13 +273,13 @@ static int qeth_l3_delete_ip(struct qeth_card *card, struct qeth_ipaddr *addr)
273 unsigned long flags; 273 unsigned long flags;
274 int rc = 0; 274 int rc = 0;
275 275
276 QETH_DBF_TEXT(trace, 4, "delip"); 276 QETH_DBF_TEXT(TRACE, 4, "delip");
277 277
278 if (addr->proto == QETH_PROT_IPV4) 278 if (addr->proto == QETH_PROT_IPV4)
279 QETH_DBF_HEX(trace, 4, &addr->u.a4.addr, 4); 279 QETH_DBF_HEX(TRACE, 4, &addr->u.a4.addr, 4);
280 else { 280 else {
281 QETH_DBF_HEX(trace, 4, &addr->u.a6.addr, 8); 281 QETH_DBF_HEX(TRACE, 4, &addr->u.a6.addr, 8);
282 QETH_DBF_HEX(trace, 4, ((char *)&addr->u.a6.addr) + 8, 8); 282 QETH_DBF_HEX(TRACE, 4, ((char *)&addr->u.a6.addr) + 8, 8);
283 } 283 }
284 spin_lock_irqsave(&card->ip_lock, flags); 284 spin_lock_irqsave(&card->ip_lock, flags);
285 rc = __qeth_l3_insert_ip_todo(card, addr, 0); 285 rc = __qeth_l3_insert_ip_todo(card, addr, 0);
@@ -292,12 +292,12 @@ static int qeth_l3_add_ip(struct qeth_card *card, struct qeth_ipaddr *addr)
292 unsigned long flags; 292 unsigned long flags;
293 int rc = 0; 293 int rc = 0;
294 294
295 QETH_DBF_TEXT(trace, 4, "addip"); 295 QETH_DBF_TEXT(TRACE, 4, "addip");
296 if (addr->proto == QETH_PROT_IPV4) 296 if (addr->proto == QETH_PROT_IPV4)
297 QETH_DBF_HEX(trace, 4, &addr->u.a4.addr, 4); 297 QETH_DBF_HEX(TRACE, 4, &addr->u.a4.addr, 4);
298 else { 298 else {
299 QETH_DBF_HEX(trace, 4, &addr->u.a6.addr, 8); 299 QETH_DBF_HEX(TRACE, 4, &addr->u.a6.addr, 8);
300 QETH_DBF_HEX(trace, 4, ((char *)&addr->u.a6.addr) + 8, 8); 300 QETH_DBF_HEX(TRACE, 4, ((char *)&addr->u.a6.addr) + 8, 8);
301 } 301 }
302 spin_lock_irqsave(&card->ip_lock, flags); 302 spin_lock_irqsave(&card->ip_lock, flags);
303 rc = __qeth_l3_insert_ip_todo(card, addr, 1); 303 rc = __qeth_l3_insert_ip_todo(card, addr, 1);
@@ -326,10 +326,10 @@ static void qeth_l3_delete_mc_addresses(struct qeth_card *card)
326 struct qeth_ipaddr *iptodo; 326 struct qeth_ipaddr *iptodo;
327 unsigned long flags; 327 unsigned long flags;
328 328
329 QETH_DBF_TEXT(trace, 4, "delmc"); 329 QETH_DBF_TEXT(TRACE, 4, "delmc");
330 iptodo = qeth_l3_get_addr_buffer(QETH_PROT_IPV4); 330 iptodo = qeth_l3_get_addr_buffer(QETH_PROT_IPV4);
331 if (!iptodo) { 331 if (!iptodo) {
332 QETH_DBF_TEXT(trace, 2, "dmcnomem"); 332 QETH_DBF_TEXT(TRACE, 2, "dmcnomem");
333 return; 333 return;
334 } 334 }
335 iptodo->type = QETH_IP_TYPE_DEL_ALL_MC; 335 iptodo->type = QETH_IP_TYPE_DEL_ALL_MC;
@@ -430,14 +430,14 @@ static void qeth_l3_set_ip_addr_list(struct qeth_card *card)
430 unsigned long flags; 430 unsigned long flags;
431 int rc; 431 int rc;
432 432
433 QETH_DBF_TEXT(trace, 2, "sdiplist"); 433 QETH_DBF_TEXT(TRACE, 2, "sdiplist");
434 QETH_DBF_HEX(trace, 2, &card, sizeof(void *)); 434 QETH_DBF_HEX(TRACE, 2, &card, sizeof(void *));
435 435
436 spin_lock_irqsave(&card->ip_lock, flags); 436 spin_lock_irqsave(&card->ip_lock, flags);
437 tbd_list = card->ip_tbd_list; 437 tbd_list = card->ip_tbd_list;
438 card->ip_tbd_list = kmalloc(sizeof(struct list_head), GFP_ATOMIC); 438 card->ip_tbd_list = kmalloc(sizeof(struct list_head), GFP_ATOMIC);
439 if (!card->ip_tbd_list) { 439 if (!card->ip_tbd_list) {
440 QETH_DBF_TEXT(trace, 0, "silnomem"); 440 QETH_DBF_TEXT(TRACE, 0, "silnomem");
441 card->ip_tbd_list = tbd_list; 441 card->ip_tbd_list = tbd_list;
442 spin_unlock_irqrestore(&card->ip_lock, flags); 442 spin_unlock_irqrestore(&card->ip_lock, flags);
443 return; 443 return;
@@ -488,7 +488,7 @@ static void qeth_l3_clear_ip_list(struct qeth_card *card, int clean,
488 struct qeth_ipaddr *addr, *tmp; 488 struct qeth_ipaddr *addr, *tmp;
489 unsigned long flags; 489 unsigned long flags;
490 490
491 QETH_DBF_TEXT(trace, 4, "clearip"); 491 QETH_DBF_TEXT(TRACE, 4, "clearip");
492 spin_lock_irqsave(&card->ip_lock, flags); 492 spin_lock_irqsave(&card->ip_lock, flags);
493 /* clear todo list */ 493 /* clear todo list */
494 list_for_each_entry_safe(addr, tmp, card->ip_tbd_list, entry) { 494 list_for_each_entry_safe(addr, tmp, card->ip_tbd_list, entry) {
@@ -546,7 +546,7 @@ static int qeth_l3_send_setdelmc(struct qeth_card *card,
546 struct qeth_cmd_buffer *iob; 546 struct qeth_cmd_buffer *iob;
547 struct qeth_ipa_cmd *cmd; 547 struct qeth_ipa_cmd *cmd;
548 548
549 QETH_DBF_TEXT(trace, 4, "setdelmc"); 549 QETH_DBF_TEXT(TRACE, 4, "setdelmc");
550 550
551 iob = qeth_get_ipacmd_buffer(card, ipacmd, addr->proto); 551 iob = qeth_get_ipacmd_buffer(card, ipacmd, addr->proto);
552 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 552 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
@@ -584,8 +584,8 @@ static int qeth_l3_send_setdelip(struct qeth_card *card,
584 struct qeth_ipa_cmd *cmd; 584 struct qeth_ipa_cmd *cmd;
585 __u8 netmask[16]; 585 __u8 netmask[16];
586 586
587 QETH_DBF_TEXT(trace, 4, "setdelip"); 587 QETH_DBF_TEXT(TRACE, 4, "setdelip");
588 QETH_DBF_TEXT_(trace, 4, "flags%02X", flags); 588 QETH_DBF_TEXT_(TRACE, 4, "flags%02X", flags);
589 589
590 iob = qeth_get_ipacmd_buffer(card, ipacmd, addr->proto); 590 iob = qeth_get_ipacmd_buffer(card, ipacmd, addr->proto);
591 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 591 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
@@ -614,7 +614,7 @@ static int qeth_l3_send_setrouting(struct qeth_card *card,
614 struct qeth_ipa_cmd *cmd; 614 struct qeth_ipa_cmd *cmd;
615 struct qeth_cmd_buffer *iob; 615 struct qeth_cmd_buffer *iob;
616 616
617 QETH_DBF_TEXT(trace, 4, "setroutg"); 617 QETH_DBF_TEXT(TRACE, 4, "setroutg");
618 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETRTG, prot); 618 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETRTG, prot);
619 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 619 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
620 cmd->data.setrtg.type = (type); 620 cmd->data.setrtg.type = (type);
@@ -667,7 +667,7 @@ int qeth_l3_setrouting_v4(struct qeth_card *card)
667{ 667{
668 int rc; 668 int rc;
669 669
670 QETH_DBF_TEXT(trace, 3, "setrtg4"); 670 QETH_DBF_TEXT(TRACE, 3, "setrtg4");
671 671
672 qeth_l3_correct_routing_type(card, &card->options.route4.type, 672 qeth_l3_correct_routing_type(card, &card->options.route4.type,
673 QETH_PROT_IPV4); 673 QETH_PROT_IPV4);
@@ -687,7 +687,7 @@ int qeth_l3_setrouting_v6(struct qeth_card *card)
687{ 687{
688 int rc = 0; 688 int rc = 0;
689 689
690 QETH_DBF_TEXT(trace, 3, "setrtg6"); 690 QETH_DBF_TEXT(TRACE, 3, "setrtg6");
691#ifdef CONFIG_QETH_IPV6 691#ifdef CONFIG_QETH_IPV6
692 692
693 if (!qeth_is_supported(card, IPA_IPV6)) 693 if (!qeth_is_supported(card, IPA_IPV6))
@@ -731,7 +731,7 @@ int qeth_l3_add_ipato_entry(struct qeth_card *card,
731 unsigned long flags; 731 unsigned long flags;
732 int rc = 0; 732 int rc = 0;
733 733
734 QETH_DBF_TEXT(trace, 2, "addipato"); 734 QETH_DBF_TEXT(TRACE, 2, "addipato");
735 spin_lock_irqsave(&card->ip_lock, flags); 735 spin_lock_irqsave(&card->ip_lock, flags);
736 list_for_each_entry(ipatoe, &card->ipato.entries, entry) { 736 list_for_each_entry(ipatoe, &card->ipato.entries, entry) {
737 if (ipatoe->proto != new->proto) 737 if (ipatoe->proto != new->proto)
@@ -757,7 +757,7 @@ void qeth_l3_del_ipato_entry(struct qeth_card *card,
757 struct qeth_ipato_entry *ipatoe, *tmp; 757 struct qeth_ipato_entry *ipatoe, *tmp;
758 unsigned long flags; 758 unsigned long flags;
759 759
760 QETH_DBF_TEXT(trace, 2, "delipato"); 760 QETH_DBF_TEXT(TRACE, 2, "delipato");
761 spin_lock_irqsave(&card->ip_lock, flags); 761 spin_lock_irqsave(&card->ip_lock, flags);
762 list_for_each_entry_safe(ipatoe, tmp, &card->ipato.entries, entry) { 762 list_for_each_entry_safe(ipatoe, tmp, &card->ipato.entries, entry) {
763 if (ipatoe->proto != proto) 763 if (ipatoe->proto != proto)
@@ -785,11 +785,11 @@ int qeth_l3_add_vipa(struct qeth_card *card, enum qeth_prot_versions proto,
785 ipaddr = qeth_l3_get_addr_buffer(proto); 785 ipaddr = qeth_l3_get_addr_buffer(proto);
786 if (ipaddr) { 786 if (ipaddr) {
787 if (proto == QETH_PROT_IPV4) { 787 if (proto == QETH_PROT_IPV4) {
788 QETH_DBF_TEXT(trace, 2, "addvipa4"); 788 QETH_DBF_TEXT(TRACE, 2, "addvipa4");
789 memcpy(&ipaddr->u.a4.addr, addr, 4); 789 memcpy(&ipaddr->u.a4.addr, addr, 4);
790 ipaddr->u.a4.mask = 0; 790 ipaddr->u.a4.mask = 0;
791 } else if (proto == QETH_PROT_IPV6) { 791 } else if (proto == QETH_PROT_IPV6) {
792 QETH_DBF_TEXT(trace, 2, "addvipa6"); 792 QETH_DBF_TEXT(TRACE, 2, "addvipa6");
793 memcpy(&ipaddr->u.a6.addr, addr, 16); 793 memcpy(&ipaddr->u.a6.addr, addr, 16);
794 ipaddr->u.a6.pfxlen = 0; 794 ipaddr->u.a6.pfxlen = 0;
795 } 795 }
@@ -821,11 +821,11 @@ void qeth_l3_del_vipa(struct qeth_card *card, enum qeth_prot_versions proto,
821 ipaddr = qeth_l3_get_addr_buffer(proto); 821 ipaddr = qeth_l3_get_addr_buffer(proto);
822 if (ipaddr) { 822 if (ipaddr) {
823 if (proto == QETH_PROT_IPV4) { 823 if (proto == QETH_PROT_IPV4) {
824 QETH_DBF_TEXT(trace, 2, "delvipa4"); 824 QETH_DBF_TEXT(TRACE, 2, "delvipa4");
825 memcpy(&ipaddr->u.a4.addr, addr, 4); 825 memcpy(&ipaddr->u.a4.addr, addr, 4);
826 ipaddr->u.a4.mask = 0; 826 ipaddr->u.a4.mask = 0;
827 } else if (proto == QETH_PROT_IPV6) { 827 } else if (proto == QETH_PROT_IPV6) {
828 QETH_DBF_TEXT(trace, 2, "delvipa6"); 828 QETH_DBF_TEXT(TRACE, 2, "delvipa6");
829 memcpy(&ipaddr->u.a6.addr, addr, 16); 829 memcpy(&ipaddr->u.a6.addr, addr, 16);
830 ipaddr->u.a6.pfxlen = 0; 830 ipaddr->u.a6.pfxlen = 0;
831 } 831 }
@@ -850,11 +850,11 @@ int qeth_l3_add_rxip(struct qeth_card *card, enum qeth_prot_versions proto,
850 ipaddr = qeth_l3_get_addr_buffer(proto); 850 ipaddr = qeth_l3_get_addr_buffer(proto);
851 if (ipaddr) { 851 if (ipaddr) {
852 if (proto == QETH_PROT_IPV4) { 852 if (proto == QETH_PROT_IPV4) {
853 QETH_DBF_TEXT(trace, 2, "addrxip4"); 853 QETH_DBF_TEXT(TRACE, 2, "addrxip4");
854 memcpy(&ipaddr->u.a4.addr, addr, 4); 854 memcpy(&ipaddr->u.a4.addr, addr, 4);
855 ipaddr->u.a4.mask = 0; 855 ipaddr->u.a4.mask = 0;
856 } else if (proto == QETH_PROT_IPV6) { 856 } else if (proto == QETH_PROT_IPV6) {
857 QETH_DBF_TEXT(trace, 2, "addrxip6"); 857 QETH_DBF_TEXT(TRACE, 2, "addrxip6");
858 memcpy(&ipaddr->u.a6.addr, addr, 16); 858 memcpy(&ipaddr->u.a6.addr, addr, 16);
859 ipaddr->u.a6.pfxlen = 0; 859 ipaddr->u.a6.pfxlen = 0;
860 } 860 }
@@ -886,11 +886,11 @@ void qeth_l3_del_rxip(struct qeth_card *card, enum qeth_prot_versions proto,
886 ipaddr = qeth_l3_get_addr_buffer(proto); 886 ipaddr = qeth_l3_get_addr_buffer(proto);
887 if (ipaddr) { 887 if (ipaddr) {
888 if (proto == QETH_PROT_IPV4) { 888 if (proto == QETH_PROT_IPV4) {
889 QETH_DBF_TEXT(trace, 2, "addrxip4"); 889 QETH_DBF_TEXT(TRACE, 2, "addrxip4");
890 memcpy(&ipaddr->u.a4.addr, addr, 4); 890 memcpy(&ipaddr->u.a4.addr, addr, 4);
891 ipaddr->u.a4.mask = 0; 891 ipaddr->u.a4.mask = 0;
892 } else if (proto == QETH_PROT_IPV6) { 892 } else if (proto == QETH_PROT_IPV6) {
893 QETH_DBF_TEXT(trace, 2, "addrxip6"); 893 QETH_DBF_TEXT(TRACE, 2, "addrxip6");
894 memcpy(&ipaddr->u.a6.addr, addr, 16); 894 memcpy(&ipaddr->u.a6.addr, addr, 16);
895 ipaddr->u.a6.pfxlen = 0; 895 ipaddr->u.a6.pfxlen = 0;
896 } 896 }
@@ -910,15 +910,15 @@ static int qeth_l3_register_addr_entry(struct qeth_card *card,
910 int cnt = 3; 910 int cnt = 3;
911 911
912 if (addr->proto == QETH_PROT_IPV4) { 912 if (addr->proto == QETH_PROT_IPV4) {
913 QETH_DBF_TEXT(trace, 2, "setaddr4"); 913 QETH_DBF_TEXT(TRACE, 2, "setaddr4");
914 QETH_DBF_HEX(trace, 3, &addr->u.a4.addr, sizeof(int)); 914 QETH_DBF_HEX(TRACE, 3, &addr->u.a4.addr, sizeof(int));
915 } else if (addr->proto == QETH_PROT_IPV6) { 915 } else if (addr->proto == QETH_PROT_IPV6) {
916 QETH_DBF_TEXT(trace, 2, "setaddr6"); 916 QETH_DBF_TEXT(TRACE, 2, "setaddr6");
917 QETH_DBF_HEX(trace, 3, &addr->u.a6.addr, 8); 917 QETH_DBF_HEX(TRACE, 3, &addr->u.a6.addr, 8);
918 QETH_DBF_HEX(trace, 3, ((char *)&addr->u.a6.addr) + 8, 8); 918 QETH_DBF_HEX(TRACE, 3, ((char *)&addr->u.a6.addr) + 8, 8);
919 } else { 919 } else {
920 QETH_DBF_TEXT(trace, 2, "setaddr?"); 920 QETH_DBF_TEXT(TRACE, 2, "setaddr?");
921 QETH_DBF_HEX(trace, 3, addr, sizeof(struct qeth_ipaddr)); 921 QETH_DBF_HEX(TRACE, 3, addr, sizeof(struct qeth_ipaddr));
922 } 922 }
923 do { 923 do {
924 if (addr->is_multicast) 924 if (addr->is_multicast)
@@ -927,10 +927,10 @@ static int qeth_l3_register_addr_entry(struct qeth_card *card,
927 rc = qeth_l3_send_setdelip(card, addr, IPA_CMD_SETIP, 927 rc = qeth_l3_send_setdelip(card, addr, IPA_CMD_SETIP,
928 addr->set_flags); 928 addr->set_flags);
929 if (rc) 929 if (rc)
930 QETH_DBF_TEXT(trace, 2, "failed"); 930 QETH_DBF_TEXT(TRACE, 2, "failed");
931 } while ((--cnt > 0) && rc); 931 } while ((--cnt > 0) && rc);
932 if (rc) { 932 if (rc) {
933 QETH_DBF_TEXT(trace, 2, "FAILED"); 933 QETH_DBF_TEXT(TRACE, 2, "FAILED");
934 qeth_l3_ipaddr_to_string(addr->proto, (u8 *)&addr->u, buf); 934 qeth_l3_ipaddr_to_string(addr->proto, (u8 *)&addr->u, buf);
935 PRINT_WARN("Could not register IP address %s (rc=0x%x/%d)\n", 935 PRINT_WARN("Could not register IP address %s (rc=0x%x/%d)\n",
936 buf, rc, rc); 936 buf, rc, rc);
@@ -944,15 +944,15 @@ static int qeth_l3_deregister_addr_entry(struct qeth_card *card,
944 int rc = 0; 944 int rc = 0;
945 945
946 if (addr->proto == QETH_PROT_IPV4) { 946 if (addr->proto == QETH_PROT_IPV4) {
947 QETH_DBF_TEXT(trace, 2, "deladdr4"); 947 QETH_DBF_TEXT(TRACE, 2, "deladdr4");
948 QETH_DBF_HEX(trace, 3, &addr->u.a4.addr, sizeof(int)); 948 QETH_DBF_HEX(TRACE, 3, &addr->u.a4.addr, sizeof(int));
949 } else if (addr->proto == QETH_PROT_IPV6) { 949 } else if (addr->proto == QETH_PROT_IPV6) {
950 QETH_DBF_TEXT(trace, 2, "deladdr6"); 950 QETH_DBF_TEXT(TRACE, 2, "deladdr6");
951 QETH_DBF_HEX(trace, 3, &addr->u.a6.addr, 8); 951 QETH_DBF_HEX(TRACE, 3, &addr->u.a6.addr, 8);
952 QETH_DBF_HEX(trace, 3, ((char *)&addr->u.a6.addr) + 8, 8); 952 QETH_DBF_HEX(TRACE, 3, ((char *)&addr->u.a6.addr) + 8, 8);
953 } else { 953 } else {
954 QETH_DBF_TEXT(trace, 2, "deladdr?"); 954 QETH_DBF_TEXT(TRACE, 2, "deladdr?");
955 QETH_DBF_HEX(trace, 3, addr, sizeof(struct qeth_ipaddr)); 955 QETH_DBF_HEX(TRACE, 3, addr, sizeof(struct qeth_ipaddr));
956 } 956 }
957 if (addr->is_multicast) 957 if (addr->is_multicast)
958 rc = qeth_l3_send_setdelmc(card, addr, IPA_CMD_DELIPM); 958 rc = qeth_l3_send_setdelmc(card, addr, IPA_CMD_DELIPM);
@@ -960,7 +960,7 @@ static int qeth_l3_deregister_addr_entry(struct qeth_card *card,
960 rc = qeth_l3_send_setdelip(card, addr, IPA_CMD_DELIP, 960 rc = qeth_l3_send_setdelip(card, addr, IPA_CMD_DELIP,
961 addr->del_flags); 961 addr->del_flags);
962 if (rc) { 962 if (rc) {
963 QETH_DBF_TEXT(trace, 2, "failed"); 963 QETH_DBF_TEXT(TRACE, 2, "failed");
964 /* TODO: re-activate this warning as soon as we have a 964 /* TODO: re-activate this warning as soon as we have a
965 * clean mirco code 965 * clean mirco code
966 qeth_ipaddr_to_string(addr->proto, (u8 *)&addr->u, buf); 966 qeth_ipaddr_to_string(addr->proto, (u8 *)&addr->u, buf);
@@ -1000,7 +1000,7 @@ static int qeth_l3_send_setadp_mode(struct qeth_card *card, __u32 command,
1000 struct qeth_cmd_buffer *iob; 1000 struct qeth_cmd_buffer *iob;
1001 struct qeth_ipa_cmd *cmd; 1001 struct qeth_ipa_cmd *cmd;
1002 1002
1003 QETH_DBF_TEXT(trace, 4, "adpmode"); 1003 QETH_DBF_TEXT(TRACE, 4, "adpmode");
1004 1004
1005 iob = qeth_get_adapter_cmd(card, command, 1005 iob = qeth_get_adapter_cmd(card, command,
1006 sizeof(struct qeth_ipacmd_setadpparms)); 1006 sizeof(struct qeth_ipacmd_setadpparms));
@@ -1015,7 +1015,7 @@ static int qeth_l3_setadapter_hstr(struct qeth_card *card)
1015{ 1015{
1016 int rc; 1016 int rc;
1017 1017
1018 QETH_DBF_TEXT(trace, 4, "adphstr"); 1018 QETH_DBF_TEXT(TRACE, 4, "adphstr");
1019 1019
1020 if (qeth_adp_supported(card, IPA_SETADP_SET_BROADCAST_MODE)) { 1020 if (qeth_adp_supported(card, IPA_SETADP_SET_BROADCAST_MODE)) {
1021 rc = qeth_l3_send_setadp_mode(card, 1021 rc = qeth_l3_send_setadp_mode(card,
@@ -1048,13 +1048,13 @@ static int qeth_l3_setadapter_parms(struct qeth_card *card)
1048{ 1048{
1049 int rc; 1049 int rc;
1050 1050
1051 QETH_DBF_TEXT(setup, 2, "setadprm"); 1051 QETH_DBF_TEXT(SETUP, 2, "setadprm");
1052 1052
1053 if (!qeth_is_supported(card, IPA_SETADAPTERPARMS)) { 1053 if (!qeth_is_supported(card, IPA_SETADAPTERPARMS)) {
1054 PRINT_WARN("set adapter parameters not supported " 1054 PRINT_WARN("set adapter parameters not supported "
1055 "on device %s.\n", 1055 "on device %s.\n",
1056 CARD_BUS_ID(card)); 1056 CARD_BUS_ID(card));
1057 QETH_DBF_TEXT(setup, 2, " notsupp"); 1057 QETH_DBF_TEXT(SETUP, 2, " notsupp");
1058 return 0; 1058 return 0;
1059 } 1059 }
1060 rc = qeth_query_setadapterparms(card); 1060 rc = qeth_query_setadapterparms(card);
@@ -1083,7 +1083,7 @@ static int qeth_l3_default_setassparms_cb(struct qeth_card *card,
1083{ 1083{
1084 struct qeth_ipa_cmd *cmd; 1084 struct qeth_ipa_cmd *cmd;
1085 1085
1086 QETH_DBF_TEXT(trace, 4, "defadpcb"); 1086 QETH_DBF_TEXT(TRACE, 4, "defadpcb");
1087 1087
1088 cmd = (struct qeth_ipa_cmd *) data; 1088 cmd = (struct qeth_ipa_cmd *) data;
1089 if (cmd->hdr.return_code == 0) { 1089 if (cmd->hdr.return_code == 0) {
@@ -1096,7 +1096,7 @@ static int qeth_l3_default_setassparms_cb(struct qeth_card *card,
1096 if (cmd->data.setassparms.hdr.assist_no == IPA_INBOUND_CHECKSUM && 1096 if (cmd->data.setassparms.hdr.assist_no == IPA_INBOUND_CHECKSUM &&
1097 cmd->data.setassparms.hdr.command_code == IPA_CMD_ASS_START) { 1097 cmd->data.setassparms.hdr.command_code == IPA_CMD_ASS_START) {
1098 card->info.csum_mask = cmd->data.setassparms.data.flags_32bit; 1098 card->info.csum_mask = cmd->data.setassparms.data.flags_32bit;
1099 QETH_DBF_TEXT_(trace, 3, "csum:%d", card->info.csum_mask); 1099 QETH_DBF_TEXT_(TRACE, 3, "csum:%d", card->info.csum_mask);
1100 } 1100 }
1101 return 0; 1101 return 0;
1102} 1102}
@@ -1108,7 +1108,7 @@ static struct qeth_cmd_buffer *qeth_l3_get_setassparms_cmd(
1108 struct qeth_cmd_buffer *iob; 1108 struct qeth_cmd_buffer *iob;
1109 struct qeth_ipa_cmd *cmd; 1109 struct qeth_ipa_cmd *cmd;
1110 1110
1111 QETH_DBF_TEXT(trace, 4, "getasscm"); 1111 QETH_DBF_TEXT(TRACE, 4, "getasscm");
1112 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETASSPARMS, prot); 1112 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETASSPARMS, prot);
1113 1113
1114 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 1114 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
@@ -1130,7 +1130,7 @@ static int qeth_l3_send_setassparms(struct qeth_card *card,
1130 int rc; 1130 int rc;
1131 struct qeth_ipa_cmd *cmd; 1131 struct qeth_ipa_cmd *cmd;
1132 1132
1133 QETH_DBF_TEXT(trace, 4, "sendassp"); 1133 QETH_DBF_TEXT(TRACE, 4, "sendassp");
1134 1134
1135 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 1135 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
1136 if (len <= sizeof(__u32)) 1136 if (len <= sizeof(__u32))
@@ -1149,7 +1149,7 @@ static int qeth_l3_send_simple_setassparms_ipv6(struct qeth_card *card,
1149 int rc; 1149 int rc;
1150 struct qeth_cmd_buffer *iob; 1150 struct qeth_cmd_buffer *iob;
1151 1151
1152 QETH_DBF_TEXT(trace, 4, "simassp6"); 1152 QETH_DBF_TEXT(TRACE, 4, "simassp6");
1153 iob = qeth_l3_get_setassparms_cmd(card, ipa_func, cmd_code, 1153 iob = qeth_l3_get_setassparms_cmd(card, ipa_func, cmd_code,
1154 0, QETH_PROT_IPV6); 1154 0, QETH_PROT_IPV6);
1155 rc = qeth_l3_send_setassparms(card, iob, 0, 0, 1155 rc = qeth_l3_send_setassparms(card, iob, 0, 0,
@@ -1165,7 +1165,7 @@ static int qeth_l3_send_simple_setassparms(struct qeth_card *card,
1165 int length = 0; 1165 int length = 0;
1166 struct qeth_cmd_buffer *iob; 1166 struct qeth_cmd_buffer *iob;
1167 1167
1168 QETH_DBF_TEXT(trace, 4, "simassp4"); 1168 QETH_DBF_TEXT(TRACE, 4, "simassp4");
1169 if (data) 1169 if (data)
1170 length = sizeof(__u32); 1170 length = sizeof(__u32);
1171 iob = qeth_l3_get_setassparms_cmd(card, ipa_func, cmd_code, 1171 iob = qeth_l3_get_setassparms_cmd(card, ipa_func, cmd_code,
@@ -1179,7 +1179,7 @@ static int qeth_l3_start_ipa_arp_processing(struct qeth_card *card)
1179{ 1179{
1180 int rc; 1180 int rc;
1181 1181
1182 QETH_DBF_TEXT(trace, 3, "ipaarp"); 1182 QETH_DBF_TEXT(TRACE, 3, "ipaarp");
1183 1183
1184 if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { 1184 if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) {
1185 PRINT_WARN("ARP processing not supported " 1185 PRINT_WARN("ARP processing not supported "
@@ -1200,7 +1200,7 @@ static int qeth_l3_start_ipa_ip_fragmentation(struct qeth_card *card)
1200{ 1200{
1201 int rc; 1201 int rc;
1202 1202
1203 QETH_DBF_TEXT(trace, 3, "ipaipfrg"); 1203 QETH_DBF_TEXT(TRACE, 3, "ipaipfrg");
1204 1204
1205 if (!qeth_is_supported(card, IPA_IP_FRAGMENTATION)) { 1205 if (!qeth_is_supported(card, IPA_IP_FRAGMENTATION)) {
1206 PRINT_INFO("Hardware IP fragmentation not supported on %s\n", 1206 PRINT_INFO("Hardware IP fragmentation not supported on %s\n",
@@ -1223,7 +1223,7 @@ static int qeth_l3_start_ipa_source_mac(struct qeth_card *card)
1223{ 1223{
1224 int rc; 1224 int rc;
1225 1225
1226 QETH_DBF_TEXT(trace, 3, "stsrcmac"); 1226 QETH_DBF_TEXT(TRACE, 3, "stsrcmac");
1227 1227
1228 if (!card->options.fake_ll) 1228 if (!card->options.fake_ll)
1229 return -EOPNOTSUPP; 1229 return -EOPNOTSUPP;
@@ -1247,7 +1247,7 @@ static int qeth_l3_start_ipa_vlan(struct qeth_card *card)
1247{ 1247{
1248 int rc = 0; 1248 int rc = 0;
1249 1249
1250 QETH_DBF_TEXT(trace, 3, "strtvlan"); 1250 QETH_DBF_TEXT(TRACE, 3, "strtvlan");
1251 1251
1252 if (!qeth_is_supported(card, IPA_FULL_VLAN)) { 1252 if (!qeth_is_supported(card, IPA_FULL_VLAN)) {
1253 PRINT_WARN("VLAN not supported on %s\n", 1253 PRINT_WARN("VLAN not supported on %s\n",
@@ -1271,7 +1271,7 @@ static int qeth_l3_start_ipa_multicast(struct qeth_card *card)
1271{ 1271{
1272 int rc; 1272 int rc;
1273 1273
1274 QETH_DBF_TEXT(trace, 3, "stmcast"); 1274 QETH_DBF_TEXT(TRACE, 3, "stmcast");
1275 1275
1276 if (!qeth_is_supported(card, IPA_MULTICASTING)) { 1276 if (!qeth_is_supported(card, IPA_MULTICASTING)) {
1277 PRINT_WARN("Multicast not supported on %s\n", 1277 PRINT_WARN("Multicast not supported on %s\n",
@@ -1297,7 +1297,7 @@ static int qeth_l3_query_ipassists_cb(struct qeth_card *card,
1297{ 1297{
1298 struct qeth_ipa_cmd *cmd; 1298 struct qeth_ipa_cmd *cmd;
1299 1299
1300 QETH_DBF_TEXT(setup, 2, "qipasscb"); 1300 QETH_DBF_TEXT(SETUP, 2, "qipasscb");
1301 1301
1302 cmd = (struct qeth_ipa_cmd *) data; 1302 cmd = (struct qeth_ipa_cmd *) data;
1303 if (cmd->hdr.prot_version == QETH_PROT_IPV4) { 1303 if (cmd->hdr.prot_version == QETH_PROT_IPV4) {
@@ -1307,9 +1307,9 @@ static int qeth_l3_query_ipassists_cb(struct qeth_card *card,
1307 card->options.ipa6.supported_funcs = cmd->hdr.ipa_supported; 1307 card->options.ipa6.supported_funcs = cmd->hdr.ipa_supported;
1308 card->options.ipa6.enabled_funcs = cmd->hdr.ipa_enabled; 1308 card->options.ipa6.enabled_funcs = cmd->hdr.ipa_enabled;
1309 } 1309 }
1310 QETH_DBF_TEXT(setup, 2, "suppenbl"); 1310 QETH_DBF_TEXT(SETUP, 2, "suppenbl");
1311 QETH_DBF_TEXT_(setup, 2, "%x", cmd->hdr.ipa_supported); 1311 QETH_DBF_TEXT_(SETUP, 2, "%x", cmd->hdr.ipa_supported);
1312 QETH_DBF_TEXT_(setup, 2, "%x", cmd->hdr.ipa_enabled); 1312 QETH_DBF_TEXT_(SETUP, 2, "%x", cmd->hdr.ipa_enabled);
1313 return 0; 1313 return 0;
1314} 1314}
1315 1315
@@ -1319,7 +1319,7 @@ static int qeth_l3_query_ipassists(struct qeth_card *card,
1319 int rc; 1319 int rc;
1320 struct qeth_cmd_buffer *iob; 1320 struct qeth_cmd_buffer *iob;
1321 1321
1322 QETH_DBF_TEXT_(setup, 2, "qipassi%i", prot); 1322 QETH_DBF_TEXT_(SETUP, 2, "qipassi%i", prot);
1323 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_QIPASSIST, prot); 1323 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_QIPASSIST, prot);
1324 rc = qeth_send_ipa_cmd(card, iob, qeth_l3_query_ipassists_cb, NULL); 1324 rc = qeth_send_ipa_cmd(card, iob, qeth_l3_query_ipassists_cb, NULL);
1325 return rc; 1325 return rc;
@@ -1330,7 +1330,7 @@ static int qeth_l3_softsetup_ipv6(struct qeth_card *card)
1330{ 1330{
1331 int rc; 1331 int rc;
1332 1332
1333 QETH_DBF_TEXT(trace, 3, "softipv6"); 1333 QETH_DBF_TEXT(TRACE, 3, "softipv6");
1334 1334
1335 if (card->info.type == QETH_CARD_TYPE_IQD) 1335 if (card->info.type == QETH_CARD_TYPE_IQD)
1336 goto out; 1336 goto out;
@@ -1375,7 +1375,7 @@ static int qeth_l3_start_ipa_ipv6(struct qeth_card *card)
1375{ 1375{
1376 int rc = 0; 1376 int rc = 0;
1377 1377
1378 QETH_DBF_TEXT(trace, 3, "strtipv6"); 1378 QETH_DBF_TEXT(TRACE, 3, "strtipv6");
1379 1379
1380 if (!qeth_is_supported(card, IPA_IPV6)) { 1380 if (!qeth_is_supported(card, IPA_IPV6)) {
1381 PRINT_WARN("IPv6 not supported on %s\n", 1381 PRINT_WARN("IPv6 not supported on %s\n",
@@ -1392,7 +1392,7 @@ static int qeth_l3_start_ipa_broadcast(struct qeth_card *card)
1392{ 1392{
1393 int rc; 1393 int rc;
1394 1394
1395 QETH_DBF_TEXT(trace, 3, "stbrdcst"); 1395 QETH_DBF_TEXT(TRACE, 3, "stbrdcst");
1396 card->info.broadcast_capable = 0; 1396 card->info.broadcast_capable = 0;
1397 if (!qeth_is_supported(card, IPA_FILTERING)) { 1397 if (!qeth_is_supported(card, IPA_FILTERING)) {
1398 PRINT_WARN("Broadcast not supported on %s\n", 1398 PRINT_WARN("Broadcast not supported on %s\n",
@@ -1462,7 +1462,7 @@ static int qeth_l3_start_ipa_checksum(struct qeth_card *card)
1462{ 1462{
1463 int rc = 0; 1463 int rc = 0;
1464 1464
1465 QETH_DBF_TEXT(trace, 3, "strtcsum"); 1465 QETH_DBF_TEXT(TRACE, 3, "strtcsum");
1466 1466
1467 if (card->options.checksum_type == NO_CHECKSUMMING) { 1467 if (card->options.checksum_type == NO_CHECKSUMMING) {
1468 PRINT_WARN("Using no checksumming on %s.\n", 1468 PRINT_WARN("Using no checksumming on %s.\n",
@@ -1493,7 +1493,7 @@ static int qeth_l3_start_ipa_tso(struct qeth_card *card)
1493{ 1493{
1494 int rc; 1494 int rc;
1495 1495
1496 QETH_DBF_TEXT(trace, 3, "sttso"); 1496 QETH_DBF_TEXT(TRACE, 3, "sttso");
1497 1497
1498 if (!qeth_is_supported(card, IPA_OUTBOUND_TSO)) { 1498 if (!qeth_is_supported(card, IPA_OUTBOUND_TSO)) {
1499 PRINT_WARN("Outbound TSO not supported on %s\n", 1499 PRINT_WARN("Outbound TSO not supported on %s\n",
@@ -1518,7 +1518,7 @@ static int qeth_l3_start_ipa_tso(struct qeth_card *card)
1518 1518
1519static int qeth_l3_start_ipassists(struct qeth_card *card) 1519static int qeth_l3_start_ipassists(struct qeth_card *card)
1520{ 1520{
1521 QETH_DBF_TEXT(trace, 3, "strtipas"); 1521 QETH_DBF_TEXT(TRACE, 3, "strtipas");
1522 qeth_l3_start_ipa_arp_processing(card); /* go on*/ 1522 qeth_l3_start_ipa_arp_processing(card); /* go on*/
1523 qeth_l3_start_ipa_ip_fragmentation(card); /* go on*/ 1523 qeth_l3_start_ipa_ip_fragmentation(card); /* go on*/
1524 qeth_l3_start_ipa_source_mac(card); /* go on*/ 1524 qeth_l3_start_ipa_source_mac(card); /* go on*/
@@ -1538,7 +1538,7 @@ static int qeth_l3_put_unique_id(struct qeth_card *card)
1538 struct qeth_cmd_buffer *iob; 1538 struct qeth_cmd_buffer *iob;
1539 struct qeth_ipa_cmd *cmd; 1539 struct qeth_ipa_cmd *cmd;
1540 1540
1541 QETH_DBF_TEXT(trace, 2, "puniqeid"); 1541 QETH_DBF_TEXT(TRACE, 2, "puniqeid");
1542 1542
1543 if ((card->info.unique_id & UNIQUE_ID_NOT_BY_CARD) == 1543 if ((card->info.unique_id & UNIQUE_ID_NOT_BY_CARD) ==
1544 UNIQUE_ID_NOT_BY_CARD) 1544 UNIQUE_ID_NOT_BY_CARD)
@@ -1575,7 +1575,7 @@ static int qeth_l3_iqd_read_initial_mac(struct qeth_card *card)
1575 struct qeth_cmd_buffer *iob; 1575 struct qeth_cmd_buffer *iob;
1576 struct qeth_ipa_cmd *cmd; 1576 struct qeth_ipa_cmd *cmd;
1577 1577
1578 QETH_DBF_TEXT(setup, 2, "hsrmac"); 1578 QETH_DBF_TEXT(SETUP, 2, "hsrmac");
1579 1579
1580 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_CREATE_ADDR, 1580 iob = qeth_get_ipacmd_buffer(card, IPA_CMD_CREATE_ADDR,
1581 QETH_PROT_IPV6); 1581 QETH_PROT_IPV6);
@@ -1616,7 +1616,7 @@ static int qeth_l3_get_unique_id(struct qeth_card *card)
1616 struct qeth_cmd_buffer *iob; 1616 struct qeth_cmd_buffer *iob;
1617 struct qeth_ipa_cmd *cmd; 1617 struct qeth_ipa_cmd *cmd;
1618 1618
1619 QETH_DBF_TEXT(setup, 2, "guniqeid"); 1619 QETH_DBF_TEXT(SETUP, 2, "guniqeid");
1620 1620
1621 if (!qeth_is_supported(card, IPA_IPV6)) { 1621 if (!qeth_is_supported(card, IPA_IPV6)) {
1622 card->info.unique_id = UNIQUE_ID_IF_CREATE_ADDR_FAILED | 1622 card->info.unique_id = UNIQUE_ID_IF_CREATE_ADDR_FAILED |
@@ -1649,7 +1649,7 @@ static void qeth_l3_add_mc(struct qeth_card *card, struct in_device *in4_dev)
1649 struct ip_mc_list *im4; 1649 struct ip_mc_list *im4;
1650 char buf[MAX_ADDR_LEN]; 1650 char buf[MAX_ADDR_LEN];
1651 1651
1652 QETH_DBF_TEXT(trace, 4, "addmc"); 1652 QETH_DBF_TEXT(TRACE, 4, "addmc");
1653 for (im4 = in4_dev->mc_list; im4; im4 = im4->next) { 1653 for (im4 = in4_dev->mc_list; im4; im4 = im4->next) {
1654 qeth_l3_get_mac_for_ipm(im4->multiaddr, buf, in4_dev->dev); 1654 qeth_l3_get_mac_for_ipm(im4->multiaddr, buf, in4_dev->dev);
1655 ipm = qeth_l3_get_addr_buffer(QETH_PROT_IPV4); 1655 ipm = qeth_l3_get_addr_buffer(QETH_PROT_IPV4);
@@ -1669,7 +1669,7 @@ static void qeth_l3_add_vlan_mc(struct qeth_card *card)
1669 struct vlan_group *vg; 1669 struct vlan_group *vg;
1670 int i; 1670 int i;
1671 1671
1672 QETH_DBF_TEXT(trace, 4, "addmcvl"); 1672 QETH_DBF_TEXT(TRACE, 4, "addmcvl");
1673 if (!qeth_is_supported(card, IPA_FULL_VLAN) || (card->vlangrp == NULL)) 1673 if (!qeth_is_supported(card, IPA_FULL_VLAN) || (card->vlangrp == NULL))
1674 return; 1674 return;
1675 1675
@@ -1693,7 +1693,7 @@ static void qeth_l3_add_multicast_ipv4(struct qeth_card *card)
1693{ 1693{
1694 struct in_device *in4_dev; 1694 struct in_device *in4_dev;
1695 1695
1696 QETH_DBF_TEXT(trace, 4, "chkmcv4"); 1696 QETH_DBF_TEXT(TRACE, 4, "chkmcv4");
1697 in4_dev = in_dev_get(card->dev); 1697 in4_dev = in_dev_get(card->dev);
1698 if (in4_dev == NULL) 1698 if (in4_dev == NULL)
1699 return; 1699 return;
@@ -1711,7 +1711,7 @@ static void qeth_l3_add_mc6(struct qeth_card *card, struct inet6_dev *in6_dev)
1711 struct ifmcaddr6 *im6; 1711 struct ifmcaddr6 *im6;
1712 char buf[MAX_ADDR_LEN]; 1712 char buf[MAX_ADDR_LEN];
1713 1713
1714 QETH_DBF_TEXT(trace, 4, "addmc6"); 1714 QETH_DBF_TEXT(TRACE, 4, "addmc6");
1715 for (im6 = in6_dev->mc_list; im6 != NULL; im6 = im6->next) { 1715 for (im6 = in6_dev->mc_list; im6 != NULL; im6 = im6->next) {
1716 ndisc_mc_map(&im6->mca_addr, buf, in6_dev->dev, 0); 1716 ndisc_mc_map(&im6->mca_addr, buf, in6_dev->dev, 0);
1717 ipm = qeth_l3_get_addr_buffer(QETH_PROT_IPV6); 1717 ipm = qeth_l3_get_addr_buffer(QETH_PROT_IPV6);
@@ -1732,7 +1732,7 @@ static void qeth_l3_add_vlan_mc6(struct qeth_card *card)
1732 struct vlan_group *vg; 1732 struct vlan_group *vg;
1733 int i; 1733 int i;
1734 1734
1735 QETH_DBF_TEXT(trace, 4, "admc6vl"); 1735 QETH_DBF_TEXT(TRACE, 4, "admc6vl");
1736 if (!qeth_is_supported(card, IPA_FULL_VLAN) || (card->vlangrp == NULL)) 1736 if (!qeth_is_supported(card, IPA_FULL_VLAN) || (card->vlangrp == NULL))
1737 return; 1737 return;
1738 1738
@@ -1756,7 +1756,7 @@ static void qeth_l3_add_multicast_ipv6(struct qeth_card *card)
1756{ 1756{
1757 struct inet6_dev *in6_dev; 1757 struct inet6_dev *in6_dev;
1758 1758
1759 QETH_DBF_TEXT(trace, 4, "chkmcv6"); 1759 QETH_DBF_TEXT(TRACE, 4, "chkmcv6");
1760 if (!qeth_is_supported(card, IPA_IPV6)) 1760 if (!qeth_is_supported(card, IPA_IPV6))
1761 return ; 1761 return ;
1762 in6_dev = in6_dev_get(card->dev); 1762 in6_dev = in6_dev_get(card->dev);
@@ -1777,7 +1777,7 @@ static void qeth_l3_free_vlan_addresses4(struct qeth_card *card,
1777 struct in_ifaddr *ifa; 1777 struct in_ifaddr *ifa;
1778 struct qeth_ipaddr *addr; 1778 struct qeth_ipaddr *addr;
1779 1779
1780 QETH_DBF_TEXT(trace, 4, "frvaddr4"); 1780 QETH_DBF_TEXT(TRACE, 4, "frvaddr4");
1781 1781
1782 in_dev = in_dev_get(vlan_group_get_device(card->vlangrp, vid)); 1782 in_dev = in_dev_get(vlan_group_get_device(card->vlangrp, vid));
1783 if (!in_dev) 1783 if (!in_dev)
@@ -1803,7 +1803,7 @@ static void qeth_l3_free_vlan_addresses6(struct qeth_card *card,
1803 struct inet6_ifaddr *ifa; 1803 struct inet6_ifaddr *ifa;
1804 struct qeth_ipaddr *addr; 1804 struct qeth_ipaddr *addr;
1805 1805
1806 QETH_DBF_TEXT(trace, 4, "frvaddr6"); 1806 QETH_DBF_TEXT(TRACE, 4, "frvaddr6");
1807 1807
1808 in6_dev = in6_dev_get(vlan_group_get_device(card->vlangrp, vid)); 1808 in6_dev = in6_dev_get(vlan_group_get_device(card->vlangrp, vid));
1809 if (!in6_dev) 1809 if (!in6_dev)
@@ -1838,7 +1838,7 @@ static void qeth_l3_vlan_rx_register(struct net_device *dev,
1838 struct qeth_card *card = netdev_priv(dev); 1838 struct qeth_card *card = netdev_priv(dev);
1839 unsigned long flags; 1839 unsigned long flags;
1840 1840
1841 QETH_DBF_TEXT(trace, 4, "vlanreg"); 1841 QETH_DBF_TEXT(TRACE, 4, "vlanreg");
1842 spin_lock_irqsave(&card->vlanlock, flags); 1842 spin_lock_irqsave(&card->vlanlock, flags);
1843 card->vlangrp = grp; 1843 card->vlangrp = grp;
1844 spin_unlock_irqrestore(&card->vlanlock, flags); 1844 spin_unlock_irqrestore(&card->vlanlock, flags);
@@ -1876,7 +1876,7 @@ static void qeth_l3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
1876 struct qeth_card *card = netdev_priv(dev); 1876 struct qeth_card *card = netdev_priv(dev);
1877 unsigned long flags; 1877 unsigned long flags;
1878 1878
1879 QETH_DBF_TEXT_(trace, 4, "kid:%d", vid); 1879 QETH_DBF_TEXT_(TRACE, 4, "kid:%d", vid);
1880 spin_lock_irqsave(&card->vlanlock, flags); 1880 spin_lock_irqsave(&card->vlanlock, flags);
1881 /* unregister IP addresses of vlan device */ 1881 /* unregister IP addresses of vlan device */
1882 qeth_l3_free_vlan_addresses(card, vid); 1882 qeth_l3_free_vlan_addresses(card, vid);
@@ -2006,8 +2006,8 @@ static void qeth_l3_process_inbound_buffer(struct qeth_card *card,
2006 break; 2006 break;
2007 default: 2007 default:
2008 dev_kfree_skb_any(skb); 2008 dev_kfree_skb_any(skb);
2009 QETH_DBF_TEXT(trace, 3, "inbunkno"); 2009 QETH_DBF_TEXT(TRACE, 3, "inbunkno");
2010 QETH_DBF_HEX(control, 3, hdr, QETH_DBF_CONTROL_LEN); 2010 QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN);
2011 continue; 2011 continue;
2012 } 2012 }
2013 2013
@@ -2074,7 +2074,7 @@ static struct qeth_card *qeth_l3_get_card_from_dev(struct net_device *dev)
2074 card = netdev_priv(vlan_dev_info(dev)->real_dev); 2074 card = netdev_priv(vlan_dev_info(dev)->real_dev);
2075 if (card->options.layer2) 2075 if (card->options.layer2)
2076 card = NULL; 2076 card = NULL;
2077 QETH_DBF_TEXT_(trace, 4, "%d", rc); 2077 QETH_DBF_TEXT_(TRACE, 4, "%d", rc);
2078 return card ; 2078 return card ;
2079} 2079}
2080 2080
@@ -2082,8 +2082,8 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
2082{ 2082{
2083 int rc = 0; 2083 int rc = 0;
2084 2084
2085 QETH_DBF_TEXT(setup, 2, "stopcard"); 2085 QETH_DBF_TEXT(SETUP, 2, "stopcard");
2086 QETH_DBF_HEX(setup, 2, &card, sizeof(void *)); 2086 QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
2087 2087
2088 qeth_set_allowed_threads(card, 0, 1); 2088 qeth_set_allowed_threads(card, 0, 1);
2089 if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) 2089 if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD))
@@ -2096,7 +2096,7 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
2096 if (!card->use_hard_stop) { 2096 if (!card->use_hard_stop) {
2097 rc = qeth_send_stoplan(card); 2097 rc = qeth_send_stoplan(card);
2098 if (rc) 2098 if (rc)
2099 QETH_DBF_TEXT_(setup, 2, "1err%d", rc); 2099 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
2100 } 2100 }
2101 card->state = CARD_STATE_SOFTSETUP; 2101 card->state = CARD_STATE_SOFTSETUP;
2102 } 2102 }
@@ -2110,7 +2110,7 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
2110 (card->info.type != QETH_CARD_TYPE_IQD)) { 2110 (card->info.type != QETH_CARD_TYPE_IQD)) {
2111 rc = qeth_l3_put_unique_id(card); 2111 rc = qeth_l3_put_unique_id(card);
2112 if (rc) 2112 if (rc)
2113 QETH_DBF_TEXT_(setup, 2, "2err%d", rc); 2113 QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
2114 } 2114 }
2115 qeth_qdio_clear_card(card, 0); 2115 qeth_qdio_clear_card(card, 0);
2116 qeth_clear_qdio_buffers(card); 2116 qeth_clear_qdio_buffers(card);
@@ -2129,7 +2129,7 @@ static void qeth_l3_set_multicast_list(struct net_device *dev)
2129{ 2129{
2130 struct qeth_card *card = netdev_priv(dev); 2130 struct qeth_card *card = netdev_priv(dev);
2131 2131
2132 QETH_DBF_TEXT(trace, 3, "setmulti"); 2132 QETH_DBF_TEXT(TRACE, 3, "setmulti");
2133 qeth_l3_delete_mc_addresses(card); 2133 qeth_l3_delete_mc_addresses(card);
2134 qeth_l3_add_multicast_ipv4(card); 2134 qeth_l3_add_multicast_ipv4(card);
2135#ifdef CONFIG_QETH_IPV6 2135#ifdef CONFIG_QETH_IPV6
@@ -2169,7 +2169,7 @@ static int qeth_l3_arp_set_no_entries(struct qeth_card *card, int no_entries)
2169 int tmp; 2169 int tmp;
2170 int rc; 2170 int rc;
2171 2171
2172 QETH_DBF_TEXT(trace, 3, "arpstnoe"); 2172 QETH_DBF_TEXT(TRACE, 3, "arpstnoe");
2173 2173
2174 /* 2174 /*
2175 * currently GuestLAN only supports the ARP assist function 2175 * currently GuestLAN only supports the ARP assist function
@@ -2223,17 +2223,17 @@ static int qeth_l3_arp_query_cb(struct qeth_card *card,
2223 int uentry_size; 2223 int uentry_size;
2224 int i; 2224 int i;
2225 2225
2226 QETH_DBF_TEXT(trace, 4, "arpquecb"); 2226 QETH_DBF_TEXT(TRACE, 4, "arpquecb");
2227 2227
2228 qinfo = (struct qeth_arp_query_info *) reply->param; 2228 qinfo = (struct qeth_arp_query_info *) reply->param;
2229 cmd = (struct qeth_ipa_cmd *) data; 2229 cmd = (struct qeth_ipa_cmd *) data;
2230 if (cmd->hdr.return_code) { 2230 if (cmd->hdr.return_code) {
2231 QETH_DBF_TEXT_(trace, 4, "qaer1%i", cmd->hdr.return_code); 2231 QETH_DBF_TEXT_(TRACE, 4, "qaer1%i", cmd->hdr.return_code);
2232 return 0; 2232 return 0;
2233 } 2233 }
2234 if (cmd->data.setassparms.hdr.return_code) { 2234 if (cmd->data.setassparms.hdr.return_code) {
2235 cmd->hdr.return_code = cmd->data.setassparms.hdr.return_code; 2235 cmd->hdr.return_code = cmd->data.setassparms.hdr.return_code;
2236 QETH_DBF_TEXT_(trace, 4, "qaer2%i", cmd->hdr.return_code); 2236 QETH_DBF_TEXT_(TRACE, 4, "qaer2%i", cmd->hdr.return_code);
2237 return 0; 2237 return 0;
2238 } 2238 }
2239 qdata = &cmd->data.setassparms.data.query_arp; 2239 qdata = &cmd->data.setassparms.data.query_arp;
@@ -2255,17 +2255,17 @@ static int qeth_l3_arp_query_cb(struct qeth_card *card,
2255 /* check if there is enough room in userspace */ 2255 /* check if there is enough room in userspace */
2256 if ((qinfo->udata_len - qinfo->udata_offset) < 2256 if ((qinfo->udata_len - qinfo->udata_offset) <
2257 qdata->no_entries * uentry_size){ 2257 qdata->no_entries * uentry_size){
2258 QETH_DBF_TEXT_(trace, 4, "qaer3%i", -ENOMEM); 2258 QETH_DBF_TEXT_(TRACE, 4, "qaer3%i", -ENOMEM);
2259 cmd->hdr.return_code = -ENOMEM; 2259 cmd->hdr.return_code = -ENOMEM;
2260 PRINT_WARN("query ARP user space buffer is too small for " 2260 PRINT_WARN("query ARP user space buffer is too small for "
2261 "the returned number of ARP entries. " 2261 "the returned number of ARP entries. "
2262 "Aborting query!\n"); 2262 "Aborting query!\n");
2263 goto out_error; 2263 goto out_error;
2264 } 2264 }
2265 QETH_DBF_TEXT_(trace, 4, "anore%i", 2265 QETH_DBF_TEXT_(TRACE, 4, "anore%i",
2266 cmd->data.setassparms.hdr.number_of_replies); 2266 cmd->data.setassparms.hdr.number_of_replies);
2267 QETH_DBF_TEXT_(trace, 4, "aseqn%i", cmd->data.setassparms.hdr.seq_no); 2267 QETH_DBF_TEXT_(TRACE, 4, "aseqn%i", cmd->data.setassparms.hdr.seq_no);
2268 QETH_DBF_TEXT_(trace, 4, "anoen%i", qdata->no_entries); 2268 QETH_DBF_TEXT_(TRACE, 4, "anoen%i", qdata->no_entries);
2269 2269
2270 if (qinfo->mask_bits & QETH_QARP_STRIP_ENTRIES) { 2270 if (qinfo->mask_bits & QETH_QARP_STRIP_ENTRIES) {
2271 /* strip off "media specific information" */ 2271 /* strip off "media specific information" */
@@ -2301,7 +2301,7 @@ static int qeth_l3_send_ipa_arp_cmd(struct qeth_card *card,
2301 unsigned long), 2301 unsigned long),
2302 void *reply_param) 2302 void *reply_param)
2303{ 2303{
2304 QETH_DBF_TEXT(trace, 4, "sendarp"); 2304 QETH_DBF_TEXT(TRACE, 4, "sendarp");
2305 2305
2306 memcpy(iob->data, IPA_PDU_HEADER, IPA_PDU_HEADER_SIZE); 2306 memcpy(iob->data, IPA_PDU_HEADER, IPA_PDU_HEADER_SIZE);
2307 memcpy(QETH_IPA_CMD_DEST_ADDR(iob->data), 2307 memcpy(QETH_IPA_CMD_DEST_ADDR(iob->data),
@@ -2317,7 +2317,7 @@ static int qeth_l3_arp_query(struct qeth_card *card, char __user *udata)
2317 int tmp; 2317 int tmp;
2318 int rc; 2318 int rc;
2319 2319
2320 QETH_DBF_TEXT(trace, 3, "arpquery"); 2320 QETH_DBF_TEXT(TRACE, 3, "arpquery");
2321 2321
2322 if (!qeth_is_supported(card,/*IPA_QUERY_ARP_ADDR_INFO*/ 2322 if (!qeth_is_supported(card,/*IPA_QUERY_ARP_ADDR_INFO*/
2323 IPA_ARP_PROCESSING)) { 2323 IPA_ARP_PROCESSING)) {
@@ -2362,7 +2362,7 @@ static int qeth_l3_arp_add_entry(struct qeth_card *card,
2362 int tmp; 2362 int tmp;
2363 int rc; 2363 int rc;
2364 2364
2365 QETH_DBF_TEXT(trace, 3, "arpadent"); 2365 QETH_DBF_TEXT(TRACE, 3, "arpadent");
2366 2366
2367 /* 2367 /*
2368 * currently GuestLAN only supports the ARP assist function 2368 * currently GuestLAN only supports the ARP assist function
@@ -2404,7 +2404,7 @@ static int qeth_l3_arp_remove_entry(struct qeth_card *card,
2404 int tmp; 2404 int tmp;
2405 int rc; 2405 int rc;
2406 2406
2407 QETH_DBF_TEXT(trace, 3, "arprment"); 2407 QETH_DBF_TEXT(TRACE, 3, "arprment");
2408 2408
2409 /* 2409 /*
2410 * currently GuestLAN only supports the ARP assist function 2410 * currently GuestLAN only supports the ARP assist function
@@ -2443,7 +2443,7 @@ static int qeth_l3_arp_flush_cache(struct qeth_card *card)
2443 int rc; 2443 int rc;
2444 int tmp; 2444 int tmp;
2445 2445
2446 QETH_DBF_TEXT(trace, 3, "arpflush"); 2446 QETH_DBF_TEXT(TRACE, 3, "arpflush");
2447 2447
2448 /* 2448 /*
2449 * currently GuestLAN only supports the ARP assist function 2449 * currently GuestLAN only supports the ARP assist function
@@ -2552,14 +2552,14 @@ static int qeth_l3_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
2552 rc = -EOPNOTSUPP; 2552 rc = -EOPNOTSUPP;
2553 } 2553 }
2554 if (rc) 2554 if (rc)
2555 QETH_DBF_TEXT_(trace, 2, "ioce%d", rc); 2555 QETH_DBF_TEXT_(TRACE, 2, "ioce%d", rc);
2556 return rc; 2556 return rc;
2557} 2557}
2558 2558
2559static void qeth_l3_fill_header(struct qeth_card *card, struct qeth_hdr *hdr, 2559static void qeth_l3_fill_header(struct qeth_card *card, struct qeth_hdr *hdr,
2560 struct sk_buff *skb, int ipv, int cast_type) 2560 struct sk_buff *skb, int ipv, int cast_type)
2561{ 2561{
2562 QETH_DBF_TEXT(trace, 6, "fillhdr"); 2562 QETH_DBF_TEXT(TRACE, 6, "fillhdr");
2563 2563
2564 memset(hdr, 0, sizeof(struct qeth_hdr)); 2564 memset(hdr, 0, sizeof(struct qeth_hdr));
2565 hdr->hdr.l3.id = QETH_HEADER_TYPE_LAYER3; 2565 hdr->hdr.l3.id = QETH_HEADER_TYPE_LAYER3;
@@ -2638,7 +2638,7 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
2638 enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO; 2638 enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO;
2639 struct qeth_eddp_context *ctx = NULL; 2639 struct qeth_eddp_context *ctx = NULL;
2640 2640
2641 QETH_DBF_TEXT(trace, 6, "l3xmit"); 2641 QETH_DBF_TEXT(TRACE, 6, "l3xmit");
2642 2642
2643 if ((card->info.type == QETH_CARD_TYPE_IQD) && 2643 if ((card->info.type == QETH_CARD_TYPE_IQD) &&
2644 (skb->protocol != htons(ETH_P_IPV6)) && 2644 (skb->protocol != htons(ETH_P_IPV6)) &&
@@ -2799,7 +2799,7 @@ static int qeth_l3_open(struct net_device *dev)
2799{ 2799{
2800 struct qeth_card *card = netdev_priv(dev); 2800 struct qeth_card *card = netdev_priv(dev);
2801 2801
2802 QETH_DBF_TEXT(trace, 4, "qethopen"); 2802 QETH_DBF_TEXT(TRACE, 4, "qethopen");
2803 if (card->state != CARD_STATE_SOFTSETUP) 2803 if (card->state != CARD_STATE_SOFTSETUP)
2804 return -ENODEV; 2804 return -ENODEV;
2805 card->data.state = CH_STATE_UP; 2805 card->data.state = CH_STATE_UP;
@@ -2816,7 +2816,7 @@ static int qeth_l3_stop(struct net_device *dev)
2816{ 2816{
2817 struct qeth_card *card = netdev_priv(dev); 2817 struct qeth_card *card = netdev_priv(dev);
2818 2818
2819 QETH_DBF_TEXT(trace, 4, "qethstop"); 2819 QETH_DBF_TEXT(TRACE, 4, "qethstop");
2820 netif_tx_disable(dev); 2820 netif_tx_disable(dev);
2821 card->dev->flags &= ~IFF_UP; 2821 card->dev->flags &= ~IFF_UP;
2822 if (card->state == CARD_STATE_UP) 2822 if (card->state == CARD_STATE_UP)
@@ -2982,7 +2982,7 @@ static void qeth_l3_qdio_input_handler(struct ccw_device *ccwdev,
2982 int index; 2982 int index;
2983 int i; 2983 int i;
2984 2984
2985 QETH_DBF_TEXT(trace, 6, "qdinput"); 2985 QETH_DBF_TEXT(TRACE, 6, "qdinput");
2986 card = (struct qeth_card *) card_ptr; 2986 card = (struct qeth_card *) card_ptr;
2987 net_dev = card->dev; 2987 net_dev = card->dev;
2988 if (card->options.performance_stats) { 2988 if (card->options.performance_stats) {
@@ -2991,11 +2991,11 @@ static void qeth_l3_qdio_input_handler(struct ccw_device *ccwdev,
2991 } 2991 }
2992 if (status & QDIO_STATUS_LOOK_FOR_ERROR) { 2992 if (status & QDIO_STATUS_LOOK_FOR_ERROR) {
2993 if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION) { 2993 if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION) {
2994 QETH_DBF_TEXT(trace, 1, "qdinchk"); 2994 QETH_DBF_TEXT(TRACE, 1, "qdinchk");
2995 QETH_DBF_TEXT_(trace, 1, "%s", CARD_BUS_ID(card)); 2995 QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card));
2996 QETH_DBF_TEXT_(trace, 1, "%04X%04X", 2996 QETH_DBF_TEXT_(TRACE, 1, "%04X%04X",
2997 first_element, count); 2997 first_element, count);
2998 QETH_DBF_TEXT_(trace, 1, "%04X%04X", queue, status); 2998 QETH_DBF_TEXT_(TRACE, 1, "%04X%04X", queue, status);
2999 qeth_schedule_recovery(card); 2999 qeth_schedule_recovery(card);
3000 return; 3000 return;
3001 } 3001 }
@@ -3059,8 +3059,8 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
3059 enum qeth_card_states recover_flag; 3059 enum qeth_card_states recover_flag;
3060 3060
3061 BUG_ON(!card); 3061 BUG_ON(!card);
3062 QETH_DBF_TEXT(setup, 2, "setonlin"); 3062 QETH_DBF_TEXT(SETUP, 2, "setonlin");
3063 QETH_DBF_HEX(setup, 2, &card, sizeof(void *)); 3063 QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
3064 3064
3065 qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1); 3065 qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1);
3066 if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) { 3066 if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) {
@@ -3072,23 +3072,23 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
3072 recover_flag = card->state; 3072 recover_flag = card->state;
3073 rc = ccw_device_set_online(CARD_RDEV(card)); 3073 rc = ccw_device_set_online(CARD_RDEV(card));
3074 if (rc) { 3074 if (rc) {
3075 QETH_DBF_TEXT_(setup, 2, "1err%d", rc); 3075 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
3076 return -EIO; 3076 return -EIO;
3077 } 3077 }
3078 rc = ccw_device_set_online(CARD_WDEV(card)); 3078 rc = ccw_device_set_online(CARD_WDEV(card));
3079 if (rc) { 3079 if (rc) {
3080 QETH_DBF_TEXT_(setup, 2, "1err%d", rc); 3080 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
3081 return -EIO; 3081 return -EIO;
3082 } 3082 }
3083 rc = ccw_device_set_online(CARD_DDEV(card)); 3083 rc = ccw_device_set_online(CARD_DDEV(card));
3084 if (rc) { 3084 if (rc) {
3085 QETH_DBF_TEXT_(setup, 2, "1err%d", rc); 3085 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
3086 return -EIO; 3086 return -EIO;
3087 } 3087 }
3088 3088
3089 rc = qeth_core_hardsetup_card(card); 3089 rc = qeth_core_hardsetup_card(card);
3090 if (rc) { 3090 if (rc) {
3091 QETH_DBF_TEXT_(setup, 2, "2err%d", rc); 3091 QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
3092 goto out_remove; 3092 goto out_remove;
3093 } 3093 }
3094 3094
@@ -3101,11 +3101,11 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
3101 qeth_print_status_message(card); 3101 qeth_print_status_message(card);
3102 3102
3103 /* softsetup */ 3103 /* softsetup */
3104 QETH_DBF_TEXT(setup, 2, "softsetp"); 3104 QETH_DBF_TEXT(SETUP, 2, "softsetp");
3105 3105
3106 rc = qeth_send_startlan(card); 3106 rc = qeth_send_startlan(card);
3107 if (rc) { 3107 if (rc) {
3108 QETH_DBF_TEXT_(setup, 2, "1err%d", rc); 3108 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
3109 if (rc == 0xe080) { 3109 if (rc == 0xe080) {
3110 PRINT_WARN("LAN on card %s if offline! " 3110 PRINT_WARN("LAN on card %s if offline! "
3111 "Waiting for STARTLAN from card.\n", 3111 "Waiting for STARTLAN from card.\n",
@@ -3119,21 +3119,21 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
3119 3119
3120 rc = qeth_l3_setadapter_parms(card); 3120 rc = qeth_l3_setadapter_parms(card);
3121 if (rc) 3121 if (rc)
3122 QETH_DBF_TEXT_(setup, 2, "2err%d", rc); 3122 QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc);
3123 rc = qeth_l3_start_ipassists(card); 3123 rc = qeth_l3_start_ipassists(card);
3124 if (rc) 3124 if (rc)
3125 QETH_DBF_TEXT_(setup, 2, "3err%d", rc); 3125 QETH_DBF_TEXT_(SETUP, 2, "3err%d", rc);
3126 rc = qeth_l3_setrouting_v4(card); 3126 rc = qeth_l3_setrouting_v4(card);
3127 if (rc) 3127 if (rc)
3128 QETH_DBF_TEXT_(setup, 2, "4err%d", rc); 3128 QETH_DBF_TEXT_(SETUP, 2, "4err%d", rc);
3129 rc = qeth_l3_setrouting_v6(card); 3129 rc = qeth_l3_setrouting_v6(card);
3130 if (rc) 3130 if (rc)
3131 QETH_DBF_TEXT_(setup, 2, "5err%d", rc); 3131 QETH_DBF_TEXT_(SETUP, 2, "5err%d", rc);
3132 netif_tx_disable(card->dev); 3132 netif_tx_disable(card->dev);
3133 3133
3134 rc = qeth_init_qdio_queues(card); 3134 rc = qeth_init_qdio_queues(card);
3135 if (rc) { 3135 if (rc) {
3136 QETH_DBF_TEXT_(setup, 2, "6err%d", rc); 3136 QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc);
3137 goto out_remove; 3137 goto out_remove;
3138 } 3138 }
3139 card->state = CARD_STATE_SOFTSETUP; 3139 card->state = CARD_STATE_SOFTSETUP;
@@ -3172,8 +3172,8 @@ static int __qeth_l3_set_offline(struct ccwgroup_device *cgdev,
3172 int rc = 0, rc2 = 0, rc3 = 0; 3172 int rc = 0, rc2 = 0, rc3 = 0;
3173 enum qeth_card_states recover_flag; 3173 enum qeth_card_states recover_flag;
3174 3174
3175 QETH_DBF_TEXT(setup, 3, "setoffl"); 3175 QETH_DBF_TEXT(SETUP, 3, "setoffl");
3176 QETH_DBF_HEX(setup, 3, &card, sizeof(void *)); 3176 QETH_DBF_HEX(SETUP, 3, &card, sizeof(void *));
3177 3177
3178 if (card->dev && netif_carrier_ok(card->dev)) 3178 if (card->dev && netif_carrier_ok(card->dev))
3179 netif_carrier_off(card->dev); 3179 netif_carrier_off(card->dev);
@@ -3189,7 +3189,7 @@ static int __qeth_l3_set_offline(struct ccwgroup_device *cgdev,
3189 if (!rc) 3189 if (!rc)
3190 rc = (rc2) ? rc2 : rc3; 3190 rc = (rc2) ? rc2 : rc3;
3191 if (rc) 3191 if (rc)
3192 QETH_DBF_TEXT_(setup, 2, "1err%d", rc); 3192 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
3193 if (recover_flag == CARD_STATE_UP) 3193 if (recover_flag == CARD_STATE_UP)
3194 card->state = CARD_STATE_RECOVER; 3194 card->state = CARD_STATE_RECOVER;
3195 /* let user_space know that device is offline */ 3195 /* let user_space know that device is offline */
@@ -3208,11 +3208,11 @@ static int qeth_l3_recover(void *ptr)
3208 int rc = 0; 3208 int rc = 0;
3209 3209
3210 card = (struct qeth_card *) ptr; 3210 card = (struct qeth_card *) ptr;
3211 QETH_DBF_TEXT(trace, 2, "recover1"); 3211 QETH_DBF_TEXT(TRACE, 2, "recover1");
3212 QETH_DBF_HEX(trace, 2, &card, sizeof(void *)); 3212 QETH_DBF_HEX(TRACE, 2, &card, sizeof(void *));
3213 if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD)) 3213 if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD))
3214 return 0; 3214 return 0;
3215 QETH_DBF_TEXT(trace, 2, "recover2"); 3215 QETH_DBF_TEXT(TRACE, 2, "recover2");
3216 PRINT_WARN("Recovery of device %s started ...\n", 3216 PRINT_WARN("Recovery of device %s started ...\n",
3217 CARD_BUS_ID(card)); 3217 CARD_BUS_ID(card));
3218 card->use_hard_stop = 1; 3218 card->use_hard_stop = 1;
@@ -3258,7 +3258,7 @@ static int qeth_l3_ip_event(struct notifier_block *this,
3258 if (dev_net(dev) != &init_net) 3258 if (dev_net(dev) != &init_net)
3259 return NOTIFY_DONE; 3259 return NOTIFY_DONE;
3260 3260
3261 QETH_DBF_TEXT(trace, 3, "ipevent"); 3261 QETH_DBF_TEXT(TRACE, 3, "ipevent");
3262 card = qeth_l3_get_card_from_dev(dev); 3262 card = qeth_l3_get_card_from_dev(dev);
3263 if (!card) 3263 if (!card)
3264 return NOTIFY_DONE; 3264 return NOTIFY_DONE;
@@ -3305,7 +3305,7 @@ static int qeth_l3_ip6_event(struct notifier_block *this,
3305 struct qeth_ipaddr *addr; 3305 struct qeth_ipaddr *addr;
3306 struct qeth_card *card; 3306 struct qeth_card *card;
3307 3307
3308 QETH_DBF_TEXT(trace, 3, "ip6event"); 3308 QETH_DBF_TEXT(TRACE, 3, "ip6event");
3309 3309
3310 card = qeth_l3_get_card_from_dev(dev); 3310 card = qeth_l3_get_card_from_dev(dev);
3311 if (!card) 3311 if (!card)
@@ -3348,7 +3348,7 @@ static int qeth_l3_register_notifiers(void)
3348{ 3348{
3349 int rc; 3349 int rc;
3350 3350
3351 QETH_DBF_TEXT(trace, 5, "regnotif"); 3351 QETH_DBF_TEXT(TRACE, 5, "regnotif");
3352 rc = register_inetaddr_notifier(&qeth_l3_ip_notifier); 3352 rc = register_inetaddr_notifier(&qeth_l3_ip_notifier);
3353 if (rc) 3353 if (rc)
3354 return rc; 3354 return rc;
@@ -3367,7 +3367,7 @@ static int qeth_l3_register_notifiers(void)
3367static void qeth_l3_unregister_notifiers(void) 3367static void qeth_l3_unregister_notifiers(void)
3368{ 3368{
3369 3369
3370 QETH_DBF_TEXT(trace, 5, "unregnot"); 3370 QETH_DBF_TEXT(TRACE, 5, "unregnot");
3371 BUG_ON(unregister_inetaddr_notifier(&qeth_l3_ip_notifier)); 3371 BUG_ON(unregister_inetaddr_notifier(&qeth_l3_ip_notifier));
3372#ifdef CONFIG_QETH_IPV6 3372#ifdef CONFIG_QETH_IPV6
3373 BUG_ON(unregister_inet6addr_notifier(&qeth_l3_ip6_notifier)); 3373 BUG_ON(unregister_inet6addr_notifier(&qeth_l3_ip6_notifier));