diff options
author | Joe Perches <joe@perches.com> | 2010-02-09 06:49:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-12 16:27:46 -0500 |
commit | ae9540f75d5a69e7604cc5391cc0726b3aa82ff6 (patch) | |
tree | 434a87a571115a0f9470feaf6346333fb36e88b7 /drivers/net/qlge/qlge_ethtool.c | |
parent | f8502ce4f986a8fd486302980285b5e786b8dabe (diff) |
drivers/net/qlge: Use netif_printk helpers
Convert QPRINTK macros to netif_<level> equivalents.
Expands and standardizes the logging message output.
Removes __func__ from most logging messages.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge/qlge_ethtool.c')
-rw-r--r-- | drivers/net/qlge/qlge_ethtool.c | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/drivers/net/qlge/qlge_ethtool.c b/drivers/net/qlge/qlge_ethtool.c index 058fa0a48c6f..4f26afeb0f38 100644 --- a/drivers/net/qlge/qlge_ethtool.c +++ b/drivers/net/qlge/qlge_ethtool.c | |||
@@ -67,8 +67,8 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev) | |||
67 | status = ql_write_cfg(qdev, cqicb, sizeof(*cqicb), | 67 | status = ql_write_cfg(qdev, cqicb, sizeof(*cqicb), |
68 | CFG_LCQ, rx_ring->cq_id); | 68 | CFG_LCQ, rx_ring->cq_id); |
69 | if (status) { | 69 | if (status) { |
70 | QPRINTK(qdev, IFUP, ERR, | 70 | netif_err(qdev, ifup, qdev->ndev, |
71 | "Failed to load CQICB.\n"); | 71 | "Failed to load CQICB.\n"); |
72 | goto exit; | 72 | goto exit; |
73 | } | 73 | } |
74 | } | 74 | } |
@@ -89,8 +89,8 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev) | |||
89 | status = ql_write_cfg(qdev, cqicb, sizeof(*cqicb), | 89 | status = ql_write_cfg(qdev, cqicb, sizeof(*cqicb), |
90 | CFG_LCQ, rx_ring->cq_id); | 90 | CFG_LCQ, rx_ring->cq_id); |
91 | if (status) { | 91 | if (status) { |
92 | QPRINTK(qdev, IFUP, ERR, | 92 | netif_err(qdev, ifup, qdev->ndev, |
93 | "Failed to load CQICB.\n"); | 93 | "Failed to load CQICB.\n"); |
94 | goto exit; | 94 | goto exit; |
95 | } | 95 | } |
96 | } | 96 | } |
@@ -107,8 +107,8 @@ static void ql_update_stats(struct ql_adapter *qdev) | |||
107 | 107 | ||
108 | spin_lock(&qdev->stats_lock); | 108 | spin_lock(&qdev->stats_lock); |
109 | if (ql_sem_spinlock(qdev, qdev->xg_sem_mask)) { | 109 | if (ql_sem_spinlock(qdev, qdev->xg_sem_mask)) { |
110 | QPRINTK(qdev, DRV, ERR, | 110 | netif_err(qdev, drv, qdev->ndev, |
111 | "Couldn't get xgmac sem.\n"); | 111 | "Couldn't get xgmac sem.\n"); |
112 | goto quit; | 112 | goto quit; |
113 | } | 113 | } |
114 | /* | 114 | /* |
@@ -116,8 +116,9 @@ static void ql_update_stats(struct ql_adapter *qdev) | |||
116 | */ | 116 | */ |
117 | for (i = 0x200; i < 0x280; i += 8) { | 117 | for (i = 0x200; i < 0x280; i += 8) { |
118 | if (ql_read_xgmac_reg64(qdev, i, &data)) { | 118 | if (ql_read_xgmac_reg64(qdev, i, &data)) { |
119 | QPRINTK(qdev, DRV, ERR, | 119 | netif_err(qdev, drv, qdev->ndev, |
120 | "Error reading status register 0x%.04x.\n", i); | 120 | "Error reading status register 0x%.04x.\n", |
121 | i); | ||
121 | goto end; | 122 | goto end; |
122 | } else | 123 | } else |
123 | *iter = data; | 124 | *iter = data; |
@@ -129,8 +130,9 @@ static void ql_update_stats(struct ql_adapter *qdev) | |||
129 | */ | 130 | */ |
130 | for (i = 0x300; i < 0x3d0; i += 8) { | 131 | for (i = 0x300; i < 0x3d0; i += 8) { |
131 | if (ql_read_xgmac_reg64(qdev, i, &data)) { | 132 | if (ql_read_xgmac_reg64(qdev, i, &data)) { |
132 | QPRINTK(qdev, DRV, ERR, | 133 | netif_err(qdev, drv, qdev->ndev, |
133 | "Error reading status register 0x%.04x.\n", i); | 134 | "Error reading status register 0x%.04x.\n", |
135 | i); | ||
134 | goto end; | 136 | goto end; |
135 | } else | 137 | } else |
136 | *iter = data; | 138 | *iter = data; |
@@ -142,8 +144,9 @@ static void ql_update_stats(struct ql_adapter *qdev) | |||
142 | */ | 144 | */ |
143 | for (i = 0x500; i < 0x540; i += 8) { | 145 | for (i = 0x500; i < 0x540; i += 8) { |
144 | if (ql_read_xgmac_reg64(qdev, i, &data)) { | 146 | if (ql_read_xgmac_reg64(qdev, i, &data)) { |
145 | QPRINTK(qdev, DRV, ERR, | 147 | netif_err(qdev, drv, qdev->ndev, |
146 | "Error reading status register 0x%.04x.\n", i); | 148 | "Error reading status register 0x%.04x.\n", |
149 | i); | ||
147 | goto end; | 150 | goto end; |
148 | } else | 151 | } else |
149 | *iter = data; | 152 | *iter = data; |
@@ -155,8 +158,9 @@ static void ql_update_stats(struct ql_adapter *qdev) | |||
155 | */ | 158 | */ |
156 | for (i = 0x568; i < 0x5a8; i += 8) { | 159 | for (i = 0x568; i < 0x5a8; i += 8) { |
157 | if (ql_read_xgmac_reg64(qdev, i, &data)) { | 160 | if (ql_read_xgmac_reg64(qdev, i, &data)) { |
158 | QPRINTK(qdev, DRV, ERR, | 161 | netif_err(qdev, drv, qdev->ndev, |
159 | "Error reading status register 0x%.04x.\n", i); | 162 | "Error reading status register 0x%.04x.\n", |
163 | i); | ||
160 | goto end; | 164 | goto end; |
161 | } else | 165 | } else |
162 | *iter = data; | 166 | *iter = data; |
@@ -167,8 +171,8 @@ static void ql_update_stats(struct ql_adapter *qdev) | |||
167 | * Get RX NIC FIFO DROP statistics. | 171 | * Get RX NIC FIFO DROP statistics. |
168 | */ | 172 | */ |
169 | if (ql_read_xgmac_reg64(qdev, 0x5b8, &data)) { | 173 | if (ql_read_xgmac_reg64(qdev, 0x5b8, &data)) { |
170 | QPRINTK(qdev, DRV, ERR, | 174 | netif_err(qdev, drv, qdev->ndev, |
171 | "Error reading status register 0x%.04x.\n", i); | 175 | "Error reading status register 0x%.04x.\n", i); |
172 | goto end; | 176 | goto end; |
173 | } else | 177 | } else |
174 | *iter = data; | 178 | *iter = data; |
@@ -396,14 +400,13 @@ static int ql_set_wol(struct net_device *ndev, struct ethtool_wolinfo *wol) | |||
396 | return -EINVAL; | 400 | return -EINVAL; |
397 | qdev->wol = wol->wolopts; | 401 | qdev->wol = wol->wolopts; |
398 | 402 | ||
399 | QPRINTK(qdev, DRV, INFO, "Set wol option 0x%x on %s\n", | 403 | netif_info(qdev, drv, qdev->ndev, "Set wol option 0x%x\n", qdev->wol); |
400 | qdev->wol, ndev->name); | ||
401 | if (!qdev->wol) { | 404 | if (!qdev->wol) { |
402 | u32 wol = 0; | 405 | u32 wol = 0; |
403 | status = ql_mb_wol_mode(qdev, wol); | 406 | status = ql_mb_wol_mode(qdev, wol); |
404 | QPRINTK(qdev, DRV, ERR, "WOL %s (wol code 0x%x) on %s\n", | 407 | netif_err(qdev, drv, qdev->ndev, "WOL %s (wol code 0x%x)\n", |
405 | (status == 0) ? "cleared sucessfully" : "clear failed", | 408 | status == 0 ? "cleared sucessfully" : "clear failed", |
406 | wol, qdev->ndev->name); | 409 | wol); |
407 | } | 410 | } |
408 | 411 | ||
409 | return 0; | 412 | return 0; |
@@ -534,8 +537,8 @@ static void ql_self_test(struct net_device *ndev, | |||
534 | } | 537 | } |
535 | clear_bit(QL_SELFTEST, &qdev->flags); | 538 | clear_bit(QL_SELFTEST, &qdev->flags); |
536 | } else { | 539 | } else { |
537 | QPRINTK(qdev, DRV, ERR, | 540 | netif_err(qdev, drv, qdev->ndev, |
538 | "%s: is down, Loopback test will fail.\n", ndev->name); | 541 | "is down, Loopback test will fail.\n"); |
539 | eth_test->flags |= ETH_TEST_FL_FAILED; | 542 | eth_test->flags |= ETH_TEST_FL_FAILED; |
540 | } | 543 | } |
541 | } | 544 | } |