aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorFrank Blaschka <frank.blaschka@de.ibm.com>2008-12-25 07:39:49 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-12-25 07:39:25 -0500
commit74eacdb9c2bf9fc6e8c6785013b5dd0e551a9dfa (patch)
treefb14c3dafdda0f02d6364a4991f30e4856ed603b /drivers/s390
parentb3ff088b3025c3583194edd7576215b61333111f (diff)
[S390] convert qeth printks to dev_xxx and pr_xxx macros.
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/net/qeth_core.h7
-rw-r--r--drivers/s390/net/qeth_core_main.c149
-rw-r--r--drivers/s390/net/qeth_l2_main.c37
-rw-r--r--drivers/s390/net/qeth_l3_main.c211
4 files changed, 212 insertions, 192 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index 1414d3df69dc..d5ccce1643e4 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -35,8 +35,6 @@
35 35
36#include "qeth_core_mpc.h" 36#include "qeth_core_mpc.h"
37 37
38#define KMSG_COMPONENT "qeth"
39
40/** 38/**
41 * Debug Facility stuff 39 * Debug Facility stuff
42 */ 40 */
@@ -75,11 +73,6 @@ struct qeth_dbf_info {
75#define QETH_DBF_TEXT_(name, level, text...) \ 73#define QETH_DBF_TEXT_(name, level, text...) \
76 qeth_dbf_longtext(QETH_DBF_##name, level, text) 74 qeth_dbf_longtext(QETH_DBF_##name, level, text)
77 75
78/**
79 * some more debug stuff
80 */
81#define PRINTK_HEADER "qeth: "
82
83#define SENSE_COMMAND_REJECT_BYTE 0 76#define SENSE_COMMAND_REJECT_BYTE 0
84#define SENSE_COMMAND_REJECT_FLAG 0x80 77#define SENSE_COMMAND_REJECT_FLAG 0x80
85#define SENSE_RESETTING_EVENT_BYTE 1 78#define SENSE_RESETTING_EVENT_BYTE 1
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index bacd58c5061f..e783644a2105 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -8,6 +8,9 @@
8 * Frank Blaschka <frank.blaschka@de.ibm.com> 8 * Frank Blaschka <frank.blaschka@de.ibm.com>
9 */ 9 */
10 10
11#define KMSG_COMPONENT "qeth"
12#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
13
11#include <linux/module.h> 14#include <linux/module.h>
12#include <linux/moduleparam.h> 15#include <linux/moduleparam.h>
13#include <linux/string.h> 16#include <linux/string.h>
@@ -319,7 +322,10 @@ static int qeth_issue_next_read(struct qeth_card *card)
319 return -EIO; 322 return -EIO;
320 iob = qeth_get_buffer(&card->read); 323 iob = qeth_get_buffer(&card->read);
321 if (!iob) { 324 if (!iob) {
322 PRINT_WARN("issue_next_read failed: no iob available!\n"); 325 dev_warn(&card->gdev->dev, "The qeth device driver "
326 "failed to recover an error on the device\n");
327 QETH_DBF_MESSAGE(2, "%s issue_next_read failed: no iob "
328 "available\n", dev_name(&card->gdev->dev));
323 return -ENOMEM; 329 return -ENOMEM;
324 } 330 }
325 qeth_setup_ccw(&card->read, iob->data, QETH_BUFSIZE); 331 qeth_setup_ccw(&card->read, iob->data, QETH_BUFSIZE);
@@ -327,7 +333,8 @@ static int qeth_issue_next_read(struct qeth_card *card)
327 rc = ccw_device_start(card->read.ccwdev, &card->read.ccw, 333 rc = ccw_device_start(card->read.ccwdev, &card->read.ccw,
328 (addr_t) iob, 0, 0); 334 (addr_t) iob, 0, 0);
329 if (rc) { 335 if (rc) {
330 PRINT_ERR("Error in starting next read ccw! rc=%i\n", rc); 336 QETH_DBF_MESSAGE(2, "%s error in starting next read ccw! "
337 "rc=%i\n", dev_name(&card->gdev->dev), rc);
331 atomic_set(&card->read.irq_pending, 0); 338 atomic_set(&card->read.irq_pending, 0);
332 qeth_schedule_recovery(card); 339 qeth_schedule_recovery(card);
333 wake_up(&card->wait_q); 340 wake_up(&card->wait_q);
@@ -393,10 +400,9 @@ static struct qeth_ipa_cmd *qeth_check_ipa_data(struct qeth_card *card,
393 } else { 400 } else {
394 switch (cmd->hdr.command) { 401 switch (cmd->hdr.command) {
395 case IPA_CMD_STOPLAN: 402 case IPA_CMD_STOPLAN:
396 PRINT_WARN("Link failure on %s (CHPID 0x%X) - " 403 dev_warn(&card->gdev->dev,
397 "there is a network problem or " 404 "The link for interface %s on CHPID"
398 "someone pulled the cable or " 405 " 0x%X failed\n",
399 "disabled the port.\n",
400 QETH_CARD_IFNAME(card), 406 QETH_CARD_IFNAME(card),
401 card->info.chpid); 407 card->info.chpid);
402 card->lan_online = 0; 408 card->lan_online = 0;
@@ -404,9 +410,9 @@ static struct qeth_ipa_cmd *qeth_check_ipa_data(struct qeth_card *card,
404 netif_carrier_off(card->dev); 410 netif_carrier_off(card->dev);
405 return NULL; 411 return NULL;
406 case IPA_CMD_STARTLAN: 412 case IPA_CMD_STARTLAN:
407 PRINT_INFO("Link reestablished on %s " 413 dev_info(&card->gdev->dev,
408 "(CHPID 0x%X). Scheduling " 414 "The link for %s on CHPID 0x%X has"
409 "IP address reset.\n", 415 " been restored\n",
410 QETH_CARD_IFNAME(card), 416 QETH_CARD_IFNAME(card),
411 card->info.chpid); 417 card->info.chpid);
412 netif_carrier_on(card->dev); 418 netif_carrier_on(card->dev);
@@ -458,7 +464,7 @@ static int qeth_check_idx_response(unsigned char *buffer)
458 464
459 QETH_DBF_HEX(CTRL, 2, buffer, QETH_DBF_CTRL_LEN); 465 QETH_DBF_HEX(CTRL, 2, buffer, QETH_DBF_CTRL_LEN);
460 if ((buffer[2] & 0xc0) == 0xc0) { 466 if ((buffer[2] & 0xc0) == 0xc0) {
461 PRINT_WARN("received an IDX TERMINATE " 467 QETH_DBF_MESSAGE(2, "received an IDX TERMINATE "
462 "with cause code 0x%02x%s\n", 468 "with cause code 0x%02x%s\n",
463 buffer[4], 469 buffer[4],
464 ((buffer[4] == 0x22) ? 470 ((buffer[4] == 0x22) ?
@@ -744,8 +750,10 @@ static int qeth_get_problem(struct ccw_device *cdev, struct irb *irb)
744 SCHN_STAT_CHN_DATA_CHK | SCHN_STAT_CHAIN_CHECK | 750 SCHN_STAT_CHN_DATA_CHK | SCHN_STAT_CHAIN_CHECK |
745 SCHN_STAT_PROT_CHECK | SCHN_STAT_PROG_CHECK)) { 751 SCHN_STAT_PROT_CHECK | SCHN_STAT_PROG_CHECK)) {
746 QETH_DBF_TEXT(TRACE, 2, "CGENCHK"); 752 QETH_DBF_TEXT(TRACE, 2, "CGENCHK");
747 PRINT_WARN("check on device %s, dstat=x%x, cstat=x%x ", 753 dev_warn(&cdev->dev, "The qeth device driver "
748 dev_name(&cdev->dev), dstat, cstat); 754 "failed to recover an error on the device\n");
755 QETH_DBF_MESSAGE(2, "%s check on device dstat=x%x, cstat=x%x ",
756 dev_name(&cdev->dev), dstat, cstat);
749 print_hex_dump(KERN_WARNING, "qeth: irb ", DUMP_PREFIX_OFFSET, 757 print_hex_dump(KERN_WARNING, "qeth: irb ", DUMP_PREFIX_OFFSET,
750 16, 1, irb, 64, 1); 758 16, 1, irb, 64, 1);
751 return 1; 759 return 1;
@@ -784,12 +792,14 @@ static long __qeth_check_irb_error(struct ccw_device *cdev,
784 792
785 switch (PTR_ERR(irb)) { 793 switch (PTR_ERR(irb)) {
786 case -EIO: 794 case -EIO:
787 PRINT_WARN("i/o-error on device %s\n", dev_name(&cdev->dev)); 795 QETH_DBF_MESSAGE(2, "%s i/o-error on device\n",
796 dev_name(&cdev->dev));
788 QETH_DBF_TEXT(TRACE, 2, "ckirberr"); 797 QETH_DBF_TEXT(TRACE, 2, "ckirberr");
789 QETH_DBF_TEXT_(TRACE, 2, " rc%d", -EIO); 798 QETH_DBF_TEXT_(TRACE, 2, " rc%d", -EIO);
790 break; 799 break;
791 case -ETIMEDOUT: 800 case -ETIMEDOUT:
792 PRINT_WARN("timeout on device %s\n", dev_name(&cdev->dev)); 801 dev_warn(&cdev->dev, "A hardware operation timed out"
802 " on the device\n");
793 QETH_DBF_TEXT(TRACE, 2, "ckirberr"); 803 QETH_DBF_TEXT(TRACE, 2, "ckirberr");
794 QETH_DBF_TEXT_(TRACE, 2, " rc%d", -ETIMEDOUT); 804 QETH_DBF_TEXT_(TRACE, 2, " rc%d", -ETIMEDOUT);
795 if (intparm == QETH_RCD_PARM) { 805 if (intparm == QETH_RCD_PARM) {
@@ -802,8 +812,8 @@ static long __qeth_check_irb_error(struct ccw_device *cdev,
802 } 812 }
803 break; 813 break;
804 default: 814 default:
805 PRINT_WARN("unknown error %ld on device %s\n", PTR_ERR(irb), 815 QETH_DBF_MESSAGE(2, "%s unknown error %ld on device\n",
806 dev_name(&cdev->dev)); 816 dev_name(&cdev->dev), PTR_ERR(irb));
807 QETH_DBF_TEXT(TRACE, 2, "ckirberr"); 817 QETH_DBF_TEXT(TRACE, 2, "ckirberr");
808 QETH_DBF_TEXT(TRACE, 2, " rc???"); 818 QETH_DBF_TEXT(TRACE, 2, " rc???");
809 } 819 }
@@ -869,10 +879,12 @@ static void qeth_irq(struct ccw_device *cdev, unsigned long intparm,
869 (dstat & DEV_STAT_UNIT_CHECK) || 879 (dstat & DEV_STAT_UNIT_CHECK) ||
870 (cstat)) { 880 (cstat)) {
871 if (irb->esw.esw0.erw.cons) { 881 if (irb->esw.esw0.erw.cons) {
872 /* TODO: we should make this s390dbf */ 882 dev_warn(&channel->ccwdev->dev,
873 PRINT_WARN("sense data available on channel %s.\n", 883 "The qeth device driver failed to recover "
874 CHANNEL_ID(channel)); 884 "an error on the device\n");
875 PRINT_WARN(" cstat 0x%X\n dstat 0x%X\n", cstat, dstat); 885 QETH_DBF_MESSAGE(2, "%s sense data available. cstat "
886 "0x%X dstat 0x%X\n",
887 dev_name(&channel->ccwdev->dev), cstat, dstat);
876 print_hex_dump(KERN_WARNING, "qeth: irb ", 888 print_hex_dump(KERN_WARNING, "qeth: irb ",
877 DUMP_PREFIX_OFFSET, 16, 1, irb, 32, 1); 889 DUMP_PREFIX_OFFSET, 16, 1, irb, 32, 1);
878 print_hex_dump(KERN_WARNING, "qeth: sense data ", 890 print_hex_dump(KERN_WARNING, "qeth: sense data ",
@@ -1185,8 +1197,8 @@ static int qeth_determine_card_type(struct qeth_card *card)
1185 card->qdio.no_out_queues = known_devices[i][8]; 1197 card->qdio.no_out_queues = known_devices[i][8];
1186 card->info.is_multicast_different = known_devices[i][9]; 1198 card->info.is_multicast_different = known_devices[i][9];
1187 if (qeth_is_1920_device(card)) { 1199 if (qeth_is_1920_device(card)) {
1188 PRINT_INFO("Priority Queueing not able " 1200 dev_info(&card->gdev->dev,
1189 "due to hardware limitations!\n"); 1201 "Priority Queueing not supported\n");
1190 card->qdio.no_out_queues = 1; 1202 card->qdio.no_out_queues = 1;
1191 card->qdio.default_out_queue = 0; 1203 card->qdio.default_out_queue = 0;
1192 } 1204 }
@@ -1195,7 +1207,8 @@ static int qeth_determine_card_type(struct qeth_card *card)
1195 i++; 1207 i++;
1196 } 1208 }
1197 card->info.type = QETH_CARD_TYPE_UNKNOWN; 1209 card->info.type = QETH_CARD_TYPE_UNKNOWN;
1198 PRINT_ERR("unknown card type on device %s\n", CARD_BUS_ID(card)); 1210 dev_err(&card->gdev->dev, "The adapter hardware is of an "
1211 "unknown type\n");
1199 return -ENOENT; 1212 return -ENOENT;
1200} 1213}
1201 1214
@@ -1378,8 +1391,8 @@ static int qeth_get_unitaddr(struct qeth_card *card)
1378 QETH_DBF_TEXT(SETUP, 2, "getunit"); 1391 QETH_DBF_TEXT(SETUP, 2, "getunit");
1379 rc = qeth_read_conf_data(card, (void **) &prcd, &length); 1392 rc = qeth_read_conf_data(card, (void **) &prcd, &length);
1380 if (rc) { 1393 if (rc) {
1381 PRINT_ERR("qeth_read_conf_data for device %s returned %i\n", 1394 QETH_DBF_MESSAGE(2, "%s qeth_read_conf_data returned %i\n",
1382 CARD_DDEV_ID(card), rc); 1395 dev_name(&card->gdev->dev), rc);
1383 return rc; 1396 return rc;
1384 } 1397 }
1385 card->info.chpid = prcd[30]; 1398 card->info.chpid = prcd[30];
@@ -1529,7 +1542,10 @@ static int qeth_idx_activate_channel(struct qeth_channel *channel,
1529 if (rc == -ERESTARTSYS) 1542 if (rc == -ERESTARTSYS)
1530 return rc; 1543 return rc;
1531 if (channel->state != CH_STATE_ACTIVATING) { 1544 if (channel->state != CH_STATE_ACTIVATING) {
1532 PRINT_WARN("IDX activate timed out!\n"); 1545 dev_warn(&channel->ccwdev->dev, "The qeth device driver"
1546 " failed to recover an error on the device\n");
1547 QETH_DBF_MESSAGE(2, "%s IDX activate timed out\n",
1548 dev_name(&channel->ccwdev->dev));
1533 QETH_DBF_TEXT_(SETUP, 2, "2err%d", -ETIME); 1549 QETH_DBF_TEXT_(SETUP, 2, "2err%d", -ETIME);
1534 qeth_clear_cmd_buffers(channel); 1550 qeth_clear_cmd_buffers(channel);
1535 return -ETIME; 1551 return -ETIME;
@@ -1562,20 +1578,21 @@ static void qeth_idx_write_cb(struct qeth_channel *channel,
1562 1578
1563 if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) { 1579 if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) {
1564 if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19) 1580 if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19)
1565 PRINT_ERR("IDX_ACTIVATE on write channel device %s: " 1581 dev_err(&card->write.ccwdev->dev,
1566 "adapter exclusively used by another host\n", 1582 "The adapter is used exclusively by another "
1567 CARD_WDEV_ID(card)); 1583 "host\n");
1568 else 1584 else
1569 PRINT_ERR("IDX_ACTIVATE on write channel device %s: " 1585 QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on write channel:"
1570 "negative reply\n", CARD_WDEV_ID(card)); 1586 " negative reply\n",
1587 dev_name(&card->write.ccwdev->dev));
1571 goto out; 1588 goto out;
1572 } 1589 }
1573 memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2); 1590 memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2);
1574 if ((temp & ~0x0100) != qeth_peer_func_level(card->info.func_level)) { 1591 if ((temp & ~0x0100) != qeth_peer_func_level(card->info.func_level)) {
1575 PRINT_WARN("IDX_ACTIVATE on write channel device %s: " 1592 QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on write channel: "
1576 "function level mismatch " 1593 "function level mismatch (sent: 0x%x, received: "
1577 "(sent: 0x%x, received: 0x%x)\n", 1594 "0x%x)\n", dev_name(&card->write.ccwdev->dev),
1578 CARD_WDEV_ID(card), card->info.func_level, temp); 1595 card->info.func_level, temp);
1579 goto out; 1596 goto out;
1580 } 1597 }
1581 channel->state = CH_STATE_UP; 1598 channel->state = CH_STATE_UP;
@@ -1601,12 +1618,13 @@ static void qeth_idx_read_cb(struct qeth_channel *channel,
1601 1618
1602 if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) { 1619 if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) {
1603 if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19) 1620 if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19)
1604 PRINT_ERR("IDX_ACTIVATE on read channel device %s: " 1621 dev_err(&card->write.ccwdev->dev,
1605 "adapter exclusively used by another host\n", 1622 "The adapter is used exclusively by another "
1606 CARD_RDEV_ID(card)); 1623 "host\n");
1607 else 1624 else
1608 PRINT_ERR("IDX_ACTIVATE on read channel device %s: " 1625 QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on read channel:"
1609 "negative reply\n", CARD_RDEV_ID(card)); 1626 " negative reply\n",
1627 dev_name(&card->read.ccwdev->dev));
1610 goto out; 1628 goto out;
1611 } 1629 }
1612 1630
@@ -1620,9 +1638,10 @@ static void qeth_idx_read_cb(struct qeth_channel *channel,
1620 1638
1621 memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2); 1639 memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2);
1622 if (temp != qeth_peer_func_level(card->info.func_level)) { 1640 if (temp != qeth_peer_func_level(card->info.func_level)) {
1623 PRINT_WARN("IDX_ACTIVATE on read channel device %s: function " 1641 QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on read channel: function "
1624 "level mismatch (sent: 0x%x, received: 0x%x)\n", 1642 "level mismatch (sent: 0x%x, received: 0x%x)\n",
1625 CARD_RDEV_ID(card), card->info.func_level, temp); 1643 dev_name(&card->read.ccwdev->dev),
1644 card->info.func_level, temp);
1626 goto out; 1645 goto out;
1627 } 1646 }
1628 memcpy(&card->token.issuer_rm_r, 1647 memcpy(&card->token.issuer_rm_r,
@@ -1696,8 +1715,9 @@ int qeth_send_control_data(struct qeth_card *card, int len,
1696 (addr_t) iob, 0, 0); 1715 (addr_t) iob, 0, 0);
1697 spin_unlock_irqrestore(get_ccwdev_lock(card->write.ccwdev), flags); 1716 spin_unlock_irqrestore(get_ccwdev_lock(card->write.ccwdev), flags);
1698 if (rc) { 1717 if (rc) {
1699 PRINT_WARN("qeth_send_control_data: " 1718 QETH_DBF_MESSAGE(2, "%s qeth_send_control_data: "
1700 "ccw_device_start rc = %i\n", rc); 1719 "ccw_device_start rc = %i\n",
1720 dev_name(&card->write.ccwdev->dev), rc);
1701 QETH_DBF_TEXT_(TRACE, 2, " err%d", rc); 1721 QETH_DBF_TEXT_(TRACE, 2, " err%d", rc);
1702 spin_lock_irqsave(&card->lock, flags); 1722 spin_lock_irqsave(&card->lock, flags);
1703 list_del_init(&reply->list); 1723 list_del_init(&reply->list);
@@ -2180,11 +2200,8 @@ static void qeth_print_status_with_portname(struct qeth_card *card)
2180 dbf_text[i] = 2200 dbf_text[i] =
2181 (char) _ebcasc[(__u8) dbf_text[i]]; 2201 (char) _ebcasc[(__u8) dbf_text[i]];
2182 dbf_text[8] = 0; 2202 dbf_text[8] = 0;
2183 PRINT_INFO("Device %s/%s/%s is a%s card%s%s%s\n" 2203 dev_info(&card->gdev->dev, "Device is a%s card%s%s%s\n"
2184 "with link type %s (portname: %s)\n", 2204 "with link type %s (portname: %s)\n",
2185 CARD_RDEV_ID(card),
2186 CARD_WDEV_ID(card),
2187 CARD_DDEV_ID(card),
2188 qeth_get_cardname(card), 2205 qeth_get_cardname(card),
2189 (card->info.mcl_level[0]) ? " (level: " : "", 2206 (card->info.mcl_level[0]) ? " (level: " : "",
2190 (card->info.mcl_level[0]) ? card->info.mcl_level : "", 2207 (card->info.mcl_level[0]) ? card->info.mcl_level : "",
@@ -2197,23 +2214,17 @@ static void qeth_print_status_with_portname(struct qeth_card *card)
2197static void qeth_print_status_no_portname(struct qeth_card *card) 2214static void qeth_print_status_no_portname(struct qeth_card *card)
2198{ 2215{
2199 if (card->info.portname[0]) 2216 if (card->info.portname[0])
2200 PRINT_INFO("Device %s/%s/%s is a%s " 2217 dev_info(&card->gdev->dev, "Device is a%s "
2201 "card%s%s%s\nwith link type %s " 2218 "card%s%s%s\nwith link type %s "
2202 "(no portname needed by interface).\n", 2219 "(no portname needed by interface).\n",
2203 CARD_RDEV_ID(card),
2204 CARD_WDEV_ID(card),
2205 CARD_DDEV_ID(card),
2206 qeth_get_cardname(card), 2220 qeth_get_cardname(card),
2207 (card->info.mcl_level[0]) ? " (level: " : "", 2221 (card->info.mcl_level[0]) ? " (level: " : "",
2208 (card->info.mcl_level[0]) ? card->info.mcl_level : "", 2222 (card->info.mcl_level[0]) ? card->info.mcl_level : "",
2209 (card->info.mcl_level[0]) ? ")" : "", 2223 (card->info.mcl_level[0]) ? ")" : "",
2210 qeth_get_cardname_short(card)); 2224 qeth_get_cardname_short(card));
2211 else 2225 else
2212 PRINT_INFO("Device %s/%s/%s is a%s " 2226 dev_info(&card->gdev->dev, "Device is a%s "
2213 "card%s%s%s\nwith link type %s.\n", 2227 "card%s%s%s\nwith link type %s.\n",
2214 CARD_RDEV_ID(card),
2215 CARD_WDEV_ID(card),
2216 CARD_DDEV_ID(card),
2217 qeth_get_cardname(card), 2228 qeth_get_cardname(card),
2218 (card->info.mcl_level[0]) ? " (level: " : "", 2229 (card->info.mcl_level[0]) ? " (level: " : "",
2219 (card->info.mcl_level[0]) ? card->info.mcl_level : "", 2230 (card->info.mcl_level[0]) ? card->info.mcl_level : "",
@@ -2639,9 +2650,8 @@ void qeth_queue_input_buffer(struct qeth_card *card, int index)
2639 qeth_get_micros() - 2650 qeth_get_micros() -
2640 card->perf_stats.inbound_do_qdio_start_time; 2651 card->perf_stats.inbound_do_qdio_start_time;
2641 if (rc) { 2652 if (rc) {
2642 PRINT_WARN("qeth_queue_input_buffer's do_QDIO " 2653 dev_warn(&card->gdev->dev,
2643 "return %i (device %s).\n", 2654 "QDIO reported an error, rc=%i\n", rc);
2644 rc, CARD_DDEV_ID(card));
2645 QETH_DBF_TEXT(TRACE, 2, "qinberr"); 2655 QETH_DBF_TEXT(TRACE, 2, "qinberr");
2646 QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card)); 2656 QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card));
2647 } 2657 }
@@ -3776,7 +3786,8 @@ int qeth_core_hardsetup_card(struct qeth_card *card)
3776 atomic_set(&card->force_alloc_skb, 0); 3786 atomic_set(&card->force_alloc_skb, 0);
3777retry: 3787retry:
3778 if (retries < 3) { 3788 if (retries < 3) {
3779 PRINT_WARN("Retrying to do IDX activates.\n"); 3789 QETH_DBF_MESSAGE(2, "%s Retrying to do IDX activates.\n",
3790 dev_name(&card->gdev->dev));
3780 ccw_device_set_offline(CARD_DDEV(card)); 3791 ccw_device_set_offline(CARD_DDEV(card));
3781 ccw_device_set_offline(CARD_WDEV(card)); 3792 ccw_device_set_offline(CARD_WDEV(card));
3782 ccw_device_set_offline(CARD_RDEV(card)); 3793 ccw_device_set_offline(CARD_RDEV(card));
@@ -3851,7 +3862,10 @@ retry:
3851 } 3862 }
3852 return 0; 3863 return 0;
3853out: 3864out:
3854 PRINT_ERR("Initialization in hardsetup failed! rc=%d\n", rc); 3865 dev_warn(&card->gdev->dev, "The qeth device driver failed to recover "
3866 "an error on the device\n");
3867 QETH_DBF_MESSAGE(2, "%s Initialization in hardsetup failed! rc=%d\n",
3868 dev_name(&card->gdev->dev), rc);
3855 return rc; 3869 return rc;
3856} 3870}
3857EXPORT_SYMBOL_GPL(qeth_core_hardsetup_card); 3871EXPORT_SYMBOL_GPL(qeth_core_hardsetup_card);
@@ -4071,8 +4085,8 @@ int qeth_core_load_discipline(struct qeth_card *card,
4071 break; 4085 break;
4072 } 4086 }
4073 if (!card->discipline.ccwgdriver) { 4087 if (!card->discipline.ccwgdriver) {
4074 PRINT_ERR("Support for discipline %d not present\n", 4088 dev_err(&card->gdev->dev, "There is no kernel module to "
4075 discipline); 4089 "support discipline %d\n", discipline);
4076 rc = -EINVAL; 4090 rc = -EINVAL;
4077 } 4091 }
4078 return rc; 4092 return rc;
@@ -4465,7 +4479,7 @@ static int __init qeth_core_init(void)
4465{ 4479{
4466 int rc; 4480 int rc;
4467 4481
4468 PRINT_INFO("loading core functions\n"); 4482 pr_info("loading core functions\n");
4469 INIT_LIST_HEAD(&qeth_core_card_list.list); 4483 INIT_LIST_HEAD(&qeth_core_card_list.list);
4470 rwlock_init(&qeth_core_card_list.rwlock); 4484 rwlock_init(&qeth_core_card_list.rwlock);
4471 4485
@@ -4505,9 +4519,10 @@ driver_err:
4505ccwgroup_err: 4519ccwgroup_err:
4506 ccw_driver_unregister(&qeth_ccw_driver); 4520 ccw_driver_unregister(&qeth_ccw_driver);
4507ccw_err: 4521ccw_err:
4522 QETH_DBF_MESSAGE(2, "Initialization failed with code %d\n", rc);
4508 qeth_unregister_dbf_views(); 4523 qeth_unregister_dbf_views();
4509out_err: 4524out_err:
4510 PRINT_ERR("Initialization failed with code %d\n", rc); 4525 pr_err("Initializing the qeth device driver failed\n");
4511 return rc; 4526 return rc;
4512} 4527}
4513 4528
@@ -4520,7 +4535,7 @@ static void __exit qeth_core_exit(void)
4520 ccw_driver_unregister(&qeth_ccw_driver); 4535 ccw_driver_unregister(&qeth_ccw_driver);
4521 kmem_cache_destroy(qeth_core_header_cache); 4536 kmem_cache_destroy(qeth_core_header_cache);
4522 qeth_unregister_dbf_views(); 4537 qeth_unregister_dbf_views();
4523 PRINT_INFO("core functions removed\n"); 4538 pr_info("core functions removed\n");
4524} 4539}
4525 4540
4526module_init(qeth_core_init); 4541module_init(qeth_core_init);
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 1b1e80336d2c..af15bc648ba1 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -8,6 +8,9 @@
8 * Frank Blaschka <frank.blaschka@de.ibm.com> 8 * Frank Blaschka <frank.blaschka@de.ibm.com>
9 */ 9 */
10 10
11#define KMSG_COMPONENT "qeth"
12#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
13
11#include <linux/module.h> 14#include <linux/module.h>
12#include <linux/moduleparam.h> 15#include <linux/moduleparam.h>
13#include <linux/string.h> 16#include <linux/string.h>
@@ -503,12 +506,13 @@ static int qeth_l2_send_setmac_cb(struct qeth_card *card,
503 card->info.mac_bits |= QETH_LAYER2_MAC_REGISTERED; 506 card->info.mac_bits |= QETH_LAYER2_MAC_REGISTERED;
504 memcpy(card->dev->dev_addr, cmd->data.setdelmac.mac, 507 memcpy(card->dev->dev_addr, cmd->data.setdelmac.mac,
505 OSA_ADDR_LEN); 508 OSA_ADDR_LEN);
506 PRINT_INFO("MAC address %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x " 509 dev_info(&card->gdev->dev,
507 "successfully registered on device %s\n", 510 "MAC address %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x "
508 card->dev->dev_addr[0], card->dev->dev_addr[1], 511 "successfully registered on device %s\n",
509 card->dev->dev_addr[2], card->dev->dev_addr[3], 512 card->dev->dev_addr[0], card->dev->dev_addr[1],
510 card->dev->dev_addr[4], card->dev->dev_addr[5], 513 card->dev->dev_addr[2], card->dev->dev_addr[3],
511 card->dev->name); 514 card->dev->dev_addr[4], card->dev->dev_addr[5],
515 card->dev->name);
512 } 516 }
513 return 0; 517 return 0;
514} 518}
@@ -1015,9 +1019,8 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
1015 if (rc) { 1019 if (rc) {
1016 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); 1020 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
1017 if (rc == 0xe080) { 1021 if (rc == 0xe080) {
1018 PRINT_WARN("LAN on card %s if offline! " 1022 dev_warn(&card->gdev->dev,
1019 "Waiting for STARTLAN from card.\n", 1023 "The LAN is offline\n");
1020 CARD_BUS_ID(card));
1021 card->lan_online = 0; 1024 card->lan_online = 0;
1022 } 1025 }
1023 return rc; 1026 return rc;
@@ -1117,8 +1120,8 @@ static int qeth_l2_recover(void *ptr)
1117 if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD)) 1120 if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD))
1118 return 0; 1121 return 0;
1119 QETH_DBF_TEXT(TRACE, 2, "recover2"); 1122 QETH_DBF_TEXT(TRACE, 2, "recover2");
1120 PRINT_WARN("Recovery of device %s started ...\n", 1123 dev_warn(&card->gdev->dev,
1121 CARD_BUS_ID(card)); 1124 "A recovery process has been started for the device\n");
1122 card->use_hard_stop = 1; 1125 card->use_hard_stop = 1;
1123 __qeth_l2_set_offline(card->gdev, 1); 1126 __qeth_l2_set_offline(card->gdev, 1);
1124 rc = __qeth_l2_set_online(card->gdev, 1); 1127 rc = __qeth_l2_set_online(card->gdev, 1);
@@ -1126,27 +1129,27 @@ static int qeth_l2_recover(void *ptr)
1126 qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD); 1129 qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD);
1127 qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD); 1130 qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD);
1128 if (!rc) 1131 if (!rc)
1129 PRINT_INFO("Device %s successfully recovered!\n", 1132 dev_info(&card->gdev->dev,
1130 CARD_BUS_ID(card)); 1133 "Device successfully recovered!\n");
1131 else { 1134 else {
1132 rtnl_lock(); 1135 rtnl_lock();
1133 dev_close(card->dev); 1136 dev_close(card->dev);
1134 rtnl_unlock(); 1137 rtnl_unlock();
1135 PRINT_INFO("Device %s could not be recovered!\n", 1138 dev_warn(&card->gdev->dev, "The qeth device driver "
1136 CARD_BUS_ID(card)); 1139 "failed to recover an error on the device\n");
1137 } 1140 }
1138 return 0; 1141 return 0;
1139} 1142}
1140 1143
1141static int __init qeth_l2_init(void) 1144static int __init qeth_l2_init(void)
1142{ 1145{
1143 PRINT_INFO("register layer 2 discipline\n"); 1146 pr_info("register layer 2 discipline\n");
1144 return 0; 1147 return 0;
1145} 1148}
1146 1149
1147static void __exit qeth_l2_exit(void) 1150static void __exit qeth_l2_exit(void)
1148{ 1151{
1149 PRINT_INFO("unregister layer 2 discipline\n"); 1152 pr_info("unregister layer 2 discipline\n");
1150} 1153}
1151 1154
1152static void qeth_l2_shutdown(struct ccwgroup_device *gdev) 1155static void qeth_l2_shutdown(struct ccwgroup_device *gdev)
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index ed59fedd5922..c0b30b25a5f1 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -8,6 +8,9 @@
8 * Frank Blaschka <frank.blaschka@de.ibm.com> 8 * Frank Blaschka <frank.blaschka@de.ibm.com>
9 */ 9 */
10 10
11#define KMSG_COMPONENT "qeth"
12#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
13
11#include <linux/module.h> 14#include <linux/module.h>
12#include <linux/moduleparam.h> 15#include <linux/moduleparam.h>
13#include <linux/string.h> 16#include <linux/string.h>
@@ -917,8 +920,8 @@ static int qeth_l3_register_addr_entry(struct qeth_card *card,
917 if (rc) { 920 if (rc) {
918 QETH_DBF_TEXT(TRACE, 2, "FAILED"); 921 QETH_DBF_TEXT(TRACE, 2, "FAILED");
919 qeth_l3_ipaddr_to_string(addr->proto, (u8 *)&addr->u, buf); 922 qeth_l3_ipaddr_to_string(addr->proto, (u8 *)&addr->u, buf);
920 PRINT_WARN("Could not register IP address %s (rc=0x%x/%d)\n", 923 dev_warn(&card->gdev->dev,
921 buf, rc, rc); 924 "Registering IP address %s failed\n", buf);
922 } 925 }
923 return rc; 926 return rc;
924} 927}
@@ -1029,24 +1032,22 @@ static int qeth_l3_setadapter_parms(struct qeth_card *card)
1029 QETH_DBF_TEXT(SETUP, 2, "setadprm"); 1032 QETH_DBF_TEXT(SETUP, 2, "setadprm");
1030 1033
1031 if (!qeth_is_supported(card, IPA_SETADAPTERPARMS)) { 1034 if (!qeth_is_supported(card, IPA_SETADAPTERPARMS)) {
1032 PRINT_WARN("set adapter parameters not supported " 1035 dev_info(&card->gdev->dev,
1033 "on device %s.\n", 1036 "set adapter parameters not supported.\n");
1034 CARD_BUS_ID(card));
1035 QETH_DBF_TEXT(SETUP, 2, " notsupp"); 1037 QETH_DBF_TEXT(SETUP, 2, " notsupp");
1036 return 0; 1038 return 0;
1037 } 1039 }
1038 rc = qeth_query_setadapterparms(card); 1040 rc = qeth_query_setadapterparms(card);
1039 if (rc) { 1041 if (rc) {
1040 PRINT_WARN("couldn't set adapter parameters on device %s: " 1042 QETH_DBF_MESSAGE(2, "%s couldn't set adapter parameters: "
1041 "x%x\n", CARD_BUS_ID(card), rc); 1043 "0x%x\n", card->gdev->dev.bus_id, rc);
1042 return rc; 1044 return rc;
1043 } 1045 }
1044 if (qeth_adp_supported(card, IPA_SETADP_ALTER_MAC_ADDRESS)) { 1046 if (qeth_adp_supported(card, IPA_SETADP_ALTER_MAC_ADDRESS)) {
1045 rc = qeth_setadpparms_change_macaddr(card); 1047 rc = qeth_setadpparms_change_macaddr(card);
1046 if (rc) 1048 if (rc)
1047 PRINT_WARN("couldn't get MAC address on " 1049 dev_warn(&card->gdev->dev, "Reading the adapter MAC"
1048 "device %s: x%x\n", 1050 " address failed\n", rc);
1049 CARD_BUS_ID(card), rc);
1050 } 1051 }
1051 1052
1052 if ((card->info.link_type == QETH_LINK_TYPE_HSTR) || 1053 if ((card->info.link_type == QETH_LINK_TYPE_HSTR) ||
@@ -1160,16 +1161,17 @@ static int qeth_l3_start_ipa_arp_processing(struct qeth_card *card)
1160 QETH_DBF_TEXT(TRACE, 3, "ipaarp"); 1161 QETH_DBF_TEXT(TRACE, 3, "ipaarp");
1161 1162
1162 if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { 1163 if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) {
1163 PRINT_WARN("ARP processing not supported " 1164 dev_info(&card->gdev->dev,
1164 "on %s!\n", QETH_CARD_IFNAME(card)); 1165 "ARP processing not supported on %s!\n",
1166 QETH_CARD_IFNAME(card));
1165 return 0; 1167 return 0;
1166 } 1168 }
1167 rc = qeth_l3_send_simple_setassparms(card, IPA_ARP_PROCESSING, 1169 rc = qeth_l3_send_simple_setassparms(card, IPA_ARP_PROCESSING,
1168 IPA_CMD_ASS_START, 0); 1170 IPA_CMD_ASS_START, 0);
1169 if (rc) { 1171 if (rc) {
1170 PRINT_WARN("Could not start ARP processing " 1172 dev_warn(&card->gdev->dev,
1171 "assist on %s: 0x%x\n", 1173 "Starting ARP processing support for %s failed\n",
1172 QETH_CARD_IFNAME(card), rc); 1174 QETH_CARD_IFNAME(card));
1173 } 1175 }
1174 return rc; 1176 return rc;
1175} 1177}
@@ -1181,19 +1183,21 @@ static int qeth_l3_start_ipa_ip_fragmentation(struct qeth_card *card)
1181 QETH_DBF_TEXT(TRACE, 3, "ipaipfrg"); 1183 QETH_DBF_TEXT(TRACE, 3, "ipaipfrg");
1182 1184
1183 if (!qeth_is_supported(card, IPA_IP_FRAGMENTATION)) { 1185 if (!qeth_is_supported(card, IPA_IP_FRAGMENTATION)) {
1184 PRINT_INFO("Hardware IP fragmentation not supported on %s\n", 1186 dev_info(&card->gdev->dev,
1185 QETH_CARD_IFNAME(card)); 1187 "Hardware IP fragmentation not supported on %s\n",
1188 QETH_CARD_IFNAME(card));
1186 return -EOPNOTSUPP; 1189 return -EOPNOTSUPP;
1187 } 1190 }
1188 1191
1189 rc = qeth_l3_send_simple_setassparms(card, IPA_IP_FRAGMENTATION, 1192 rc = qeth_l3_send_simple_setassparms(card, IPA_IP_FRAGMENTATION,
1190 IPA_CMD_ASS_START, 0); 1193 IPA_CMD_ASS_START, 0);
1191 if (rc) { 1194 if (rc) {
1192 PRINT_WARN("Could not start Hardware IP fragmentation " 1195 dev_warn(&card->gdev->dev,
1193 "assist on %s: 0x%x\n", 1196 "Starting IP fragmentation support for %s failed\n",
1194 QETH_CARD_IFNAME(card), rc); 1197 QETH_CARD_IFNAME(card));
1195 } else 1198 } else
1196 PRINT_INFO("Hardware IP fragmentation enabled \n"); 1199 dev_info(&card->gdev->dev,
1200 "Hardware IP fragmentation enabled \n");
1197 return rc; 1201 return rc;
1198} 1202}
1199 1203
@@ -1207,17 +1211,18 @@ static int qeth_l3_start_ipa_source_mac(struct qeth_card *card)
1207 return -EOPNOTSUPP; 1211 return -EOPNOTSUPP;
1208 1212
1209 if (!qeth_is_supported(card, IPA_SOURCE_MAC)) { 1213 if (!qeth_is_supported(card, IPA_SOURCE_MAC)) {
1210 PRINT_INFO("Inbound source address not " 1214 dev_info(&card->gdev->dev,
1211 "supported on %s\n", QETH_CARD_IFNAME(card)); 1215 "Inbound source address not supported on %s\n",
1216 QETH_CARD_IFNAME(card));
1212 return -EOPNOTSUPP; 1217 return -EOPNOTSUPP;
1213 } 1218 }
1214 1219
1215 rc = qeth_l3_send_simple_setassparms(card, IPA_SOURCE_MAC, 1220 rc = qeth_l3_send_simple_setassparms(card, IPA_SOURCE_MAC,
1216 IPA_CMD_ASS_START, 0); 1221 IPA_CMD_ASS_START, 0);
1217 if (rc) 1222 if (rc)
1218 PRINT_WARN("Could not start inbound source " 1223 dev_warn(&card->gdev->dev,
1219 "assist on %s: 0x%x\n", 1224 "Starting proxy ARP support for %s failed\n",
1220 QETH_CARD_IFNAME(card), rc); 1225 QETH_CARD_IFNAME(card));
1221 return rc; 1226 return rc;
1222} 1227}
1223 1228
@@ -1228,19 +1233,19 @@ static int qeth_l3_start_ipa_vlan(struct qeth_card *card)
1228 QETH_DBF_TEXT(TRACE, 3, "strtvlan"); 1233 QETH_DBF_TEXT(TRACE, 3, "strtvlan");
1229 1234
1230 if (!qeth_is_supported(card, IPA_FULL_VLAN)) { 1235 if (!qeth_is_supported(card, IPA_FULL_VLAN)) {
1231 PRINT_WARN("VLAN not supported on %s\n", 1236 dev_info(&card->gdev->dev,
1232 QETH_CARD_IFNAME(card)); 1237 "VLAN not supported on %s\n", QETH_CARD_IFNAME(card));
1233 return -EOPNOTSUPP; 1238 return -EOPNOTSUPP;
1234 } 1239 }
1235 1240
1236 rc = qeth_l3_send_simple_setassparms(card, IPA_VLAN_PRIO, 1241 rc = qeth_l3_send_simple_setassparms(card, IPA_VLAN_PRIO,
1237 IPA_CMD_ASS_START, 0); 1242 IPA_CMD_ASS_START, 0);
1238 if (rc) { 1243 if (rc) {
1239 PRINT_WARN("Could not start vlan " 1244 dev_warn(&card->gdev->dev,
1240 "assist on %s: 0x%x\n", 1245 "Starting VLAN support for %s failed\n",
1241 QETH_CARD_IFNAME(card), rc); 1246 QETH_CARD_IFNAME(card));
1242 } else { 1247 } else {
1243 PRINT_INFO("VLAN enabled \n"); 1248 dev_info(&card->gdev->dev, "VLAN enabled\n");
1244 } 1249 }
1245 return rc; 1250 return rc;
1246} 1251}
@@ -1252,19 +1257,20 @@ static int qeth_l3_start_ipa_multicast(struct qeth_card *card)
1252 QETH_DBF_TEXT(TRACE, 3, "stmcast"); 1257 QETH_DBF_TEXT(TRACE, 3, "stmcast");
1253 1258
1254 if (!qeth_is_supported(card, IPA_MULTICASTING)) { 1259 if (!qeth_is_supported(card, IPA_MULTICASTING)) {
1255 PRINT_WARN("Multicast not supported on %s\n", 1260 dev_info(&card->gdev->dev,
1256 QETH_CARD_IFNAME(card)); 1261 "Multicast not supported on %s\n",
1262 QETH_CARD_IFNAME(card));
1257 return -EOPNOTSUPP; 1263 return -EOPNOTSUPP;
1258 } 1264 }
1259 1265
1260 rc = qeth_l3_send_simple_setassparms(card, IPA_MULTICASTING, 1266 rc = qeth_l3_send_simple_setassparms(card, IPA_MULTICASTING,
1261 IPA_CMD_ASS_START, 0); 1267 IPA_CMD_ASS_START, 0);
1262 if (rc) { 1268 if (rc) {
1263 PRINT_WARN("Could not start multicast " 1269 dev_warn(&card->gdev->dev,
1264 "assist on %s: rc=%i\n", 1270 "Starting multicast support for %s failed\n",
1265 QETH_CARD_IFNAME(card), rc); 1271 QETH_CARD_IFNAME(card));
1266 } else { 1272 } else {
1267 PRINT_INFO("Multicast enabled\n"); 1273 dev_info(&card->gdev->dev, "Multicast enabled\n");
1268 card->dev->flags |= IFF_MULTICAST; 1274 card->dev->flags |= IFF_MULTICAST;
1269 } 1275 }
1270 return rc; 1276 return rc;
@@ -1315,36 +1321,37 @@ static int qeth_l3_softsetup_ipv6(struct qeth_card *card)
1315 1321
1316 rc = qeth_l3_query_ipassists(card, QETH_PROT_IPV6); 1322 rc = qeth_l3_query_ipassists(card, QETH_PROT_IPV6);
1317 if (rc) { 1323 if (rc) {
1318 PRINT_ERR("IPv6 query ipassist failed on %s\n", 1324 dev_err(&card->gdev->dev,
1319 QETH_CARD_IFNAME(card)); 1325 "Activating IPv6 support for %s failed\n",
1326 QETH_CARD_IFNAME(card));
1320 return rc; 1327 return rc;
1321 } 1328 }
1322 rc = qeth_l3_send_simple_setassparms(card, IPA_IPV6, 1329 rc = qeth_l3_send_simple_setassparms(card, IPA_IPV6,
1323 IPA_CMD_ASS_START, 3); 1330 IPA_CMD_ASS_START, 3);
1324 if (rc) { 1331 if (rc) {
1325 PRINT_WARN("IPv6 start assist (version 4) failed " 1332 dev_err(&card->gdev->dev,
1326 "on %s: 0x%x\n", 1333 "Activating IPv6 support for %s failed\n",
1327 QETH_CARD_IFNAME(card), rc); 1334 QETH_CARD_IFNAME(card));
1328 return rc; 1335 return rc;
1329 } 1336 }
1330 rc = qeth_l3_send_simple_setassparms_ipv6(card, IPA_IPV6, 1337 rc = qeth_l3_send_simple_setassparms_ipv6(card, IPA_IPV6,
1331 IPA_CMD_ASS_START); 1338 IPA_CMD_ASS_START);
1332 if (rc) { 1339 if (rc) {
1333 PRINT_WARN("IPV6 start assist (version 6) failed " 1340 dev_err(&card->gdev->dev,
1334 "on %s: 0x%x\n", 1341 "Activating IPv6 support for %s failed\n",
1335 QETH_CARD_IFNAME(card), rc); 1342 QETH_CARD_IFNAME(card));
1336 return rc; 1343 return rc;
1337 } 1344 }
1338 rc = qeth_l3_send_simple_setassparms_ipv6(card, IPA_PASSTHRU, 1345 rc = qeth_l3_send_simple_setassparms_ipv6(card, IPA_PASSTHRU,
1339 IPA_CMD_ASS_START); 1346 IPA_CMD_ASS_START);
1340 if (rc) { 1347 if (rc) {
1341 PRINT_WARN("Could not enable passthrough " 1348 dev_warn(&card->gdev->dev,
1342 "on %s: 0x%x\n", 1349 "Enabling the passthrough mode for %s failed\n",
1343 QETH_CARD_IFNAME(card), rc); 1350 QETH_CARD_IFNAME(card));
1344 return rc; 1351 return rc;
1345 } 1352 }
1346out: 1353out:
1347 PRINT_INFO("IPV6 enabled \n"); 1354 dev_info(&card->gdev->dev, "IPV6 enabled\n");
1348 return 0; 1355 return 0;
1349} 1356}
1350#endif 1357#endif
@@ -1356,8 +1363,8 @@ static int qeth_l3_start_ipa_ipv6(struct qeth_card *card)
1356 QETH_DBF_TEXT(TRACE, 3, "strtipv6"); 1363 QETH_DBF_TEXT(TRACE, 3, "strtipv6");
1357 1364
1358 if (!qeth_is_supported(card, IPA_IPV6)) { 1365 if (!qeth_is_supported(card, IPA_IPV6)) {
1359 PRINT_WARN("IPv6 not supported on %s\n", 1366 dev_info(&card->gdev->dev,
1360 QETH_CARD_IFNAME(card)); 1367 "IPv6 not supported on %s\n", QETH_CARD_IFNAME(card));
1361 return 0; 1368 return 0;
1362 } 1369 }
1363#ifdef CONFIG_QETH_IPV6 1370#ifdef CONFIG_QETH_IPV6
@@ -1373,34 +1380,35 @@ static int qeth_l3_start_ipa_broadcast(struct qeth_card *card)
1373 QETH_DBF_TEXT(TRACE, 3, "stbrdcst"); 1380 QETH_DBF_TEXT(TRACE, 3, "stbrdcst");
1374 card->info.broadcast_capable = 0; 1381 card->info.broadcast_capable = 0;
1375 if (!qeth_is_supported(card, IPA_FILTERING)) { 1382 if (!qeth_is_supported(card, IPA_FILTERING)) {
1376 PRINT_WARN("Broadcast not supported on %s\n", 1383 dev_info(&card->gdev->dev,
1377 QETH_CARD_IFNAME(card)); 1384 "Broadcast not supported on %s\n",
1385 QETH_CARD_IFNAME(card));
1378 rc = -EOPNOTSUPP; 1386 rc = -EOPNOTSUPP;
1379 goto out; 1387 goto out;
1380 } 1388 }
1381 rc = qeth_l3_send_simple_setassparms(card, IPA_FILTERING, 1389 rc = qeth_l3_send_simple_setassparms(card, IPA_FILTERING,
1382 IPA_CMD_ASS_START, 0); 1390 IPA_CMD_ASS_START, 0);
1383 if (rc) { 1391 if (rc) {
1384 PRINT_WARN("Could not enable broadcasting filtering " 1392 dev_warn(&card->gdev->dev, "Enabling broadcast filtering for "
1385 "on %s: 0x%x\n", 1393 "%s failed\n", QETH_CARD_IFNAME(card));
1386 QETH_CARD_IFNAME(card), rc);
1387 goto out; 1394 goto out;
1388 } 1395 }
1389 1396
1390 rc = qeth_l3_send_simple_setassparms(card, IPA_FILTERING, 1397 rc = qeth_l3_send_simple_setassparms(card, IPA_FILTERING,
1391 IPA_CMD_ASS_CONFIGURE, 1); 1398 IPA_CMD_ASS_CONFIGURE, 1);
1392 if (rc) { 1399 if (rc) {
1393 PRINT_WARN("Could not set up broadcast filtering on %s: 0x%x\n", 1400 dev_warn(&card->gdev->dev,
1394 QETH_CARD_IFNAME(card), rc); 1401 "Setting up broadcast filtering for %s failed\n",
1402 QETH_CARD_IFNAME(card));
1395 goto out; 1403 goto out;
1396 } 1404 }
1397 card->info.broadcast_capable = QETH_BROADCAST_WITH_ECHO; 1405 card->info.broadcast_capable = QETH_BROADCAST_WITH_ECHO;
1398 PRINT_INFO("Broadcast enabled \n"); 1406 dev_info(&card->gdev->dev, "Broadcast enabled\n");
1399 rc = qeth_l3_send_simple_setassparms(card, IPA_FILTERING, 1407 rc = qeth_l3_send_simple_setassparms(card, IPA_FILTERING,
1400 IPA_CMD_ASS_ENABLE, 1); 1408 IPA_CMD_ASS_ENABLE, 1);
1401 if (rc) { 1409 if (rc) {
1402 PRINT_WARN("Could not set up broadcast echo filtering on " 1410 dev_warn(&card->gdev->dev, "Setting up broadcast echo "
1403 "%s: 0x%x\n", QETH_CARD_IFNAME(card), rc); 1411 "filtering for %s failed\n", QETH_CARD_IFNAME(card));
1404 goto out; 1412 goto out;
1405 } 1413 }
1406 card->info.broadcast_capable = QETH_BROADCAST_WITHOUT_ECHO; 1414 card->info.broadcast_capable = QETH_BROADCAST_WITHOUT_ECHO;
@@ -1419,18 +1427,18 @@ static int qeth_l3_send_checksum_command(struct qeth_card *card)
1419 rc = qeth_l3_send_simple_setassparms(card, IPA_INBOUND_CHECKSUM, 1427 rc = qeth_l3_send_simple_setassparms(card, IPA_INBOUND_CHECKSUM,
1420 IPA_CMD_ASS_START, 0); 1428 IPA_CMD_ASS_START, 0);
1421 if (rc) { 1429 if (rc) {
1422 PRINT_WARN("Starting Inbound HW Checksumming failed on %s: " 1430 dev_warn(&card->gdev->dev, "Starting HW checksumming for %s "
1423 "0x%x,\ncontinuing using Inbound SW Checksumming\n", 1431 "failed, using SW checksumming\n",
1424 QETH_CARD_IFNAME(card), rc); 1432 QETH_CARD_IFNAME(card));
1425 return rc; 1433 return rc;
1426 } 1434 }
1427 rc = qeth_l3_send_simple_setassparms(card, IPA_INBOUND_CHECKSUM, 1435 rc = qeth_l3_send_simple_setassparms(card, IPA_INBOUND_CHECKSUM,
1428 IPA_CMD_ASS_ENABLE, 1436 IPA_CMD_ASS_ENABLE,
1429 card->info.csum_mask); 1437 card->info.csum_mask);
1430 if (rc) { 1438 if (rc) {
1431 PRINT_WARN("Enabling Inbound HW Checksumming failed on %s: " 1439 dev_warn(&card->gdev->dev, "Enabling HW checksumming for %s "
1432 "0x%x,\ncontinuing using Inbound SW Checksumming\n", 1440 "failed, using SW checksumming\n",
1433 QETH_CARD_IFNAME(card), rc); 1441 QETH_CARD_IFNAME(card));
1434 return rc; 1442 return rc;
1435 } 1443 }
1436 return 0; 1444 return 0;
@@ -1443,26 +1451,30 @@ static int qeth_l3_start_ipa_checksum(struct qeth_card *card)
1443 QETH_DBF_TEXT(TRACE, 3, "strtcsum"); 1451 QETH_DBF_TEXT(TRACE, 3, "strtcsum");
1444 1452
1445 if (card->options.checksum_type == NO_CHECKSUMMING) { 1453 if (card->options.checksum_type == NO_CHECKSUMMING) {
1446 PRINT_WARN("Using no checksumming on %s.\n", 1454 dev_info(&card->gdev->dev,
1447 QETH_CARD_IFNAME(card)); 1455 "Using no checksumming on %s.\n",
1456 QETH_CARD_IFNAME(card));
1448 return 0; 1457 return 0;
1449 } 1458 }
1450 if (card->options.checksum_type == SW_CHECKSUMMING) { 1459 if (card->options.checksum_type == SW_CHECKSUMMING) {
1451 PRINT_WARN("Using SW checksumming on %s.\n", 1460 dev_info(&card->gdev->dev,
1452 QETH_CARD_IFNAME(card)); 1461 "Using SW checksumming on %s.\n",
1462 QETH_CARD_IFNAME(card));
1453 return 0; 1463 return 0;
1454 } 1464 }
1455 if (!qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) { 1465 if (!qeth_is_supported(card, IPA_INBOUND_CHECKSUM)) {
1456 PRINT_WARN("Inbound HW Checksumming not " 1466 dev_info(&card->gdev->dev,
1457 "supported on %s,\ncontinuing " 1467 "Inbound HW Checksumming not "
1458 "using Inbound SW Checksumming\n", 1468 "supported on %s,\ncontinuing "
1459 QETH_CARD_IFNAME(card)); 1469 "using Inbound SW Checksumming\n",
1470 QETH_CARD_IFNAME(card));
1460 card->options.checksum_type = SW_CHECKSUMMING; 1471 card->options.checksum_type = SW_CHECKSUMMING;
1461 return 0; 1472 return 0;
1462 } 1473 }
1463 rc = qeth_l3_send_checksum_command(card); 1474 rc = qeth_l3_send_checksum_command(card);
1464 if (!rc) 1475 if (!rc)
1465 PRINT_INFO("HW Checksumming (inbound) enabled \n"); 1476 dev_info(&card->gdev->dev,
1477 "HW Checksumming (inbound) enabled\n");
1466 1478
1467 return rc; 1479 return rc;
1468} 1480}
@@ -1474,18 +1486,20 @@ static int qeth_l3_start_ipa_tso(struct qeth_card *card)
1474 QETH_DBF_TEXT(TRACE, 3, "sttso"); 1486 QETH_DBF_TEXT(TRACE, 3, "sttso");
1475 1487
1476 if (!qeth_is_supported(card, IPA_OUTBOUND_TSO)) { 1488 if (!qeth_is_supported(card, IPA_OUTBOUND_TSO)) {
1477 PRINT_WARN("Outbound TSO not supported on %s\n", 1489 dev_info(&card->gdev->dev,
1478 QETH_CARD_IFNAME(card)); 1490 "Outbound TSO not supported on %s\n",
1491 QETH_CARD_IFNAME(card));
1479 rc = -EOPNOTSUPP; 1492 rc = -EOPNOTSUPP;
1480 } else { 1493 } else {
1481 rc = qeth_l3_send_simple_setassparms(card, IPA_OUTBOUND_TSO, 1494 rc = qeth_l3_send_simple_setassparms(card, IPA_OUTBOUND_TSO,
1482 IPA_CMD_ASS_START, 0); 1495 IPA_CMD_ASS_START, 0);
1483 if (rc) 1496 if (rc)
1484 PRINT_WARN("Could not start outbound TSO " 1497 dev_warn(&card->gdev->dev, "Starting outbound TCP "
1485 "assist on %s: rc=%i\n", 1498 "segmentation offload for %s failed\n",
1486 QETH_CARD_IFNAME(card), rc); 1499 QETH_CARD_IFNAME(card));
1487 else 1500 else
1488 PRINT_INFO("Outbound TSO enabled\n"); 1501 dev_info(&card->gdev->dev,
1502 "Outbound TSO enabled\n");
1489 } 1503 }
1490 if (rc && (card->options.large_send == QETH_LARGE_SEND_TSO)) { 1504 if (rc && (card->options.large_send == QETH_LARGE_SEND_TSO)) {
1491 card->options.large_send = QETH_LARGE_SEND_NO; 1505 card->options.large_send = QETH_LARGE_SEND_NO;
@@ -1578,12 +1592,8 @@ static int qeth_l3_get_unique_id_cb(struct qeth_card *card,
1578 else { 1592 else {
1579 card->info.unique_id = UNIQUE_ID_IF_CREATE_ADDR_FAILED | 1593 card->info.unique_id = UNIQUE_ID_IF_CREATE_ADDR_FAILED |
1580 UNIQUE_ID_NOT_BY_CARD; 1594 UNIQUE_ID_NOT_BY_CARD;
1581 PRINT_WARN("couldn't get a unique id from the card on device " 1595 dev_warn(&card->gdev->dev, "The network adapter failed to "
1582 "%s (result=x%x), using default id. ipv6 " 1596 "generate a unique ID\n");
1583 "autoconfig on other lpars may lead to duplicate "
1584 "ip addresses. please use manually "
1585 "configured ones.\n",
1586 CARD_BUS_ID(card), cmd->hdr.return_code);
1587 } 1597 }
1588 return 0; 1598 return 0;
1589} 1599}
@@ -3086,9 +3096,8 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
3086 if (rc) { 3096 if (rc) {
3087 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); 3097 QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
3088 if (rc == 0xe080) { 3098 if (rc == 0xe080) {
3089 PRINT_WARN("LAN on card %s if offline! " 3099 dev_warn(&card->gdev->dev,
3090 "Waiting for STARTLAN from card.\n", 3100 "The LAN is offline\n");
3091 CARD_BUS_ID(card));
3092 card->lan_online = 0; 3101 card->lan_online = 0;
3093 } 3102 }
3094 return rc; 3103 return rc;
@@ -3194,8 +3203,8 @@ static int qeth_l3_recover(void *ptr)
3194 if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD)) 3203 if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD))
3195 return 0; 3204 return 0;
3196 QETH_DBF_TEXT(TRACE, 2, "recover2"); 3205 QETH_DBF_TEXT(TRACE, 2, "recover2");
3197 PRINT_WARN("Recovery of device %s started ...\n", 3206 dev_warn(&card->gdev->dev,
3198 CARD_BUS_ID(card)); 3207 "A recovery process has been started for the device\n");
3199 card->use_hard_stop = 1; 3208 card->use_hard_stop = 1;
3200 __qeth_l3_set_offline(card->gdev, 1); 3209 __qeth_l3_set_offline(card->gdev, 1);
3201 rc = __qeth_l3_set_online(card->gdev, 1); 3210 rc = __qeth_l3_set_online(card->gdev, 1);
@@ -3203,14 +3212,14 @@ static int qeth_l3_recover(void *ptr)
3203 qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD); 3212 qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD);
3204 qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD); 3213 qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD);
3205 if (!rc) 3214 if (!rc)
3206 PRINT_INFO("Device %s successfully recovered!\n", 3215 dev_info(&card->gdev->dev,
3207 CARD_BUS_ID(card)); 3216 "Device successfully recovered!\n");
3208 else { 3217 else {
3209 rtnl_lock(); 3218 rtnl_lock();
3210 dev_close(card->dev); 3219 dev_close(card->dev);
3211 rtnl_unlock(); 3220 rtnl_unlock();
3212 PRINT_INFO("Device %s could not be recovered!\n", 3221 dev_warn(&card->gdev->dev, "The qeth device driver "
3213 CARD_BUS_ID(card)); 3222 "failed to recover an error on the device\n");
3214 } 3223 }
3215 return 0; 3224 return 0;
3216} 3225}
@@ -3344,7 +3353,7 @@ static int qeth_l3_register_notifiers(void)
3344 return rc; 3353 return rc;
3345 } 3354 }
3346#else 3355#else
3347 PRINT_WARN("layer 3 discipline no IPv6 support\n"); 3356 pr_warning("There is no IPv6 support for the layer 3 discipline\n");
3348#endif 3357#endif
3349 return 0; 3358 return 0;
3350} 3359}
@@ -3363,7 +3372,7 @@ static int __init qeth_l3_init(void)
3363{ 3372{
3364 int rc = 0; 3373 int rc = 0;
3365 3374
3366 PRINT_INFO("register layer 3 discipline\n"); 3375 pr_info("register layer 3 discipline\n");
3367 rc = qeth_l3_register_notifiers(); 3376 rc = qeth_l3_register_notifiers();
3368 return rc; 3377 return rc;
3369} 3378}
@@ -3371,7 +3380,7 @@ static int __init qeth_l3_init(void)
3371static void __exit qeth_l3_exit(void) 3380static void __exit qeth_l3_exit(void)
3372{ 3381{
3373 qeth_l3_unregister_notifiers(); 3382 qeth_l3_unregister_notifiers();
3374 PRINT_INFO("unregister layer 3 discipline\n"); 3383 pr_info("unregister layer 3 discipline\n");
3375} 3384}
3376 3385
3377module_init(qeth_l3_init); 3386module_init(qeth_l3_init);