Commit ea0a52c4 authored by Wolfram Sang's avatar Wolfram Sang Committed by David S. Miller

pcnet_cs: Use proper netdev_*-printouts

To prevent broken messages like:

[  204.024291] eth%d: pcnet_reset_8390() did not complete.
Signed-off-by: default avatarWolfram Sang <w.sang@pengutronix.de>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Joe Perches <joe@perches.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 01414802
...@@ -638,12 +638,12 @@ static int pcnet_config(struct pcmcia_device *link) ...@@ -638,12 +638,12 @@ static int pcnet_config(struct pcmcia_device *link)
if (info->flags & (IS_DL10019|IS_DL10022)) { if (info->flags & (IS_DL10019|IS_DL10022)) {
u_char id = inb(dev->base_addr + 0x1a); u_char id = inb(dev->base_addr + 0x1a);
printk(KERN_INFO "%s: NE2000 (DL100%d rev %02x): ", netdev_info(dev, "NE2000 (DL100%d rev %02x): ",
dev->name, ((info->flags & IS_DL10022) ? 22 : 19), id); (info->flags & IS_DL10022) ? 22 : 19, id);
if (info->pna_phy) if (info->pna_phy)
printk("PNA, "); printk("PNA, ");
} else { } else {
printk(KERN_INFO "%s: NE2000 Compatible: ", dev->name); netdev_info(dev, "NE2000 Compatible: ");
} }
printk("io %#3lx, irq %d,", dev->base_addr, dev->irq); printk("io %#3lx, irq %d,", dev->base_addr, dev->irq);
if (info->flags & USE_SHMEM) if (info->flags & USE_SHMEM)
...@@ -924,7 +924,7 @@ static void mii_phy_probe(struct net_device *dev) ...@@ -924,7 +924,7 @@ static void mii_phy_probe(struct net_device *dev)
phyid = tmp << 16; phyid = tmp << 16;
phyid |= mdio_read(mii_addr, i, MII_PHYID_REG2); phyid |= mdio_read(mii_addr, i, MII_PHYID_REG2);
phyid &= MII_PHYID_REV_MASK; phyid &= MII_PHYID_REV_MASK;
pr_debug("%s: MII at %d is 0x%08x\n", dev->name, i, phyid); netdev_dbg(dev, "MII at %d is 0x%08x\n", i, phyid);
if (phyid == AM79C9XX_HOME_PHY) { if (phyid == AM79C9XX_HOME_PHY) {
info->pna_phy = i; info->pna_phy = i;
} else if (phyid != AM79C9XX_ETH_PHY) { } else if (phyid != AM79C9XX_ETH_PHY) {
...@@ -1010,8 +1010,8 @@ static void pcnet_reset_8390(struct net_device *dev) ...@@ -1010,8 +1010,8 @@ static void pcnet_reset_8390(struct net_device *dev)
outb_p(ENISR_RESET, nic_base + EN0_ISR); /* Ack intr. */ outb_p(ENISR_RESET, nic_base + EN0_ISR); /* Ack intr. */
if (i == 100) if (i == 100)
printk(KERN_ERR "%s: pcnet_reset_8390() did not complete.\n", netdev_err(dev, "pcnet_reset_8390() did not complete.\n");
dev->name);
set_misc_reg(dev); set_misc_reg(dev);
} /* pcnet_reset_8390 */ } /* pcnet_reset_8390 */
...@@ -1027,8 +1027,7 @@ static int set_config(struct net_device *dev, struct ifmap *map) ...@@ -1027,8 +1027,7 @@ static int set_config(struct net_device *dev, struct ifmap *map)
else if ((map->port < 1) || (map->port > 2)) else if ((map->port < 1) || (map->port > 2))
return -EINVAL; return -EINVAL;
dev->if_port = map->port; dev->if_port = map->port;
printk(KERN_INFO "%s: switched to %s port\n", netdev_info(dev, "switched to %s port\n", if_names[dev->if_port]);
dev->name, if_names[dev->if_port]);
NS8390_init(dev, 1); NS8390_init(dev, 1);
} }
return 0; return 0;
...@@ -1063,7 +1062,7 @@ static void ei_watchdog(u_long arg) ...@@ -1063,7 +1062,7 @@ static void ei_watchdog(u_long arg)
this, we can limp along even if the interrupt is blocked */ this, we can limp along even if the interrupt is blocked */
if (info->stale++ && (inb_p(nic_base + EN0_ISR) & ENISR_ALL)) { if (info->stale++ && (inb_p(nic_base + EN0_ISR) & ENISR_ALL)) {
if (!info->fast_poll) if (!info->fast_poll)
printk(KERN_INFO "%s: interrupt(s) dropped!\n", dev->name); netdev_info(dev, "interrupt(s) dropped!\n");
ei_irq_wrapper(dev->irq, dev); ei_irq_wrapper(dev->irq, dev);
info->fast_poll = HZ; info->fast_poll = HZ;
} }
...@@ -1083,7 +1082,7 @@ static void ei_watchdog(u_long arg) ...@@ -1083,7 +1082,7 @@ static void ei_watchdog(u_long arg)
if (info->eth_phy) { if (info->eth_phy) {
info->phy_id = info->eth_phy = 0; info->phy_id = info->eth_phy = 0;
} else { } else {
printk(KERN_INFO "%s: MII is missing!\n", dev->name); netdev_info(dev, "MII is missing!\n");
info->flags &= ~HAS_MII; info->flags &= ~HAS_MII;
} }
goto reschedule; goto reschedule;
...@@ -1092,8 +1091,7 @@ static void ei_watchdog(u_long arg) ...@@ -1092,8 +1091,7 @@ static void ei_watchdog(u_long arg)
link &= 0x0004; link &= 0x0004;
if (link != info->link_status) { if (link != info->link_status) {
u_short p = mdio_read(mii_addr, info->phy_id, 5); u_short p = mdio_read(mii_addr, info->phy_id, 5);
printk(KERN_INFO "%s: %s link beat\n", dev->name, netdev_info(dev, "%s link beat\n", link ? "found" : "lost");
(link) ? "found" : "lost");
if (link && (info->flags & IS_DL10022)) { if (link && (info->flags & IS_DL10022)) {
/* Disable collision detection on full duplex links */ /* Disable collision detection on full duplex links */
outb((p & 0x0140) ? 4 : 0, nic_base + DLINK_DIAG); outb((p & 0x0140) ? 4 : 0, nic_base + DLINK_DIAG);
...@@ -1104,13 +1102,12 @@ static void ei_watchdog(u_long arg) ...@@ -1104,13 +1102,12 @@ static void ei_watchdog(u_long arg)
if (link) { if (link) {
if (info->phy_id == info->eth_phy) { if (info->phy_id == info->eth_phy) {
if (p) if (p)
printk(KERN_INFO "%s: autonegotiation complete: " netdev_info(dev, "autonegotiation complete: "
"%sbaseT-%cD selected\n", dev->name, "%sbaseT-%cD selected\n",
((p & 0x0180) ? "100" : "10"), ((p & 0x0180) ? "100" : "10"),
((p & 0x0140) ? 'F' : 'H')); ((p & 0x0140) ? 'F' : 'H'));
else else
printk(KERN_INFO "%s: link partner did not " netdev_info(dev, "link partner did not autonegotiate\n");
"autonegotiate\n", dev->name);
} }
NS8390_init(dev, 1); NS8390_init(dev, 1);
} }
...@@ -1123,7 +1120,7 @@ static void ei_watchdog(u_long arg) ...@@ -1123,7 +1120,7 @@ static void ei_watchdog(u_long arg)
/* isolate this MII and try flipping to the other one */ /* isolate this MII and try flipping to the other one */
mdio_write(mii_addr, info->phy_id, 0, 0x0400); mdio_write(mii_addr, info->phy_id, 0, 0x0400);
info->phy_id ^= info->pna_phy ^ info->eth_phy; info->phy_id ^= info->pna_phy ^ info->eth_phy;
printk(KERN_INFO "%s: switched to %s transceiver\n", dev->name, netdev_info(dev, "switched to %s transceiver\n",
(info->phy_id == info->eth_phy) ? "ethernet" : "PNA"); (info->phy_id == info->eth_phy) ? "ethernet" : "PNA");
mdio_write(mii_addr, info->phy_id, 0, mdio_write(mii_addr, info->phy_id, 0,
(info->phy_id == info->eth_phy) ? 0x1000 : 0); (info->phy_id == info->eth_phy) ? 0x1000 : 0);
...@@ -1171,9 +1168,9 @@ static void dma_get_8390_hdr(struct net_device *dev, ...@@ -1171,9 +1168,9 @@ static void dma_get_8390_hdr(struct net_device *dev,
unsigned int nic_base = dev->base_addr; unsigned int nic_base = dev->base_addr;
if (ei_status.dmaing) { if (ei_status.dmaing) {
printk(KERN_NOTICE "%s: DMAing conflict in dma_block_input." netdev_notice(dev, "DMAing conflict in dma_block_input."
"[DMAstat:%1x][irqlock:%1x]\n", "[DMAstat:%1x][irqlock:%1x]\n",
dev->name, ei_status.dmaing, ei_status.irqlock); ei_status.dmaing, ei_status.irqlock);
return; return;
} }
...@@ -1204,11 +1201,11 @@ static void dma_block_input(struct net_device *dev, int count, ...@@ -1204,11 +1201,11 @@ static void dma_block_input(struct net_device *dev, int count,
char *buf = skb->data; char *buf = skb->data;
if ((ei_debug > 4) && (count != 4)) if ((ei_debug > 4) && (count != 4))
pr_debug("%s: [bi=%d]\n", dev->name, count+4); netdev_dbg(dev, "[bi=%d]\n", count+4);
if (ei_status.dmaing) { if (ei_status.dmaing) {
printk(KERN_NOTICE "%s: DMAing conflict in dma_block_input." netdev_notice(dev, "DMAing conflict in dma_block_input."
"[DMAstat:%1x][irqlock:%1x]\n", "[DMAstat:%1x][irqlock:%1x]\n",
dev->name, ei_status.dmaing, ei_status.irqlock); ei_status.dmaing, ei_status.irqlock);
return; return;
} }
ei_status.dmaing |= 0x01; ei_status.dmaing |= 0x01;
...@@ -1238,9 +1235,9 @@ static void dma_block_input(struct net_device *dev, int count, ...@@ -1238,9 +1235,9 @@ static void dma_block_input(struct net_device *dev, int count,
break; break;
} while (--tries > 0); } while (--tries > 0);
if (tries <= 0) if (tries <= 0)
printk(KERN_NOTICE "%s: RX transfer address mismatch," netdev_notice(dev, "RX transfer address mismatch,"
"%#4.4x (expected) vs. %#4.4x (actual).\n", "%#4.4x (expected) vs. %#4.4x (actual).\n",
dev->name, ring_offset + xfer_count, addr); ring_offset + xfer_count, addr);
} }
#endif #endif
outb_p(ENISR_RDC, nic_base + EN0_ISR); /* Ack intr. */ outb_p(ENISR_RDC, nic_base + EN0_ISR); /* Ack intr. */
...@@ -1261,7 +1258,7 @@ static void dma_block_output(struct net_device *dev, int count, ...@@ -1261,7 +1258,7 @@ static void dma_block_output(struct net_device *dev, int count,
#ifdef PCMCIA_DEBUG #ifdef PCMCIA_DEBUG
if (ei_debug > 4) if (ei_debug > 4)
printk(KERN_DEBUG "%s: [bo=%d]\n", dev->name, count); netdev_dbg(dev, "[bo=%d]\n", count);
#endif #endif
/* Round the count up for word writes. Do we need to do this? /* Round the count up for word writes. Do we need to do this?
...@@ -1270,9 +1267,9 @@ static void dma_block_output(struct net_device *dev, int count, ...@@ -1270,9 +1267,9 @@ static void dma_block_output(struct net_device *dev, int count,
if (count & 0x01) if (count & 0x01)
count++; count++;
if (ei_status.dmaing) { if (ei_status.dmaing) {
printk(KERN_NOTICE "%s: DMAing conflict in dma_block_output." netdev_notice(dev, "DMAing conflict in dma_block_output."
"[DMAstat:%1x][irqlock:%1x]\n", "[DMAstat:%1x][irqlock:%1x]\n",
dev->name, ei_status.dmaing, ei_status.irqlock); ei_status.dmaing, ei_status.irqlock);
return; return;
} }
ei_status.dmaing |= 0x01; ei_status.dmaing |= 0x01;
...@@ -1309,9 +1306,9 @@ static void dma_block_output(struct net_device *dev, int count, ...@@ -1309,9 +1306,9 @@ static void dma_block_output(struct net_device *dev, int count,
break; break;
} while (--tries > 0); } while (--tries > 0);
if (tries <= 0) { if (tries <= 0) {
printk(KERN_NOTICE "%s: Tx packet transfer address mismatch," netdev_notice(dev, "Tx packet transfer address mismatch,"
"%#4.4x (expected) vs. %#4.4x (actual).\n", "%#4.4x (expected) vs. %#4.4x (actual).\n",
dev->name, (start_page << 8) + count, addr); (start_page << 8) + count, addr);
if (retries++ == 0) if (retries++ == 0)
goto retry; goto retry;
} }
...@@ -1320,8 +1317,7 @@ static void dma_block_output(struct net_device *dev, int count, ...@@ -1320,8 +1317,7 @@ static void dma_block_output(struct net_device *dev, int count,
while ((inb_p(nic_base + EN0_ISR) & ENISR_RDC) == 0) while ((inb_p(nic_base + EN0_ISR) & ENISR_RDC) == 0)
if (time_after(jiffies, dma_start + PCNET_RDC_TIMEOUT)) { if (time_after(jiffies, dma_start + PCNET_RDC_TIMEOUT)) {
printk(KERN_NOTICE "%s: timeout waiting for Tx RDC.\n", netdev_notice(dev, "timeout waiting for Tx RDC.\n");
dev->name);
pcnet_reset_8390(dev); pcnet_reset_8390(dev);
NS8390_init(dev, 1); NS8390_init(dev, 1);
break; break;
......
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