Commit 74eacdb9 authored by Frank Blaschka's avatar Frank Blaschka Committed by Martin Schwidefsky

[S390] convert qeth printks to dev_xxx and pr_xxx macros.

Signed-off-by: default avatarFrank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent b3ff088b
...@@ -35,8 +35,6 @@ ...@@ -35,8 +35,6 @@
#include "qeth_core_mpc.h" #include "qeth_core_mpc.h"
#define KMSG_COMPONENT "qeth"
/** /**
* Debug Facility stuff * Debug Facility stuff
*/ */
...@@ -75,11 +73,6 @@ struct qeth_dbf_info { ...@@ -75,11 +73,6 @@ struct qeth_dbf_info {
#define QETH_DBF_TEXT_(name, level, text...) \ #define QETH_DBF_TEXT_(name, level, text...) \
qeth_dbf_longtext(QETH_DBF_##name, level, text) qeth_dbf_longtext(QETH_DBF_##name, level, text)
/**
* some more debug stuff
*/
#define PRINTK_HEADER "qeth: "
#define SENSE_COMMAND_REJECT_BYTE 0 #define SENSE_COMMAND_REJECT_BYTE 0
#define SENSE_COMMAND_REJECT_FLAG 0x80 #define SENSE_COMMAND_REJECT_FLAG 0x80
#define SENSE_RESETTING_EVENT_BYTE 1 #define SENSE_RESETTING_EVENT_BYTE 1
......
This diff is collapsed.
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
* Frank Blaschka <frank.blaschka@de.ibm.com> * Frank Blaschka <frank.blaschka@de.ibm.com>
*/ */
#define KMSG_COMPONENT "qeth"
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/string.h> #include <linux/string.h>
...@@ -503,7 +506,8 @@ static int qeth_l2_send_setmac_cb(struct qeth_card *card, ...@@ -503,7 +506,8 @@ static int qeth_l2_send_setmac_cb(struct qeth_card *card,
card->info.mac_bits |= QETH_LAYER2_MAC_REGISTERED; card->info.mac_bits |= QETH_LAYER2_MAC_REGISTERED;
memcpy(card->dev->dev_addr, cmd->data.setdelmac.mac, memcpy(card->dev->dev_addr, cmd->data.setdelmac.mac,
OSA_ADDR_LEN); OSA_ADDR_LEN);
PRINT_INFO("MAC address %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x " dev_info(&card->gdev->dev,
"MAC address %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x "
"successfully registered on device %s\n", "successfully registered on device %s\n",
card->dev->dev_addr[0], card->dev->dev_addr[1], card->dev->dev_addr[0], card->dev->dev_addr[1],
card->dev->dev_addr[2], card->dev->dev_addr[3], card->dev->dev_addr[2], card->dev->dev_addr[3],
...@@ -1015,9 +1019,8 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode) ...@@ -1015,9 +1019,8 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
if (rc) { if (rc) {
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
if (rc == 0xe080) { if (rc == 0xe080) {
PRINT_WARN("LAN on card %s if offline! " dev_warn(&card->gdev->dev,
"Waiting for STARTLAN from card.\n", "The LAN is offline\n");
CARD_BUS_ID(card));
card->lan_online = 0; card->lan_online = 0;
} }
return rc; return rc;
...@@ -1117,8 +1120,8 @@ static int qeth_l2_recover(void *ptr) ...@@ -1117,8 +1120,8 @@ static int qeth_l2_recover(void *ptr)
if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD)) if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD))
return 0; return 0;
QETH_DBF_TEXT(TRACE, 2, "recover2"); QETH_DBF_TEXT(TRACE, 2, "recover2");
PRINT_WARN("Recovery of device %s started ...\n", dev_warn(&card->gdev->dev,
CARD_BUS_ID(card)); "A recovery process has been started for the device\n");
card->use_hard_stop = 1; card->use_hard_stop = 1;
__qeth_l2_set_offline(card->gdev, 1); __qeth_l2_set_offline(card->gdev, 1);
rc = __qeth_l2_set_online(card->gdev, 1); rc = __qeth_l2_set_online(card->gdev, 1);
...@@ -1126,27 +1129,27 @@ static int qeth_l2_recover(void *ptr) ...@@ -1126,27 +1129,27 @@ static int qeth_l2_recover(void *ptr)
qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD); qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD);
qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD); qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD);
if (!rc) if (!rc)
PRINT_INFO("Device %s successfully recovered!\n", dev_info(&card->gdev->dev,
CARD_BUS_ID(card)); "Device successfully recovered!\n");
else { else {
rtnl_lock(); rtnl_lock();
dev_close(card->dev); dev_close(card->dev);
rtnl_unlock(); rtnl_unlock();
PRINT_INFO("Device %s could not be recovered!\n", dev_warn(&card->gdev->dev, "The qeth device driver "
CARD_BUS_ID(card)); "failed to recover an error on the device\n");
} }
return 0; return 0;
} }
static int __init qeth_l2_init(void) static int __init qeth_l2_init(void)
{ {
PRINT_INFO("register layer 2 discipline\n"); pr_info("register layer 2 discipline\n");
return 0; return 0;
} }
static void __exit qeth_l2_exit(void) static void __exit qeth_l2_exit(void)
{ {
PRINT_INFO("unregister layer 2 discipline\n"); pr_info("unregister layer 2 discipline\n");
} }
static void qeth_l2_shutdown(struct ccwgroup_device *gdev) static void qeth_l2_shutdown(struct ccwgroup_device *gdev)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment