fs_enet: use dev_xxx instead of printk
Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ce300c7ffa
commit
fcb6a1c83e
4 changed files with 27 additions and 38 deletions
|
@ -108,9 +108,7 @@ static int fs_enet_rx_napi(struct napi_struct *napi, int budget)
|
||||||
* the last indicator should be set.
|
* the last indicator should be set.
|
||||||
*/
|
*/
|
||||||
if ((sc & BD_ENET_RX_LAST) == 0)
|
if ((sc & BD_ENET_RX_LAST) == 0)
|
||||||
printk(KERN_WARNING DRV_MODULE_NAME
|
dev_warn(fep->dev, "rcv is not +last\n");
|
||||||
": %s rcv is not +last\n",
|
|
||||||
dev->name);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for errors.
|
* Check for errors.
|
||||||
|
@ -178,9 +176,8 @@ static int fs_enet_rx_napi(struct napi_struct *napi, int budget)
|
||||||
received++;
|
received++;
|
||||||
netif_receive_skb(skb);
|
netif_receive_skb(skb);
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_WARNING DRV_MODULE_NAME
|
dev_warn(fep->dev,
|
||||||
": %s Memory squeeze, dropping packet.\n",
|
"Memory squeeze, dropping packet.\n");
|
||||||
dev->name);
|
|
||||||
fep->stats.rx_dropped++;
|
fep->stats.rx_dropped++;
|
||||||
skbn = skb;
|
skbn = skb;
|
||||||
}
|
}
|
||||||
|
@ -242,9 +239,7 @@ static int fs_enet_rx_non_napi(struct net_device *dev)
|
||||||
* the last indicator should be set.
|
* the last indicator should be set.
|
||||||
*/
|
*/
|
||||||
if ((sc & BD_ENET_RX_LAST) == 0)
|
if ((sc & BD_ENET_RX_LAST) == 0)
|
||||||
printk(KERN_WARNING DRV_MODULE_NAME
|
dev_warn(fep->dev, "rcv is not +last\n");
|
||||||
": %s rcv is not +last\n",
|
|
||||||
dev->name);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check for errors.
|
* Check for errors.
|
||||||
|
@ -313,9 +308,8 @@ static int fs_enet_rx_non_napi(struct net_device *dev)
|
||||||
received++;
|
received++;
|
||||||
netif_rx(skb);
|
netif_rx(skb);
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_WARNING DRV_MODULE_NAME
|
dev_warn(fep->dev,
|
||||||
": %s Memory squeeze, dropping packet.\n",
|
"Memory squeeze, dropping packet.\n");
|
||||||
dev->name);
|
|
||||||
fep->stats.rx_dropped++;
|
fep->stats.rx_dropped++;
|
||||||
skbn = skb;
|
skbn = skb;
|
||||||
}
|
}
|
||||||
|
@ -388,10 +382,10 @@ static void fs_enet_tx(struct net_device *dev)
|
||||||
} else
|
} else
|
||||||
fep->stats.tx_packets++;
|
fep->stats.tx_packets++;
|
||||||
|
|
||||||
if (sc & BD_ENET_TX_READY)
|
if (sc & BD_ENET_TX_READY) {
|
||||||
printk(KERN_WARNING DRV_MODULE_NAME
|
dev_warn(fep->dev,
|
||||||
": %s HEY! Enet xmit interrupt and TX_READY.\n",
|
"HEY! Enet xmit interrupt and TX_READY.\n");
|
||||||
dev->name);
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Deferred means some collisions occurred during transmit,
|
* Deferred means some collisions occurred during transmit,
|
||||||
|
@ -511,9 +505,8 @@ void fs_init_bds(struct net_device *dev)
|
||||||
for (i = 0, bdp = fep->rx_bd_base; i < fep->rx_ring; i++, bdp++) {
|
for (i = 0, bdp = fep->rx_bd_base; i < fep->rx_ring; i++, bdp++) {
|
||||||
skb = dev_alloc_skb(ENET_RX_FRSIZE);
|
skb = dev_alloc_skb(ENET_RX_FRSIZE);
|
||||||
if (skb == NULL) {
|
if (skb == NULL) {
|
||||||
printk(KERN_WARNING DRV_MODULE_NAME
|
dev_warn(fep->dev,
|
||||||
": %s Memory squeeze, unable to allocate skb\n",
|
"Memory squeeze, unable to allocate skb\n");
|
||||||
dev->name);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
skb_align(skb, ENET_RX_ALIGN);
|
skb_align(skb, ENET_RX_ALIGN);
|
||||||
|
@ -610,8 +603,7 @@ static int fs_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||||
* Ooops. All transmit buffers are full. Bail out.
|
* Ooops. All transmit buffers are full. Bail out.
|
||||||
* This should not happen, since the tx queue should be stopped.
|
* This should not happen, since the tx queue should be stopped.
|
||||||
*/
|
*/
|
||||||
printk(KERN_WARNING DRV_MODULE_NAME
|
dev_warn(fep->dev, "tx queue full!.\n");
|
||||||
": %s tx queue full!.\n", dev->name);
|
|
||||||
return NETDEV_TX_BUSY;
|
return NETDEV_TX_BUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -788,8 +780,7 @@ static int fs_enet_open(struct net_device *dev)
|
||||||
r = request_irq(fep->interrupt, fs_enet_interrupt, IRQF_SHARED,
|
r = request_irq(fep->interrupt, fs_enet_interrupt, IRQF_SHARED,
|
||||||
"fs_enet-mac", dev);
|
"fs_enet-mac", dev);
|
||||||
if (r != 0) {
|
if (r != 0) {
|
||||||
printk(KERN_ERR DRV_MODULE_NAME
|
dev_err(fep->dev, "Could not allocate FS_ENET IRQ!");
|
||||||
": %s Could not allocate FS_ENET IRQ!", dev->name);
|
|
||||||
if (fep->fpi->use_napi)
|
if (fep->fpi->use_napi)
|
||||||
napi_disable(&fep->napi);
|
napi_disable(&fep->napi);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -1053,7 +1044,7 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out_free_bd;
|
goto out_free_bd;
|
||||||
|
|
||||||
printk(KERN_INFO "%s: fs_enet: %pM\n", ndev->name, ndev->dev_addr);
|
pr_info("%s: fs_enet: %pM\n", ndev->name, ndev->dev_addr);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -476,8 +476,9 @@ static void clear_int_events(struct net_device *dev, u32 int_events)
|
||||||
|
|
||||||
static void ev_error(struct net_device *dev, u32 int_events)
|
static void ev_error(struct net_device *dev, u32 int_events)
|
||||||
{
|
{
|
||||||
printk(KERN_WARNING DRV_MODULE_NAME
|
struct fs_enet_private *fep = netdev_priv(dev);
|
||||||
": %s FS_ENET ERROR(s) 0x%x\n", dev->name, int_events);
|
|
||||||
|
dev_warn(fep->dev, "FS_ENET ERROR(s) 0x%x\n", int_events);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_regs(struct net_device *dev, void *p, int *sizep)
|
static int get_regs(struct net_device *dev, void *p, int *sizep)
|
||||||
|
|
|
@ -257,8 +257,7 @@ static void restart(struct net_device *dev)
|
||||||
|
|
||||||
r = whack_reset(fep->fec.fecp);
|
r = whack_reset(fep->fec.fecp);
|
||||||
if (r != 0)
|
if (r != 0)
|
||||||
printk(KERN_ERR DRV_MODULE_NAME
|
dev_err(fep->dev, "FEC Reset FAILED!\n");
|
||||||
": %s FEC Reset FAILED!\n", dev->name);
|
|
||||||
/*
|
/*
|
||||||
* Set station address.
|
* Set station address.
|
||||||
*/
|
*/
|
||||||
|
@ -355,9 +354,7 @@ static void stop(struct net_device *dev)
|
||||||
udelay(1);
|
udelay(1);
|
||||||
|
|
||||||
if (i == FEC_RESET_DELAY)
|
if (i == FEC_RESET_DELAY)
|
||||||
printk(KERN_WARNING DRV_MODULE_NAME
|
dev_warn(fep->dev, "FEC timeout on graceful transmit stop\n");
|
||||||
": %s FEC timeout on graceful transmit stop\n",
|
|
||||||
dev->name);
|
|
||||||
/*
|
/*
|
||||||
* Disable FEC. Let only MII interrupts.
|
* Disable FEC. Let only MII interrupts.
|
||||||
*/
|
*/
|
||||||
|
@ -433,8 +430,9 @@ static void clear_int_events(struct net_device *dev, u32 int_events)
|
||||||
|
|
||||||
static void ev_error(struct net_device *dev, u32 int_events)
|
static void ev_error(struct net_device *dev, u32 int_events)
|
||||||
{
|
{
|
||||||
printk(KERN_WARNING DRV_MODULE_NAME
|
struct fs_enet_private *fep = netdev_priv(dev);
|
||||||
": %s FEC ERROR(s) 0x%x\n", dev->name, int_events);
|
|
||||||
|
dev_warn(fep->dev, "FEC ERROR(s) 0x%x\n", int_events);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_regs(struct net_device *dev, void *p, int *sizep)
|
static int get_regs(struct net_device *dev, void *p, int *sizep)
|
||||||
|
|
|
@ -367,9 +367,7 @@ static void stop(struct net_device *dev)
|
||||||
udelay(1);
|
udelay(1);
|
||||||
|
|
||||||
if (i == SCC_RESET_DELAY)
|
if (i == SCC_RESET_DELAY)
|
||||||
printk(KERN_WARNING DRV_MODULE_NAME
|
dev_warn(fep->dev, "SCC timeout on graceful transmit stop\n");
|
||||||
": %s SCC timeout on graceful transmit stop\n",
|
|
||||||
dev->name);
|
|
||||||
|
|
||||||
W16(sccp, scc_sccm, 0);
|
W16(sccp, scc_sccm, 0);
|
||||||
C32(sccp, scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT);
|
C32(sccp, scc_gsmrl, SCC_GSMRL_ENR | SCC_GSMRL_ENT);
|
||||||
|
@ -429,8 +427,9 @@ static void clear_int_events(struct net_device *dev, u32 int_events)
|
||||||
|
|
||||||
static void ev_error(struct net_device *dev, u32 int_events)
|
static void ev_error(struct net_device *dev, u32 int_events)
|
||||||
{
|
{
|
||||||
printk(KERN_WARNING DRV_MODULE_NAME
|
struct fs_enet_private *fep = netdev_priv(dev);
|
||||||
": %s SCC ERROR(s) 0x%x\n", dev->name, int_events);
|
|
||||||
|
dev_warn(fep->dev, "SCC ERROR(s) 0x%x\n", int_events);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_regs(struct net_device *dev, void *p, int *sizep)
|
static int get_regs(struct net_device *dev, void *p, int *sizep)
|
||||||
|
|
Reference in a new issue