aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-06-26 15:01:34 -0400
committerDavid S. Miller <davem@davemloft.net>2011-06-27 03:09:47 -0400
commitc75bb2c6f0cf455c23e60f14d780e841dd47f801 (patch)
treec416c251a79ee27ecf2f33ba450a0f3936536d04
parente8c122f450d0b83d7a15535ba49e55ad21a9e63f (diff)
ixp4xx_hss: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/wan/ixp4xx_hss.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c
index f1e1643dc3eb..aaaca9aa2293 100644
--- a/drivers/net/wan/ixp4xx_hss.c
+++ b/drivers/net/wan/ixp4xx_hss.c
@@ -8,6 +8,8 @@
8 * as published by the Free Software Foundation. 8 * as published by the Free Software Foundation.
9 */ 9 */
10 10
11#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
12
11#include <linux/bitops.h> 13#include <linux/bitops.h>
12#include <linux/cdev.h> 14#include <linux/cdev.h>
13#include <linux/dma-mapping.h> 15#include <linux/dma-mapping.h>
@@ -358,9 +360,8 @@ static void hss_npe_send(struct port *port, struct msg *msg, const char* what)
358{ 360{
359 u32 *val = (u32*)msg; 361 u32 *val = (u32*)msg;
360 if (npe_send_message(port->npe, msg, what)) { 362 if (npe_send_message(port->npe, msg, what)) {
361 printk(KERN_CRIT "HSS-%i: unable to send command [%08X:%08X]" 363 pr_crit("HSS-%i: unable to send command [%08X:%08X] to %s\n",
362 " to %s\n", port->id, val[0], val[1], 364 port->id, val[0], val[1], npe_name(port->npe));
363 npe_name(port->npe));
364 BUG(); 365 BUG();
365 } 366 }
366} 367}
@@ -447,8 +448,7 @@ static void hss_config(struct port *port)
447 if (npe_recv_message(port->npe, &msg, "HSS_LOAD_CONFIG") || 448 if (npe_recv_message(port->npe, &msg, "HSS_LOAD_CONFIG") ||
448 /* HSS_LOAD_CONFIG for port #1 returns port_id = #4 */ 449 /* HSS_LOAD_CONFIG for port #1 returns port_id = #4 */
449 msg.cmd != PORT_CONFIG_LOAD || msg.data32) { 450 msg.cmd != PORT_CONFIG_LOAD || msg.data32) {
450 printk(KERN_CRIT "HSS-%i: HSS_LOAD_CONFIG failed\n", 451 pr_crit("HSS-%i: HSS_LOAD_CONFIG failed\n", port->id);
451 port->id);
452 BUG(); 452 BUG();
453 } 453 }
454 454
@@ -477,8 +477,7 @@ static u32 hss_get_status(struct port *port)
477 msg.hss_port = port->id; 477 msg.hss_port = port->id;
478 hss_npe_send(port, &msg, "PORT_ERROR_READ"); 478 hss_npe_send(port, &msg, "PORT_ERROR_READ");
479 if (npe_recv_message(port->npe, &msg, "PORT_ERROR_READ")) { 479 if (npe_recv_message(port->npe, &msg, "PORT_ERROR_READ")) {
480 printk(KERN_CRIT "HSS-%i: unable to read HSS status\n", 480 pr_crit("HSS-%i: unable to read HSS status\n", port->id);
481 port->id);
482 BUG(); 481 BUG();
483 } 482 }
484 483
@@ -736,9 +735,8 @@ static int hss_hdlc_poll(struct napi_struct *napi, int budget)
736 dev->stats.rx_errors++; 735 dev->stats.rx_errors++;
737 break; 736 break;
738 default: /* FIXME - remove printk */ 737 default: /* FIXME - remove printk */
739 printk(KERN_ERR "%s: hss_hdlc_poll: status 0x%02X" 738 netdev_err(dev, "hss_hdlc_poll: status 0x%02X errors %u\n",
740 " errors %u\n", dev->name, desc->status, 739 desc->status, desc->error_count);
741 desc->error_count);
742 dev->stats.rx_errors++; 740 dev->stats.rx_errors++;
743 } 741 }
744 742
@@ -1127,8 +1125,8 @@ static int hss_hdlc_close(struct net_device *dev)
1127 buffs--; 1125 buffs--;
1128 1126
1129 if (buffs) 1127 if (buffs)
1130 printk(KERN_CRIT "%s: unable to drain RX queue, %i buffer(s)" 1128 netdev_crit(dev, "unable to drain RX queue, %i buffer(s) left in NPE\n",
1131 " left in NPE\n", dev->name, buffs); 1129 buffs);
1132 1130
1133 buffs = TX_DESCS; 1131 buffs = TX_DESCS;
1134 while (queue_get_desc(queue_ids[port->id].tx, port, 1) >= 0) 1132 while (queue_get_desc(queue_ids[port->id].tx, port, 1) >= 0)
@@ -1143,8 +1141,8 @@ static int hss_hdlc_close(struct net_device *dev)
1143 } while (++i < MAX_CLOSE_WAIT); 1141 } while (++i < MAX_CLOSE_WAIT);
1144 1142
1145 if (buffs) 1143 if (buffs)
1146 printk(KERN_CRIT "%s: unable to drain TX queue, %i buffer(s) " 1144 netdev_crit(dev, "unable to drain TX queue, %i buffer(s) left in NPE\n",
1147 "left in NPE\n", dev->name, buffs); 1145 buffs);
1148#if DEBUG_CLOSE 1146#if DEBUG_CLOSE
1149 if (!buffs) 1147 if (!buffs)
1150 printk(KERN_DEBUG "Draining TX queues took %i cycles\n", i); 1148 printk(KERN_DEBUG "Draining TX queues took %i cycles\n", i);
@@ -1364,7 +1362,7 @@ static int __devinit hss_init_one(struct platform_device *pdev)
1364 1362
1365 platform_set_drvdata(pdev, port); 1363 platform_set_drvdata(pdev, port);
1366 1364
1367 printk(KERN_INFO "%s: HSS-%i\n", dev->name, port->id); 1365 netdev_info(dev, "HSS-%i\n", port->id);
1368 return 0; 1366 return 0;
1369 1367
1370err_free_netdev: 1368err_free_netdev: