mirror of
https://github.com/torvalds/linux.git
synced 2024-10-30 00:32:38 +00:00
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>
This commit is contained in:
parent
e8c122f450
commit
c75bb2c6f0
@ -8,6 +8,8 @@
|
|||||||
* as published by the Free Software Foundation.
|
* as published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include <linux/bitops.h>
|
#include <linux/bitops.h>
|
||||||
#include <linux/cdev.h>
|
#include <linux/cdev.h>
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
@ -358,9 +360,8 @@ static void hss_npe_send(struct port *port, struct msg *msg, const char* what)
|
|||||||
{
|
{
|
||||||
u32 *val = (u32*)msg;
|
u32 *val = (u32*)msg;
|
||||||
if (npe_send_message(port->npe, msg, what)) {
|
if (npe_send_message(port->npe, msg, what)) {
|
||||||
printk(KERN_CRIT "HSS-%i: unable to send command [%08X:%08X]"
|
pr_crit("HSS-%i: unable to send command [%08X:%08X] to %s\n",
|
||||||
" to %s\n", port->id, val[0], val[1],
|
port->id, val[0], val[1], npe_name(port->npe));
|
||||||
npe_name(port->npe));
|
|
||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -447,8 +448,7 @@ static void hss_config(struct port *port)
|
|||||||
if (npe_recv_message(port->npe, &msg, "HSS_LOAD_CONFIG") ||
|
if (npe_recv_message(port->npe, &msg, "HSS_LOAD_CONFIG") ||
|
||||||
/* HSS_LOAD_CONFIG for port #1 returns port_id = #4 */
|
/* HSS_LOAD_CONFIG for port #1 returns port_id = #4 */
|
||||||
msg.cmd != PORT_CONFIG_LOAD || msg.data32) {
|
msg.cmd != PORT_CONFIG_LOAD || msg.data32) {
|
||||||
printk(KERN_CRIT "HSS-%i: HSS_LOAD_CONFIG failed\n",
|
pr_crit("HSS-%i: HSS_LOAD_CONFIG failed\n", port->id);
|
||||||
port->id);
|
|
||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -477,8 +477,7 @@ static u32 hss_get_status(struct port *port)
|
|||||||
msg.hss_port = port->id;
|
msg.hss_port = port->id;
|
||||||
hss_npe_send(port, &msg, "PORT_ERROR_READ");
|
hss_npe_send(port, &msg, "PORT_ERROR_READ");
|
||||||
if (npe_recv_message(port->npe, &msg, "PORT_ERROR_READ")) {
|
if (npe_recv_message(port->npe, &msg, "PORT_ERROR_READ")) {
|
||||||
printk(KERN_CRIT "HSS-%i: unable to read HSS status\n",
|
pr_crit("HSS-%i: unable to read HSS status\n", port->id);
|
||||||
port->id);
|
|
||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -736,9 +735,8 @@ static int hss_hdlc_poll(struct napi_struct *napi, int budget)
|
|||||||
dev->stats.rx_errors++;
|
dev->stats.rx_errors++;
|
||||||
break;
|
break;
|
||||||
default: /* FIXME - remove printk */
|
default: /* FIXME - remove printk */
|
||||||
printk(KERN_ERR "%s: hss_hdlc_poll: status 0x%02X"
|
netdev_err(dev, "hss_hdlc_poll: status 0x%02X errors %u\n",
|
||||||
" errors %u\n", dev->name, desc->status,
|
desc->status, desc->error_count);
|
||||||
desc->error_count);
|
|
||||||
dev->stats.rx_errors++;
|
dev->stats.rx_errors++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1127,8 +1125,8 @@ static int hss_hdlc_close(struct net_device *dev)
|
|||||||
buffs--;
|
buffs--;
|
||||||
|
|
||||||
if (buffs)
|
if (buffs)
|
||||||
printk(KERN_CRIT "%s: unable to drain RX queue, %i buffer(s)"
|
netdev_crit(dev, "unable to drain RX queue, %i buffer(s) left in NPE\n",
|
||||||
" left in NPE\n", dev->name, buffs);
|
buffs);
|
||||||
|
|
||||||
buffs = TX_DESCS;
|
buffs = TX_DESCS;
|
||||||
while (queue_get_desc(queue_ids[port->id].tx, port, 1) >= 0)
|
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)
|
|||||||
} while (++i < MAX_CLOSE_WAIT);
|
} while (++i < MAX_CLOSE_WAIT);
|
||||||
|
|
||||||
if (buffs)
|
if (buffs)
|
||||||
printk(KERN_CRIT "%s: unable to drain TX queue, %i buffer(s) "
|
netdev_crit(dev, "unable to drain TX queue, %i buffer(s) left in NPE\n",
|
||||||
"left in NPE\n", dev->name, buffs);
|
buffs);
|
||||||
#if DEBUG_CLOSE
|
#if DEBUG_CLOSE
|
||||||
if (!buffs)
|
if (!buffs)
|
||||||
printk(KERN_DEBUG "Draining TX queues took %i cycles\n", i);
|
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)
|
|||||||
|
|
||||||
platform_set_drvdata(pdev, port);
|
platform_set_drvdata(pdev, port);
|
||||||
|
|
||||||
printk(KERN_INFO "%s: HSS-%i\n", dev->name, port->id);
|
netdev_info(dev, "HSS-%i\n", port->id);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_free_netdev:
|
err_free_netdev:
|
||||||
|
Loading…
Reference in New Issue
Block a user