diff options
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 58 |
1 files changed, 27 insertions, 31 deletions
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 2e1348c0033e..296f8a8e57ca 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -638,12 +638,12 @@ static int pcnet_config(struct pcmcia_device *link) | |||
638 | 638 | ||
639 | if (info->flags & (IS_DL10019|IS_DL10022)) { | 639 | if (info->flags & (IS_DL10019|IS_DL10022)) { |
640 | u_char id = inb(dev->base_addr + 0x1a); | 640 | u_char id = inb(dev->base_addr + 0x1a); |
641 | printk(KERN_INFO "%s: NE2000 (DL100%d rev %02x): ", | 641 | netdev_info(dev, "NE2000 (DL100%d rev %02x): ", |
642 | dev->name, ((info->flags & IS_DL10022) ? 22 : 19), id); | 642 | (info->flags & IS_DL10022) ? 22 : 19, id); |
643 | if (info->pna_phy) | 643 | if (info->pna_phy) |
644 | printk("PNA, "); | 644 | printk("PNA, "); |
645 | } else { | 645 | } else { |
646 | printk(KERN_INFO "%s: NE2000 Compatible: ", dev->name); | 646 | netdev_info(dev, "NE2000 Compatible: "); |
647 | } | 647 | } |
648 | printk("io %#3lx, irq %d,", dev->base_addr, dev->irq); | 648 | printk("io %#3lx, irq %d,", dev->base_addr, dev->irq); |
649 | if (info->flags & USE_SHMEM) | 649 | if (info->flags & USE_SHMEM) |
@@ -924,7 +924,7 @@ static void mii_phy_probe(struct net_device *dev) | |||
924 | phyid = tmp << 16; | 924 | phyid = tmp << 16; |
925 | phyid |= mdio_read(mii_addr, i, MII_PHYID_REG2); | 925 | phyid |= mdio_read(mii_addr, i, MII_PHYID_REG2); |
926 | phyid &= MII_PHYID_REV_MASK; | 926 | phyid &= MII_PHYID_REV_MASK; |
927 | pr_debug("%s: MII at %d is 0x%08x\n", dev->name, i, phyid); | 927 | netdev_dbg(dev, "MII at %d is 0x%08x\n", i, phyid); |
928 | if (phyid == AM79C9XX_HOME_PHY) { | 928 | if (phyid == AM79C9XX_HOME_PHY) { |
929 | info->pna_phy = i; | 929 | info->pna_phy = i; |
930 | } else if (phyid != AM79C9XX_ETH_PHY) { | 930 | } else if (phyid != AM79C9XX_ETH_PHY) { |
@@ -1010,8 +1010,8 @@ static void pcnet_reset_8390(struct net_device *dev) | |||
1010 | outb_p(ENISR_RESET, nic_base + EN0_ISR); /* Ack intr. */ | 1010 | outb_p(ENISR_RESET, nic_base + EN0_ISR); /* Ack intr. */ |
1011 | 1011 | ||
1012 | if (i == 100) | 1012 | if (i == 100) |
1013 | printk(KERN_ERR "%s: pcnet_reset_8390() did not complete.\n", | 1013 | netdev_err(dev, "pcnet_reset_8390() did not complete.\n"); |
1014 | dev->name); | 1014 | |
1015 | set_misc_reg(dev); | 1015 | set_misc_reg(dev); |
1016 | 1016 | ||
1017 | } /* pcnet_reset_8390 */ | 1017 | } /* pcnet_reset_8390 */ |
@@ -1027,8 +1027,7 @@ static int set_config(struct net_device *dev, struct ifmap *map) | |||
1027 | else if ((map->port < 1) || (map->port > 2)) | 1027 | else if ((map->port < 1) || (map->port > 2)) |
1028 | return -EINVAL; | 1028 | return -EINVAL; |
1029 | dev->if_port = map->port; | 1029 | dev->if_port = map->port; |
1030 | printk(KERN_INFO "%s: switched to %s port\n", | 1030 | netdev_info(dev, "switched to %s port\n", if_names[dev->if_port]); |
1031 | dev->name, if_names[dev->if_port]); | ||
1032 | NS8390_init(dev, 1); | 1031 | NS8390_init(dev, 1); |
1033 | } | 1032 | } |
1034 | return 0; | 1033 | return 0; |
@@ -1063,7 +1062,7 @@ static void ei_watchdog(u_long arg) | |||
1063 | this, we can limp along even if the interrupt is blocked */ | 1062 | this, we can limp along even if the interrupt is blocked */ |
1064 | if (info->stale++ && (inb_p(nic_base + EN0_ISR) & ENISR_ALL)) { | 1063 | if (info->stale++ && (inb_p(nic_base + EN0_ISR) & ENISR_ALL)) { |
1065 | if (!info->fast_poll) | 1064 | if (!info->fast_poll) |
1066 | printk(KERN_INFO "%s: interrupt(s) dropped!\n", dev->name); | 1065 | netdev_info(dev, "interrupt(s) dropped!\n"); |
1067 | ei_irq_wrapper(dev->irq, dev); | 1066 | ei_irq_wrapper(dev->irq, dev); |
1068 | info->fast_poll = HZ; | 1067 | info->fast_poll = HZ; |
1069 | } | 1068 | } |
@@ -1083,7 +1082,7 @@ static void ei_watchdog(u_long arg) | |||
1083 | if (info->eth_phy) { | 1082 | if (info->eth_phy) { |
1084 | info->phy_id = info->eth_phy = 0; | 1083 | info->phy_id = info->eth_phy = 0; |
1085 | } else { | 1084 | } else { |
1086 | printk(KERN_INFO "%s: MII is missing!\n", dev->name); | 1085 | netdev_info(dev, "MII is missing!\n"); |
1087 | info->flags &= ~HAS_MII; | 1086 | info->flags &= ~HAS_MII; |
1088 | } | 1087 | } |
1089 | goto reschedule; | 1088 | goto reschedule; |
@@ -1092,8 +1091,7 @@ static void ei_watchdog(u_long arg) | |||
1092 | link &= 0x0004; | 1091 | link &= 0x0004; |
1093 | if (link != info->link_status) { | 1092 | if (link != info->link_status) { |
1094 | u_short p = mdio_read(mii_addr, info->phy_id, 5); | 1093 | u_short p = mdio_read(mii_addr, info->phy_id, 5); |
1095 | printk(KERN_INFO "%s: %s link beat\n", dev->name, | 1094 | netdev_info(dev, "%s link beat\n", link ? "found" : "lost"); |
1096 | (link) ? "found" : "lost"); | ||
1097 | if (link && (info->flags & IS_DL10022)) { | 1095 | if (link && (info->flags & IS_DL10022)) { |
1098 | /* Disable collision detection on full duplex links */ | 1096 | /* Disable collision detection on full duplex links */ |
1099 | outb((p & 0x0140) ? 4 : 0, nic_base + DLINK_DIAG); | 1097 | outb((p & 0x0140) ? 4 : 0, nic_base + DLINK_DIAG); |
@@ -1104,13 +1102,12 @@ static void ei_watchdog(u_long arg) | |||
1104 | if (link) { | 1102 | if (link) { |
1105 | if (info->phy_id == info->eth_phy) { | 1103 | if (info->phy_id == info->eth_phy) { |
1106 | if (p) | 1104 | if (p) |
1107 | printk(KERN_INFO "%s: autonegotiation complete: " | 1105 | netdev_info(dev, "autonegotiation complete: " |
1108 | "%sbaseT-%cD selected\n", dev->name, | 1106 | "%sbaseT-%cD selected\n", |
1109 | ((p & 0x0180) ? "100" : "10"), | 1107 | ((p & 0x0180) ? "100" : "10"), |
1110 | ((p & 0x0140) ? 'F' : 'H')); | 1108 | ((p & 0x0140) ? 'F' : 'H')); |
1111 | else | 1109 | else |
1112 | printk(KERN_INFO "%s: link partner did not " | 1110 | netdev_info(dev, "link partner did not autonegotiate\n"); |
1113 | "autonegotiate\n", dev->name); | ||
1114 | } | 1111 | } |
1115 | NS8390_init(dev, 1); | 1112 | NS8390_init(dev, 1); |
1116 | } | 1113 | } |
@@ -1123,7 +1120,7 @@ static void ei_watchdog(u_long arg) | |||
1123 | /* isolate this MII and try flipping to the other one */ | 1120 | /* isolate this MII and try flipping to the other one */ |
1124 | mdio_write(mii_addr, info->phy_id, 0, 0x0400); | 1121 | mdio_write(mii_addr, info->phy_id, 0, 0x0400); |
1125 | info->phy_id ^= info->pna_phy ^ info->eth_phy; | 1122 | info->phy_id ^= info->pna_phy ^ info->eth_phy; |
1126 | printk(KERN_INFO "%s: switched to %s transceiver\n", dev->name, | 1123 | netdev_info(dev, "switched to %s transceiver\n", |
1127 | (info->phy_id == info->eth_phy) ? "ethernet" : "PNA"); | 1124 | (info->phy_id == info->eth_phy) ? "ethernet" : "PNA"); |
1128 | mdio_write(mii_addr, info->phy_id, 0, | 1125 | mdio_write(mii_addr, info->phy_id, 0, |
1129 | (info->phy_id == info->eth_phy) ? 0x1000 : 0); | 1126 | (info->phy_id == info->eth_phy) ? 0x1000 : 0); |
@@ -1171,9 +1168,9 @@ static void dma_get_8390_hdr(struct net_device *dev, | |||
1171 | unsigned int nic_base = dev->base_addr; | 1168 | unsigned int nic_base = dev->base_addr; |
1172 | 1169 | ||
1173 | if (ei_status.dmaing) { | 1170 | if (ei_status.dmaing) { |
1174 | printk(KERN_NOTICE "%s: DMAing conflict in dma_block_input." | 1171 | netdev_notice(dev, "DMAing conflict in dma_block_input." |
1175 | "[DMAstat:%1x][irqlock:%1x]\n", | 1172 | "[DMAstat:%1x][irqlock:%1x]\n", |
1176 | dev->name, ei_status.dmaing, ei_status.irqlock); | 1173 | ei_status.dmaing, ei_status.irqlock); |
1177 | return; | 1174 | return; |
1178 | } | 1175 | } |
1179 | 1176 | ||
@@ -1204,11 +1201,11 @@ static void dma_block_input(struct net_device *dev, int count, | |||
1204 | char *buf = skb->data; | 1201 | char *buf = skb->data; |
1205 | 1202 | ||
1206 | if ((ei_debug > 4) && (count != 4)) | 1203 | if ((ei_debug > 4) && (count != 4)) |
1207 | pr_debug("%s: [bi=%d]\n", dev->name, count+4); | 1204 | netdev_dbg(dev, "[bi=%d]\n", count+4); |
1208 | if (ei_status.dmaing) { | 1205 | if (ei_status.dmaing) { |
1209 | printk(KERN_NOTICE "%s: DMAing conflict in dma_block_input." | 1206 | netdev_notice(dev, "DMAing conflict in dma_block_input." |
1210 | "[DMAstat:%1x][irqlock:%1x]\n", | 1207 | "[DMAstat:%1x][irqlock:%1x]\n", |
1211 | dev->name, ei_status.dmaing, ei_status.irqlock); | 1208 | ei_status.dmaing, ei_status.irqlock); |
1212 | return; | 1209 | return; |
1213 | } | 1210 | } |
1214 | ei_status.dmaing |= 0x01; | 1211 | ei_status.dmaing |= 0x01; |
@@ -1238,9 +1235,9 @@ static void dma_block_input(struct net_device *dev, int count, | |||
1238 | break; | 1235 | break; |
1239 | } while (--tries > 0); | 1236 | } while (--tries > 0); |
1240 | if (tries <= 0) | 1237 | if (tries <= 0) |
1241 | printk(KERN_NOTICE "%s: RX transfer address mismatch," | 1238 | netdev_notice(dev, "RX transfer address mismatch," |
1242 | "%#4.4x (expected) vs. %#4.4x (actual).\n", | 1239 | "%#4.4x (expected) vs. %#4.4x (actual).\n", |
1243 | dev->name, ring_offset + xfer_count, addr); | 1240 | ring_offset + xfer_count, addr); |
1244 | } | 1241 | } |
1245 | #endif | 1242 | #endif |
1246 | outb_p(ENISR_RDC, nic_base + EN0_ISR); /* Ack intr. */ | 1243 | 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 | 1258 | ||
1262 | #ifdef PCMCIA_DEBUG | 1259 | #ifdef PCMCIA_DEBUG |
1263 | if (ei_debug > 4) | 1260 | if (ei_debug > 4) |
1264 | printk(KERN_DEBUG "%s: [bo=%d]\n", dev->name, count); | 1261 | netdev_dbg(dev, "[bo=%d]\n", count); |
1265 | #endif | 1262 | #endif |
1266 | 1263 | ||
1267 | /* Round the count up for word writes. Do we need to do this? | 1264 | /* 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 | if (count & 0x01) | 1267 | if (count & 0x01) |
1271 | count++; | 1268 | count++; |
1272 | if (ei_status.dmaing) { | 1269 | if (ei_status.dmaing) { |
1273 | printk(KERN_NOTICE "%s: DMAing conflict in dma_block_output." | 1270 | netdev_notice(dev, "DMAing conflict in dma_block_output." |
1274 | "[DMAstat:%1x][irqlock:%1x]\n", | 1271 | "[DMAstat:%1x][irqlock:%1x]\n", |
1275 | dev->name, ei_status.dmaing, ei_status.irqlock); | 1272 | ei_status.dmaing, ei_status.irqlock); |
1276 | return; | 1273 | return; |
1277 | } | 1274 | } |
1278 | ei_status.dmaing |= 0x01; | 1275 | ei_status.dmaing |= 0x01; |
@@ -1309,9 +1306,9 @@ static void dma_block_output(struct net_device *dev, int count, | |||
1309 | break; | 1306 | break; |
1310 | } while (--tries > 0); | 1307 | } while (--tries > 0); |
1311 | if (tries <= 0) { | 1308 | if (tries <= 0) { |
1312 | printk(KERN_NOTICE "%s: Tx packet transfer address mismatch," | 1309 | netdev_notice(dev, "Tx packet transfer address mismatch," |
1313 | "%#4.4x (expected) vs. %#4.4x (actual).\n", | 1310 | "%#4.4x (expected) vs. %#4.4x (actual).\n", |
1314 | dev->name, (start_page << 8) + count, addr); | 1311 | (start_page << 8) + count, addr); |
1315 | if (retries++ == 0) | 1312 | if (retries++ == 0) |
1316 | goto retry; | 1313 | goto retry; |
1317 | } | 1314 | } |
@@ -1320,8 +1317,7 @@ static void dma_block_output(struct net_device *dev, int count, | |||
1320 | 1317 | ||
1321 | while ((inb_p(nic_base + EN0_ISR) & ENISR_RDC) == 0) | 1318 | while ((inb_p(nic_base + EN0_ISR) & ENISR_RDC) == 0) |
1322 | if (time_after(jiffies, dma_start + PCNET_RDC_TIMEOUT)) { | 1319 | if (time_after(jiffies, dma_start + PCNET_RDC_TIMEOUT)) { |
1323 | printk(KERN_NOTICE "%s: timeout waiting for Tx RDC.\n", | 1320 | netdev_notice(dev, "timeout waiting for Tx RDC.\n"); |
1324 | dev->name); | ||
1325 | pcnet_reset_8390(dev); | 1321 | pcnet_reset_8390(dev); |
1326 | NS8390_init(dev, 1); | 1322 | NS8390_init(dev, 1); |
1327 | break; | 1323 | break; |