aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/3c59x.c
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-05-26 08:35:26 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-26 23:35:03 -0400
commit39738e161f7315bfa8f31a91d2262f93d818a7cd (patch)
tree97777f397e4b2ef76a44d8eb539b2c3e39718337 /drivers/net/3c59x.c
parent646cdb32831eebe8c2f742c293d0d266326854d9 (diff)
3c5xx: convert printk() to pr_<foo>()
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/3c59x.c')
-rw-r--r--drivers/net/3c59x.c214
1 files changed, 104 insertions, 110 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index c56698402420..a6e8a2da3bcd 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -828,14 +828,14 @@ static int vortex_resume(struct pci_dev *pdev)
828 pci_restore_state(pdev); 828 pci_restore_state(pdev);
829 err = pci_enable_device(pdev); 829 err = pci_enable_device(pdev);
830 if (err) { 830 if (err) {
831 printk(KERN_WARNING "%s: Could not enable device \n", 831 pr_warning("%s: Could not enable device\n",
832 dev->name); 832 dev->name);
833 return err; 833 return err;
834 } 834 }
835 pci_set_master(pdev); 835 pci_set_master(pdev);
836 if (request_irq(dev->irq, vp->full_bus_master_rx ? 836 if (request_irq(dev->irq, vp->full_bus_master_rx ?
837 &boomerang_interrupt : &vortex_interrupt, IRQF_SHARED, dev->name, dev)) { 837 &boomerang_interrupt : &vortex_interrupt, IRQF_SHARED, dev->name, dev)) {
838 printk(KERN_WARNING "%s: Could not reserve IRQ %d\n", dev->name, dev->irq); 838 pr_warning("%s: Could not reserve IRQ %d\n", dev->name, dev->irq);
839 pci_disable_device(pdev); 839 pci_disable_device(pdev);
840 return -EBUSY; 840 return -EBUSY;
841 } 841 }
@@ -894,7 +894,7 @@ static int __devexit vortex_eisa_remove(struct device *device)
894 dev = eisa_get_drvdata(edev); 894 dev = eisa_get_drvdata(edev);
895 895
896 if (!dev) { 896 if (!dev) {
897 printk("vortex_eisa_remove called for Compaq device!\n"); 897 pr_err("vortex_eisa_remove called for Compaq device!\n");
898 BUG(); 898 BUG();
899 } 899 }
900 900
@@ -1051,7 +1051,7 @@ static int __devinit vortex_probe1(struct device *gendev,
1051 struct eisa_device *edev = NULL; 1051 struct eisa_device *edev = NULL;
1052 1052
1053 if (!printed_version) { 1053 if (!printed_version) {
1054 printk (version); 1054 pr_info("%s", version);
1055 printed_version = 1; 1055 printed_version = 1;
1056 } 1056 }
1057 1057
@@ -1068,7 +1068,7 @@ static int __devinit vortex_probe1(struct device *gendev,
1068 dev = alloc_etherdev(sizeof(*vp)); 1068 dev = alloc_etherdev(sizeof(*vp));
1069 retval = -ENOMEM; 1069 retval = -ENOMEM;
1070 if (!dev) { 1070 if (!dev) {
1071 printk (KERN_ERR PFX "unable to allocate etherdev, aborting\n"); 1071 pr_err(PFX "unable to allocate etherdev, aborting\n");
1072 goto out; 1072 goto out;
1073 } 1073 }
1074 SET_NETDEV_DEV(dev, gendev); 1074 SET_NETDEV_DEV(dev, gendev);
@@ -1100,9 +1100,9 @@ static int __devinit vortex_probe1(struct device *gendev,
1100 1100
1101 print_info = (vortex_debug > 1); 1101 print_info = (vortex_debug > 1);
1102 if (print_info) 1102 if (print_info)
1103 printk (KERN_INFO "See Documentation/networking/vortex.txt\n"); 1103 pr_info("See Documentation/networking/vortex.txt\n");
1104 1104
1105 printk(KERN_INFO "%s: 3Com %s %s at %p.\n", 1105 pr_info("%s: 3Com %s %s at %p.\n",
1106 print_name, 1106 print_name,
1107 pdev ? "PCI" : "EISA", 1107 pdev ? "PCI" : "EISA",
1108 vci->name, 1108 vci->name,
@@ -1144,10 +1144,9 @@ static int __devinit vortex_probe1(struct device *gendev,
1144 chip only. */ 1144 chip only. */
1145 pci_read_config_byte(pdev, PCI_LATENCY_TIMER, &pci_latency); 1145 pci_read_config_byte(pdev, PCI_LATENCY_TIMER, &pci_latency);
1146 if (pci_latency < new_latency) { 1146 if (pci_latency < new_latency) {
1147 printk(KERN_INFO "%s: Overriding PCI latency" 1147 pr_info("%s: Overriding PCI latency timer (CFLT) setting of %d, new value is %d.\n",
1148 " timer (CFLT) setting of %d, new value is %d.\n",
1149 print_name, pci_latency, new_latency); 1148 print_name, pci_latency, new_latency);
1150 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, new_latency); 1149 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, new_latency);
1151 } 1150 }
1152 } 1151 }
1153 } 1152 }
@@ -1236,17 +1235,17 @@ static int __devinit vortex_probe1(struct device *gendev,
1236 checksum = (checksum ^ (checksum >> 8)) & 0xff; 1235 checksum = (checksum ^ (checksum >> 8)) & 0xff;
1237 } 1236 }
1238 if ((checksum != 0x00) && !(vci->drv_flags & IS_TORNADO)) 1237 if ((checksum != 0x00) && !(vci->drv_flags & IS_TORNADO))
1239 printk(" ***INVALID CHECKSUM %4.4x*** ", checksum); 1238 pr_cont(" ***INVALID CHECKSUM %4.4x*** ", checksum);
1240 for (i = 0; i < 3; i++) 1239 for (i = 0; i < 3; i++)
1241 ((__be16 *)dev->dev_addr)[i] = htons(eeprom[i + 10]); 1240 ((__be16 *)dev->dev_addr)[i] = htons(eeprom[i + 10]);
1242 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); 1241 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
1243 if (print_info) 1242 if (print_info)
1244 printk(" %pM", dev->dev_addr); 1243 pr_cont(" %pM", dev->dev_addr);
1245 /* Unfortunately an all zero eeprom passes the checksum and this 1244 /* Unfortunately an all zero eeprom passes the checksum and this
1246 gets found in the wild in failure cases. Crypto is hard 8) */ 1245 gets found in the wild in failure cases. Crypto is hard 8) */
1247 if (!is_valid_ether_addr(dev->dev_addr)) { 1246 if (!is_valid_ether_addr(dev->dev_addr)) {
1248 retval = -EINVAL; 1247 retval = -EINVAL;
1249 printk(KERN_ERR "*** EEPROM MAC address is invalid.\n"); 1248 pr_err("*** EEPROM MAC address is invalid.\n");
1250 goto free_ring; /* With every pack */ 1249 goto free_ring; /* With every pack */
1251 } 1250 }
1252 EL3WINDOW(2); 1251 EL3WINDOW(2);
@@ -1254,17 +1253,17 @@ static int __devinit vortex_probe1(struct device *gendev,
1254 iowrite8(dev->dev_addr[i], ioaddr + i); 1253 iowrite8(dev->dev_addr[i], ioaddr + i);
1255 1254
1256 if (print_info) 1255 if (print_info)
1257 printk(", IRQ %d\n", dev->irq); 1256 pr_cont(", IRQ %d\n", dev->irq);
1258 /* Tell them about an invalid IRQ. */ 1257 /* Tell them about an invalid IRQ. */
1259 if (dev->irq <= 0 || dev->irq >= nr_irqs) 1258 if (dev->irq <= 0 || dev->irq >= nr_irqs)
1260 printk(KERN_WARNING " *** Warning: IRQ %d is unlikely to work! ***\n", 1259 pr_warning(" *** Warning: IRQ %d is unlikely to work! ***\n",
1261 dev->irq); 1260 dev->irq);
1262 1261
1263 EL3WINDOW(4); 1262 EL3WINDOW(4);
1264 step = (ioread8(ioaddr + Wn4_NetDiag) & 0x1e) >> 1; 1263 step = (ioread8(ioaddr + Wn4_NetDiag) & 0x1e) >> 1;
1265 if (print_info) { 1264 if (print_info) {
1266 printk(KERN_INFO " product code %02x%02x rev %02x.%d date %02d-" 1265 pr_info(" product code %02x%02x rev %02x.%d date %02d-%02d-%02d\n",
1267 "%02d-%02d\n", eeprom[6]&0xff, eeprom[6]>>8, eeprom[0x14], 1266 eeprom[6]&0xff, eeprom[6]>>8, eeprom[0x14],
1268 step, (eeprom[4]>>5) & 15, eeprom[4] & 31, eeprom[4]>>9); 1267 step, (eeprom[4]>>5) & 15, eeprom[4] & 31, eeprom[4]>>9);
1269 } 1268 }
1270 1269
@@ -1279,8 +1278,7 @@ static int __devinit vortex_probe1(struct device *gendev,
1279 } 1278 }
1280 1279
1281 if (print_info) { 1280 if (print_info) {
1282 printk(KERN_INFO "%s: CardBus functions mapped " 1281 pr_info("%s: CardBus functions mapped %16.16llx->%p\n",
1283 "%16.16llx->%p\n",
1284 print_name, 1282 print_name,
1285 (unsigned long long)pci_resource_start(pdev, 2), 1283 (unsigned long long)pci_resource_start(pdev, 2),
1286 vp->cb_fn_base); 1284 vp->cb_fn_base);
@@ -1307,7 +1305,7 @@ static int __devinit vortex_probe1(struct device *gendev,
1307 if (vp->info1 & 0x8000) { 1305 if (vp->info1 & 0x8000) {
1308 vp->full_duplex = 1; 1306 vp->full_duplex = 1;
1309 if (print_info) 1307 if (print_info)
1310 printk(KERN_INFO "Full duplex capable\n"); 1308 pr_info("Full duplex capable\n");
1311 } 1309 }
1312 1310
1313 { 1311 {
@@ -1319,9 +1317,9 @@ static int __devinit vortex_probe1(struct device *gendev,
1319 vp->available_media = 0x40; 1317 vp->available_media = 0x40;
1320 config = ioread32(ioaddr + Wn3_Config); 1318 config = ioread32(ioaddr + Wn3_Config);
1321 if (print_info) { 1319 if (print_info) {
1322 printk(KERN_DEBUG " Internal config register is %4.4x, " 1320 pr_debug(" Internal config register is %4.4x, transceivers %#x.\n",
1323 "transceivers %#x.\n", config, ioread16(ioaddr + Wn3_Options)); 1321 config, ioread16(ioaddr + Wn3_Options));
1324 printk(KERN_INFO " %dK %s-wide RAM %s Rx:Tx split, %s%s interface.\n", 1322 pr_info(" %dK %s-wide RAM %s Rx:Tx split, %s%s interface.\n",
1325 8 << RAM_SIZE(config), 1323 8 << RAM_SIZE(config),
1326 RAM_WIDTH(config) ? "word" : "byte", 1324 RAM_WIDTH(config) ? "word" : "byte",
1327 ram_split[RAM_SPLIT(config)], 1325 ram_split[RAM_SPLIT(config)],
@@ -1336,7 +1334,7 @@ static int __devinit vortex_probe1(struct device *gendev,
1336 } 1334 }
1337 1335
1338 if (vp->media_override != 7) { 1336 if (vp->media_override != 7) {
1339 printk(KERN_INFO "%s: Media override to transceiver type %d (%s).\n", 1337 pr_info("%s: Media override to transceiver type %d (%s).\n",
1340 print_name, vp->media_override, 1338 print_name, vp->media_override,
1341 media_tbl[vp->media_override].name); 1339 media_tbl[vp->media_override].name);
1342 dev->if_port = vp->media_override; 1340 dev->if_port = vp->media_override;
@@ -1369,8 +1367,8 @@ static int __devinit vortex_probe1(struct device *gendev,
1369 if (mii_status && mii_status != 0xffff) { 1367 if (mii_status && mii_status != 0xffff) {
1370 vp->phys[phy_idx++] = phyx; 1368 vp->phys[phy_idx++] = phyx;
1371 if (print_info) { 1369 if (print_info) {
1372 printk(KERN_INFO " MII transceiver found at address %d," 1370 pr_info(" MII transceiver found at address %d, status %4x.\n",
1373 " status %4x.\n", phyx, mii_status); 1371 phyx, mii_status);
1374 } 1372 }
1375 if ((mii_status & 0x0040) == 0) 1373 if ((mii_status & 0x0040) == 0)
1376 mii_preamble_required++; 1374 mii_preamble_required++;
@@ -1378,7 +1376,7 @@ static int __devinit vortex_probe1(struct device *gendev,
1378 } 1376 }
1379 mii_preamble_required--; 1377 mii_preamble_required--;
1380 if (phy_idx == 0) { 1378 if (phy_idx == 0) {
1381 printk(KERN_WARNING" ***WARNING*** No MII transceivers found!\n"); 1379 pr_warning(" ***WARNING*** No MII transceivers found!\n");
1382 vp->phys[0] = 24; 1380 vp->phys[0] = 24;
1383 } else { 1381 } else {
1384 vp->advertising = mdio_read(dev, vp->phys[0], MII_ADVERTISE); 1382 vp->advertising = mdio_read(dev, vp->phys[0], MII_ADVERTISE);
@@ -1394,7 +1392,7 @@ static int __devinit vortex_probe1(struct device *gendev,
1394 if (vp->capabilities & CapBusMaster) { 1392 if (vp->capabilities & CapBusMaster) {
1395 vp->full_bus_master_tx = 1; 1393 vp->full_bus_master_tx = 1;
1396 if (print_info) { 1394 if (print_info) {
1397 printk(KERN_INFO " Enabling bus-master transmits and %s receives.\n", 1395 pr_info(" Enabling bus-master transmits and %s receives.\n",
1398 (vp->info2 & 1) ? "early" : "whole-frame" ); 1396 (vp->info2 & 1) ? "early" : "whole-frame" );
1399 } 1397 }
1400 vp->full_bus_master_rx = (vp->info2 & 1) ? 1 : 2; 1398 vp->full_bus_master_rx = (vp->info2 & 1) ? 1 : 2;
@@ -1414,7 +1412,7 @@ static int __devinit vortex_probe1(struct device *gendev,
1414 dev->netdev_ops = &vortex_netdev_ops; 1412 dev->netdev_ops = &vortex_netdev_ops;
1415 1413
1416 if (print_info) { 1414 if (print_info) {
1417 printk(KERN_INFO "%s: scatter/gather %sabled. h/w checksums %sabled\n", 1415 pr_info("%s: scatter/gather %sabled. h/w checksums %sabled\n",
1418 print_name, 1416 print_name,
1419 (dev->features & NETIF_F_SG) ? "en":"dis", 1417 (dev->features & NETIF_F_SG) ? "en":"dis",
1420 (dev->features & NETIF_F_IP_CSUM) ? "en":"dis"); 1418 (dev->features & NETIF_F_IP_CSUM) ? "en":"dis");
@@ -1442,7 +1440,7 @@ free_region:
1442 if (vp->must_free_region) 1440 if (vp->must_free_region)
1443 release_region(dev->base_addr, vci->io_size); 1441 release_region(dev->base_addr, vci->io_size);
1444 free_netdev(dev); 1442 free_netdev(dev);
1445 printk(KERN_ERR PFX "vortex_probe1 fails. Returns %d\n", retval); 1443 pr_err(PFX "vortex_probe1 fails. Returns %d\n", retval);
1446out: 1444out:
1447 return retval; 1445 return retval;
1448} 1446}
@@ -1464,13 +1462,13 @@ issue_and_wait(struct net_device *dev, int cmd)
1464 for (i = 0; i < 100000; i++) { 1462 for (i = 0; i < 100000; i++) {
1465 if (!(ioread16(ioaddr + EL3_STATUS) & CmdInProgress)) { 1463 if (!(ioread16(ioaddr + EL3_STATUS) & CmdInProgress)) {
1466 if (vortex_debug > 1) 1464 if (vortex_debug > 1)
1467 printk(KERN_INFO "%s: command 0x%04x took %d usecs\n", 1465 pr_info("%s: command 0x%04x took %d usecs\n",
1468 dev->name, cmd, i * 10); 1466 dev->name, cmd, i * 10);
1469 return; 1467 return;
1470 } 1468 }
1471 udelay(10); 1469 udelay(10);
1472 } 1470 }
1473 printk(KERN_ERR "%s: command 0x%04x did not complete! Status=0x%x\n", 1471 pr_err("%s: command 0x%04x did not complete! Status=0x%x\n",
1474 dev->name, cmd, ioread16(ioaddr + EL3_STATUS)); 1472 dev->name, cmd, ioread16(ioaddr + EL3_STATUS));
1475} 1473}
1476 1474
@@ -1480,7 +1478,7 @@ vortex_set_duplex(struct net_device *dev)
1480 struct vortex_private *vp = netdev_priv(dev); 1478 struct vortex_private *vp = netdev_priv(dev);
1481 void __iomem *ioaddr = vp->ioaddr; 1479 void __iomem *ioaddr = vp->ioaddr;
1482 1480
1483 printk(KERN_INFO "%s: setting %s-duplex.\n", 1481 pr_info("%s: setting %s-duplex.\n",
1484 dev->name, (vp->full_duplex) ? "full" : "half"); 1482 dev->name, (vp->full_duplex) ? "full" : "half");
1485 1483
1486 EL3WINDOW(3); 1484 EL3WINDOW(3);
@@ -1522,7 +1520,7 @@ vortex_up(struct net_device *dev)
1522 pci_restore_state(VORTEX_PCI(vp)); 1520 pci_restore_state(VORTEX_PCI(vp));
1523 err = pci_enable_device(VORTEX_PCI(vp)); 1521 err = pci_enable_device(VORTEX_PCI(vp));
1524 if (err) { 1522 if (err) {
1525 printk(KERN_WARNING "%s: Could not enable device \n", 1523 pr_warning("%s: Could not enable device\n",
1526 dev->name); 1524 dev->name);
1527 goto err_out; 1525 goto err_out;
1528 } 1526 }
@@ -1533,14 +1531,14 @@ vortex_up(struct net_device *dev)
1533 config = ioread32(ioaddr + Wn3_Config); 1531 config = ioread32(ioaddr + Wn3_Config);
1534 1532
1535 if (vp->media_override != 7) { 1533 if (vp->media_override != 7) {
1536 printk(KERN_INFO "%s: Media override to transceiver %d (%s).\n", 1534 pr_info("%s: Media override to transceiver %d (%s).\n",
1537 dev->name, vp->media_override, 1535 dev->name, vp->media_override,
1538 media_tbl[vp->media_override].name); 1536 media_tbl[vp->media_override].name);
1539 dev->if_port = vp->media_override; 1537 dev->if_port = vp->media_override;
1540 } else if (vp->autoselect) { 1538 } else if (vp->autoselect) {
1541 if (vp->has_nway) { 1539 if (vp->has_nway) {
1542 if (vortex_debug > 1) 1540 if (vortex_debug > 1)
1543 printk(KERN_INFO "%s: using NWAY device table, not %d\n", 1541 pr_info("%s: using NWAY device table, not %d\n",
1544 dev->name, dev->if_port); 1542 dev->name, dev->if_port);
1545 dev->if_port = XCVR_NWAY; 1543 dev->if_port = XCVR_NWAY;
1546 } else { 1544 } else {
@@ -1549,13 +1547,13 @@ vortex_up(struct net_device *dev)
1549 while (! (vp->available_media & media_tbl[dev->if_port].mask)) 1547 while (! (vp->available_media & media_tbl[dev->if_port].mask))
1550 dev->if_port = media_tbl[dev->if_port].next; 1548 dev->if_port = media_tbl[dev->if_port].next;
1551 if (vortex_debug > 1) 1549 if (vortex_debug > 1)
1552 printk(KERN_INFO "%s: first available media type: %s\n", 1550 pr_info("%s: first available media type: %s\n",
1553 dev->name, media_tbl[dev->if_port].name); 1551 dev->name, media_tbl[dev->if_port].name);
1554 } 1552 }
1555 } else { 1553 } else {
1556 dev->if_port = vp->default_media; 1554 dev->if_port = vp->default_media;
1557 if (vortex_debug > 1) 1555 if (vortex_debug > 1)
1558 printk(KERN_INFO "%s: using default media %s\n", 1556 pr_info("%s: using default media %s\n",
1559 dev->name, media_tbl[dev->if_port].name); 1557 dev->name, media_tbl[dev->if_port].name);
1560 } 1558 }
1561 1559
@@ -1570,13 +1568,13 @@ vortex_up(struct net_device *dev)
1570 vp->rx_oom_timer.function = rx_oom_timer; 1568 vp->rx_oom_timer.function = rx_oom_timer;
1571 1569
1572 if (vortex_debug > 1) 1570 if (vortex_debug > 1)
1573 printk(KERN_DEBUG "%s: Initial media type %s.\n", 1571 pr_debug("%s: Initial media type %s.\n",
1574 dev->name, media_tbl[dev->if_port].name); 1572 dev->name, media_tbl[dev->if_port].name);
1575 1573
1576 vp->full_duplex = vp->mii.force_media; 1574 vp->full_duplex = vp->mii.force_media;
1577 config = BFINS(config, dev->if_port, 20, 4); 1575 config = BFINS(config, dev->if_port, 20, 4);
1578 if (vortex_debug > 6) 1576 if (vortex_debug > 6)
1579 printk(KERN_DEBUG "vortex_up(): writing 0x%x to InternalConfig\n", config); 1577 pr_debug("vortex_up(): writing 0x%x to InternalConfig\n", config);
1580 iowrite32(config, ioaddr + Wn3_Config); 1578 iowrite32(config, ioaddr + Wn3_Config);
1581 1579
1582 if (dev->if_port == XCVR_MII || dev->if_port == XCVR_NWAY) { 1580 if (dev->if_port == XCVR_MII || dev->if_port == XCVR_NWAY) {
@@ -1602,7 +1600,7 @@ vortex_up(struct net_device *dev)
1602 1600
1603 if (vortex_debug > 1) { 1601 if (vortex_debug > 1) {
1604 EL3WINDOW(4); 1602 EL3WINDOW(4);
1605 printk(KERN_DEBUG "%s: vortex_up() irq %d media status %4.4x.\n", 1603 pr_debug("%s: vortex_up() irq %d media status %4.4x.\n",
1606 dev->name, dev->irq, ioread16(ioaddr + Wn4_Media)); 1604 dev->name, dev->irq, ioread16(ioaddr + Wn4_Media));
1607 } 1605 }
1608 1606
@@ -1704,13 +1702,13 @@ vortex_open(struct net_device *dev)
1704 /* Use the now-standard shared IRQ implementation. */ 1702 /* Use the now-standard shared IRQ implementation. */
1705 if ((retval = request_irq(dev->irq, vp->full_bus_master_rx ? 1703 if ((retval = request_irq(dev->irq, vp->full_bus_master_rx ?
1706 &boomerang_interrupt : &vortex_interrupt, IRQF_SHARED, dev->name, dev))) { 1704 &boomerang_interrupt : &vortex_interrupt, IRQF_SHARED, dev->name, dev))) {
1707 printk(KERN_ERR "%s: Could not reserve IRQ %d\n", dev->name, dev->irq); 1705 pr_err("%s: Could not reserve IRQ %d\n", dev->name, dev->irq);
1708 goto err; 1706 goto err;
1709 } 1707 }
1710 1708
1711 if (vp->full_bus_master_rx) { /* Boomerang bus master. */ 1709 if (vp->full_bus_master_rx) { /* Boomerang bus master. */
1712 if (vortex_debug > 2) 1710 if (vortex_debug > 2)
1713 printk(KERN_DEBUG "%s: Filling in the Rx ring.\n", dev->name); 1711 pr_debug("%s: Filling in the Rx ring.\n", dev->name);
1714 for (i = 0; i < RX_RING_SIZE; i++) { 1712 for (i = 0; i < RX_RING_SIZE; i++) {
1715 struct sk_buff *skb; 1713 struct sk_buff *skb;
1716 vp->rx_ring[i].next = cpu_to_le32(vp->rx_ring_dma + sizeof(struct boom_rx_desc) * (i+1)); 1714 vp->rx_ring[i].next = cpu_to_le32(vp->rx_ring_dma + sizeof(struct boom_rx_desc) * (i+1));
@@ -1728,7 +1726,7 @@ vortex_open(struct net_device *dev)
1728 } 1726 }
1729 if (i != RX_RING_SIZE) { 1727 if (i != RX_RING_SIZE) {
1730 int j; 1728 int j;
1731 printk(KERN_EMERG "%s: no memory for rx ring\n", dev->name); 1729 pr_emerg("%s: no memory for rx ring\n", dev->name);
1732 for (j = 0; j < i; j++) { 1730 for (j = 0; j < i; j++) {
1733 if (vp->rx_skbuff[j]) { 1731 if (vp->rx_skbuff[j]) {
1734 dev_kfree_skb(vp->rx_skbuff[j]); 1732 dev_kfree_skb(vp->rx_skbuff[j]);
@@ -1750,7 +1748,7 @@ err_free_irq:
1750 free_irq(dev->irq, dev); 1748 free_irq(dev->irq, dev);
1751err: 1749err:
1752 if (vortex_debug > 1) 1750 if (vortex_debug > 1)
1753 printk(KERN_ERR "%s: vortex_open() fails: returning %d\n", dev->name, retval); 1751 pr_err("%s: vortex_open() fails: returning %d\n", dev->name, retval);
1754out: 1752out:
1755 return retval; 1753 return retval;
1756} 1754}
@@ -1766,9 +1764,9 @@ vortex_timer(unsigned long data)
1766 int media_status, old_window; 1764 int media_status, old_window;
1767 1765
1768 if (vortex_debug > 2) { 1766 if (vortex_debug > 2) {
1769 printk(KERN_DEBUG "%s: Media selection timer tick happened, %s.\n", 1767 pr_debug("%s: Media selection timer tick happened, %s.\n",
1770 dev->name, media_tbl[dev->if_port].name); 1768 dev->name, media_tbl[dev->if_port].name);
1771 printk(KERN_DEBUG "dev->watchdog_timeo=%d\n", dev->watchdog_timeo); 1769 pr_debug("dev->watchdog_timeo=%d\n", dev->watchdog_timeo);
1772 } 1770 }
1773 1771
1774 disable_irq_lockdep(dev->irq); 1772 disable_irq_lockdep(dev->irq);
@@ -1781,12 +1779,12 @@ vortex_timer(unsigned long data)
1781 netif_carrier_on(dev); 1779 netif_carrier_on(dev);
1782 ok = 1; 1780 ok = 1;
1783 if (vortex_debug > 1) 1781 if (vortex_debug > 1)
1784 printk(KERN_DEBUG "%s: Media %s has link beat, %x.\n", 1782 pr_debug("%s: Media %s has link beat, %x.\n",
1785 dev->name, media_tbl[dev->if_port].name, media_status); 1783 dev->name, media_tbl[dev->if_port].name, media_status);
1786 } else { 1784 } else {
1787 netif_carrier_off(dev); 1785 netif_carrier_off(dev);
1788 if (vortex_debug > 1) { 1786 if (vortex_debug > 1) {
1789 printk(KERN_DEBUG "%s: Media %s has no link beat, %x.\n", 1787 pr_debug("%s: Media %s has no link beat, %x.\n",
1790 dev->name, media_tbl[dev->if_port].name, media_status); 1788 dev->name, media_tbl[dev->if_port].name, media_status);
1791 } 1789 }
1792 } 1790 }
@@ -1802,7 +1800,7 @@ vortex_timer(unsigned long data)
1802 break; 1800 break;
1803 default: /* Other media types handled by Tx timeouts. */ 1801 default: /* Other media types handled by Tx timeouts. */
1804 if (vortex_debug > 1) 1802 if (vortex_debug > 1)
1805 printk(KERN_DEBUG "%s: Media %s has no indication, %x.\n", 1803 pr_debug("%s: Media %s has no indication, %x.\n",
1806 dev->name, media_tbl[dev->if_port].name, media_status); 1804 dev->name, media_tbl[dev->if_port].name, media_status);
1807 ok = 1; 1805 ok = 1;
1808 } 1806 }
@@ -1822,13 +1820,11 @@ vortex_timer(unsigned long data)
1822 if (dev->if_port == XCVR_Default) { /* Go back to default. */ 1820 if (dev->if_port == XCVR_Default) { /* Go back to default. */
1823 dev->if_port = vp->default_media; 1821 dev->if_port = vp->default_media;
1824 if (vortex_debug > 1) 1822 if (vortex_debug > 1)
1825 printk(KERN_DEBUG "%s: Media selection failing, using default " 1823 pr_debug("%s: Media selection failing, using default %s port.\n",
1826 "%s port.\n",
1827 dev->name, media_tbl[dev->if_port].name); 1824 dev->name, media_tbl[dev->if_port].name);
1828 } else { 1825 } else {
1829 if (vortex_debug > 1) 1826 if (vortex_debug > 1)
1830 printk(KERN_DEBUG "%s: Media selection failed, now trying " 1827 pr_debug("%s: Media selection failed, now trying %s port.\n",
1831 "%s port.\n",
1832 dev->name, media_tbl[dev->if_port].name); 1828 dev->name, media_tbl[dev->if_port].name);
1833 next_tick = media_tbl[dev->if_port].wait; 1829 next_tick = media_tbl[dev->if_port].wait;
1834 } 1830 }
@@ -1843,13 +1839,13 @@ vortex_timer(unsigned long data)
1843 iowrite16(dev->if_port == XCVR_10base2 ? StartCoax : StopCoax, 1839 iowrite16(dev->if_port == XCVR_10base2 ? StartCoax : StopCoax,
1844 ioaddr + EL3_CMD); 1840 ioaddr + EL3_CMD);
1845 if (vortex_debug > 1) 1841 if (vortex_debug > 1)
1846 printk(KERN_DEBUG "wrote 0x%08x to Wn3_Config\n", config); 1842 pr_debug("wrote 0x%08x to Wn3_Config\n", config);
1847 /* AKPM: FIXME: Should reset Rx & Tx here. P60 of 3c90xc.pdf */ 1843 /* AKPM: FIXME: Should reset Rx & Tx here. P60 of 3c90xc.pdf */
1848 } 1844 }
1849 1845
1850leave_media_alone: 1846leave_media_alone:
1851 if (vortex_debug > 2) 1847 if (vortex_debug > 2)
1852 printk(KERN_DEBUG "%s: Media selection timer finished, %s.\n", 1848 pr_debug("%s: Media selection timer finished, %s.\n",
1853 dev->name, media_tbl[dev->if_port].name); 1849 dev->name, media_tbl[dev->if_port].name);
1854 1850
1855 EL3WINDOW(old_window); 1851 EL3WINDOW(old_window);
@@ -1865,21 +1861,21 @@ static void vortex_tx_timeout(struct net_device *dev)
1865 struct vortex_private *vp = netdev_priv(dev); 1861 struct vortex_private *vp = netdev_priv(dev);
1866 void __iomem *ioaddr = vp->ioaddr; 1862 void __iomem *ioaddr = vp->ioaddr;
1867 1863
1868 printk(KERN_ERR "%s: transmit timed out, tx_status %2.2x status %4.4x.\n", 1864 pr_err("%s: transmit timed out, tx_status %2.2x status %4.4x.\n",
1869 dev->name, ioread8(ioaddr + TxStatus), 1865 dev->name, ioread8(ioaddr + TxStatus),
1870 ioread16(ioaddr + EL3_STATUS)); 1866 ioread16(ioaddr + EL3_STATUS));
1871 EL3WINDOW(4); 1867 EL3WINDOW(4);
1872 printk(KERN_ERR " diagnostics: net %04x media %04x dma %08x fifo %04x\n", 1868 pr_err(" diagnostics: net %04x media %04x dma %08x fifo %04x\n",
1873 ioread16(ioaddr + Wn4_NetDiag), 1869 ioread16(ioaddr + Wn4_NetDiag),
1874 ioread16(ioaddr + Wn4_Media), 1870 ioread16(ioaddr + Wn4_Media),
1875 ioread32(ioaddr + PktStatus), 1871 ioread32(ioaddr + PktStatus),
1876 ioread16(ioaddr + Wn4_FIFODiag)); 1872 ioread16(ioaddr + Wn4_FIFODiag));
1877 /* Slight code bloat to be user friendly. */ 1873 /* Slight code bloat to be user friendly. */
1878 if ((ioread8(ioaddr + TxStatus) & 0x88) == 0x88) 1874 if ((ioread8(ioaddr + TxStatus) & 0x88) == 0x88)
1879 printk(KERN_ERR "%s: Transmitter encountered 16 collisions --" 1875 pr_err("%s: Transmitter encountered 16 collisions --"
1880 " network cable problem?\n", dev->name); 1876 " network cable problem?\n", dev->name);
1881 if (ioread16(ioaddr + EL3_STATUS) & IntLatch) { 1877 if (ioread16(ioaddr + EL3_STATUS) & IntLatch) {
1882 printk(KERN_ERR "%s: Interrupt posted but not delivered --" 1878 pr_err("%s: Interrupt posted but not delivered --"
1883 " IRQ blocked by another device?\n", dev->name); 1879 " IRQ blocked by another device?\n", dev->name);
1884 /* Bad idea here.. but we might as well handle a few events. */ 1880 /* Bad idea here.. but we might as well handle a few events. */
1885 { 1881 {
@@ -1903,7 +1899,7 @@ static void vortex_tx_timeout(struct net_device *dev)
1903 1899
1904 dev->stats.tx_errors++; 1900 dev->stats.tx_errors++;
1905 if (vp->full_bus_master_tx) { 1901 if (vp->full_bus_master_tx) {
1906 printk(KERN_DEBUG "%s: Resetting the Tx ring pointer.\n", dev->name); 1902 pr_debug("%s: Resetting the Tx ring pointer.\n", dev->name);
1907 if (vp->cur_tx - vp->dirty_tx > 0 && ioread32(ioaddr + DownListPtr) == 0) 1903 if (vp->cur_tx - vp->dirty_tx > 0 && ioread32(ioaddr + DownListPtr) == 0)
1908 iowrite32(vp->tx_ring_dma + (vp->dirty_tx % TX_RING_SIZE) * sizeof(struct boom_tx_desc), 1904 iowrite32(vp->tx_ring_dma + (vp->dirty_tx % TX_RING_SIZE) * sizeof(struct boom_tx_desc),
1909 ioaddr + DownListPtr); 1905 ioaddr + DownListPtr);
@@ -1938,7 +1934,7 @@ vortex_error(struct net_device *dev, int status)
1938 unsigned char tx_status = 0; 1934 unsigned char tx_status = 0;
1939 1935
1940 if (vortex_debug > 2) { 1936 if (vortex_debug > 2) {
1941 printk(KERN_ERR "%s: vortex_error(), status=0x%x\n", dev->name, status); 1937 pr_err("%s: vortex_error(), status=0x%x\n", dev->name, status);
1942 } 1938 }
1943 1939
1944 if (status & TxComplete) { /* Really "TxError" for us. */ 1940 if (status & TxComplete) { /* Really "TxError" for us. */
@@ -1946,10 +1942,10 @@ vortex_error(struct net_device *dev, int status)
1946 /* Presumably a tx-timeout. We must merely re-enable. */ 1942 /* Presumably a tx-timeout. We must merely re-enable. */
1947 if (vortex_debug > 2 1943 if (vortex_debug > 2
1948 || (tx_status != 0x88 && vortex_debug > 0)) { 1944 || (tx_status != 0x88 && vortex_debug > 0)) {
1949 printk(KERN_ERR "%s: Transmit error, Tx status register %2.2x.\n", 1945 pr_err("%s: Transmit error, Tx status register %2.2x.\n",
1950 dev->name, tx_status); 1946 dev->name, tx_status);
1951 if (tx_status == 0x82) { 1947 if (tx_status == 0x82) {
1952 printk(KERN_ERR "Probably a duplex mismatch. See " 1948 pr_err("Probably a duplex mismatch. See "
1953 "Documentation/networking/vortex.txt\n"); 1949 "Documentation/networking/vortex.txt\n");
1954 } 1950 }
1955 dump_tx_ring(dev); 1951 dump_tx_ring(dev);
@@ -1975,13 +1971,13 @@ vortex_error(struct net_device *dev, int status)
1975 if (status & StatsFull) { /* Empty statistics. */ 1971 if (status & StatsFull) { /* Empty statistics. */
1976 static int DoneDidThat; 1972 static int DoneDidThat;
1977 if (vortex_debug > 4) 1973 if (vortex_debug > 4)
1978 printk(KERN_DEBUG "%s: Updating stats.\n", dev->name); 1974 pr_debug("%s: Updating stats.\n", dev->name);
1979 update_stats(ioaddr, dev); 1975 update_stats(ioaddr, dev);
1980 /* HACK: Disable statistics as an interrupt source. */ 1976 /* HACK: Disable statistics as an interrupt source. */
1981 /* This occurs when we have the wrong media type! */ 1977 /* This occurs when we have the wrong media type! */
1982 if (DoneDidThat == 0 && 1978 if (DoneDidThat == 0 &&
1983 ioread16(ioaddr + EL3_STATUS) & StatsFull) { 1979 ioread16(ioaddr + EL3_STATUS) & StatsFull) {
1984 printk(KERN_WARNING "%s: Updating statistics failed, disabling " 1980 pr_warning("%s: Updating statistics failed, disabling "
1985 "stats as an interrupt source.\n", dev->name); 1981 "stats as an interrupt source.\n", dev->name);
1986 EL3WINDOW(5); 1982 EL3WINDOW(5);
1987 iowrite16(SetIntrEnb | (ioread16(ioaddr + 10) & ~StatsFull), ioaddr + EL3_CMD); 1983 iowrite16(SetIntrEnb | (ioread16(ioaddr + 10) & ~StatsFull), ioaddr + EL3_CMD);
@@ -1998,7 +1994,7 @@ vortex_error(struct net_device *dev, int status)
1998 u16 fifo_diag; 1994 u16 fifo_diag;
1999 EL3WINDOW(4); 1995 EL3WINDOW(4);
2000 fifo_diag = ioread16(ioaddr + Wn4_FIFODiag); 1996 fifo_diag = ioread16(ioaddr + Wn4_FIFODiag);
2001 printk(KERN_ERR "%s: Host error, FIFO diagnostic register %4.4x.\n", 1997 pr_err("%s: Host error, FIFO diagnostic register %4.4x.\n",
2002 dev->name, fifo_diag); 1998 dev->name, fifo_diag);
2003 /* Adapter failure requires Tx/Rx reset and reinit. */ 1999 /* Adapter failure requires Tx/Rx reset and reinit. */
2004 if (vp->full_bus_master_tx) { 2000 if (vp->full_bus_master_tx) {
@@ -2006,7 +2002,7 @@ vortex_error(struct net_device *dev, int status)
2006 /* 0x80000000 PCI master abort. */ 2002 /* 0x80000000 PCI master abort. */
2007 /* 0x40000000 PCI target abort. */ 2003 /* 0x40000000 PCI target abort. */
2008 if (vortex_debug) 2004 if (vortex_debug)
2009 printk(KERN_ERR "%s: PCI bus error, bus status %8.8x\n", dev->name, bus_status); 2005 pr_err("%s: PCI bus error, bus status %8.8x\n", dev->name, bus_status);
2010 2006
2011 /* In this case, blow the card away */ 2007 /* In this case, blow the card away */
2012 /* Must not enter D3 or we can't legally issue the reset! */ 2008 /* Must not enter D3 or we can't legally issue the reset! */
@@ -2075,7 +2071,7 @@ vortex_start_xmit(struct sk_buff *skb, struct net_device *dev)
2075 while (--i > 0 && (tx_status = ioread8(ioaddr + TxStatus)) > 0) { 2071 while (--i > 0 && (tx_status = ioread8(ioaddr + TxStatus)) > 0) {
2076 if (tx_status & 0x3C) { /* A Tx-disabling error occurred. */ 2072 if (tx_status & 0x3C) { /* A Tx-disabling error occurred. */
2077 if (vortex_debug > 2) 2073 if (vortex_debug > 2)
2078 printk(KERN_DEBUG "%s: Tx error, status %2.2x.\n", 2074 pr_debug("%s: Tx error, status %2.2x.\n",
2079 dev->name, tx_status); 2075 dev->name, tx_status);
2080 if (tx_status & 0x04) dev->stats.tx_fifo_errors++; 2076 if (tx_status & 0x04) dev->stats.tx_fifo_errors++;
2081 if (tx_status & 0x38) dev->stats.tx_aborted_errors++; 2077 if (tx_status & 0x38) dev->stats.tx_aborted_errors++;
@@ -2101,14 +2097,14 @@ boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev)
2101 unsigned long flags; 2097 unsigned long flags;
2102 2098
2103 if (vortex_debug > 6) { 2099 if (vortex_debug > 6) {
2104 printk(KERN_DEBUG "boomerang_start_xmit()\n"); 2100 pr_debug("boomerang_start_xmit()\n");
2105 printk(KERN_DEBUG "%s: Trying to send a packet, Tx index %d.\n", 2101 pr_debug("%s: Trying to send a packet, Tx index %d.\n",
2106 dev->name, vp->cur_tx); 2102 dev->name, vp->cur_tx);
2107 } 2103 }
2108 2104
2109 if (vp->cur_tx - vp->dirty_tx >= TX_RING_SIZE) { 2105 if (vp->cur_tx - vp->dirty_tx >= TX_RING_SIZE) {
2110 if (vortex_debug > 0) 2106 if (vortex_debug > 0)
2111 printk(KERN_WARNING "%s: BUG! Tx Ring full, refusing to send buffer.\n", 2107 pr_warning("%s: BUG! Tx Ring full, refusing to send buffer.\n",
2112 dev->name); 2108 dev->name);
2113 netif_stop_queue(dev); 2109 netif_stop_queue(dev);
2114 return 1; 2110 return 1;
@@ -2204,7 +2200,7 @@ vortex_interrupt(int irq, void *dev_id)
2204 status = ioread16(ioaddr + EL3_STATUS); 2200 status = ioread16(ioaddr + EL3_STATUS);
2205 2201
2206 if (vortex_debug > 6) 2202 if (vortex_debug > 6)
2207 printk("vortex_interrupt(). status=0x%4x\n", status); 2203 pr_debug("vortex_interrupt(). status=0x%4x\n", status);
2208 2204
2209 if ((status & IntLatch) == 0) 2205 if ((status & IntLatch) == 0)
2210 goto handler_exit; /* No interrupt: shared IRQs cause this */ 2206 goto handler_exit; /* No interrupt: shared IRQs cause this */
@@ -2219,19 +2215,19 @@ vortex_interrupt(int irq, void *dev_id)
2219 goto handler_exit; 2215 goto handler_exit;
2220 2216
2221 if (vortex_debug > 4) 2217 if (vortex_debug > 4)
2222 printk(KERN_DEBUG "%s: interrupt, status %4.4x, latency %d ticks.\n", 2218 pr_debug("%s: interrupt, status %4.4x, latency %d ticks.\n",
2223 dev->name, status, ioread8(ioaddr + Timer)); 2219 dev->name, status, ioread8(ioaddr + Timer));
2224 2220
2225 do { 2221 do {
2226 if (vortex_debug > 5) 2222 if (vortex_debug > 5)
2227 printk(KERN_DEBUG "%s: In interrupt loop, status %4.4x.\n", 2223 pr_debug("%s: In interrupt loop, status %4.4x.\n",
2228 dev->name, status); 2224 dev->name, status);
2229 if (status & RxComplete) 2225 if (status & RxComplete)
2230 vortex_rx(dev); 2226 vortex_rx(dev);
2231 2227
2232 if (status & TxAvailable) { 2228 if (status & TxAvailable) {
2233 if (vortex_debug > 5) 2229 if (vortex_debug > 5)
2234 printk(KERN_DEBUG " TX room bit was handled.\n"); 2230 pr_debug(" TX room bit was handled.\n");
2235 /* There's room in the FIFO for a full-sized packet. */ 2231 /* There's room in the FIFO for a full-sized packet. */
2236 iowrite16(AckIntr | TxAvailable, ioaddr + EL3_CMD); 2232 iowrite16(AckIntr | TxAvailable, ioaddr + EL3_CMD);
2237 netif_wake_queue (dev); 2233 netif_wake_queue (dev);
@@ -2263,8 +2259,8 @@ vortex_interrupt(int irq, void *dev_id)
2263 } 2259 }
2264 2260
2265 if (--work_done < 0) { 2261 if (--work_done < 0) {
2266 printk(KERN_WARNING "%s: Too much work in interrupt, status " 2262 pr_warning("%s: Too much work in interrupt, status %4.4x.\n",
2267 "%4.4x.\n", dev->name, status); 2263 dev->name, status);
2268 /* Disable all pending interrupts. */ 2264 /* Disable all pending interrupts. */
2269 do { 2265 do {
2270 vp->deferred |= status; 2266 vp->deferred |= status;
@@ -2281,7 +2277,7 @@ vortex_interrupt(int irq, void *dev_id)
2281 } while ((status = ioread16(ioaddr + EL3_STATUS)) & (IntLatch | RxComplete)); 2277 } while ((status = ioread16(ioaddr + EL3_STATUS)) & (IntLatch | RxComplete));
2282 2278
2283 if (vortex_debug > 4) 2279 if (vortex_debug > 4)
2284 printk(KERN_DEBUG "%s: exiting interrupt, status %4.4x.\n", 2280 pr_debug("%s: exiting interrupt, status %4.4x.\n",
2285 dev->name, status); 2281 dev->name, status);
2286handler_exit: 2282handler_exit:
2287 spin_unlock(&vp->lock); 2283 spin_unlock(&vp->lock);
@@ -2313,14 +2309,14 @@ boomerang_interrupt(int irq, void *dev_id)
2313 status = ioread16(ioaddr + EL3_STATUS); 2309 status = ioread16(ioaddr + EL3_STATUS);
2314 2310
2315 if (vortex_debug > 6) 2311 if (vortex_debug > 6)
2316 printk(KERN_DEBUG "boomerang_interrupt. status=0x%4x\n", status); 2312 pr_debug("boomerang_interrupt. status=0x%4x\n", status);
2317 2313
2318 if ((status & IntLatch) == 0) 2314 if ((status & IntLatch) == 0)
2319 goto handler_exit; /* No interrupt: shared IRQs can cause this */ 2315 goto handler_exit; /* No interrupt: shared IRQs can cause this */
2320 2316
2321 if (status == 0xffff) { /* h/w no longer present (hotplug)? */ 2317 if (status == 0xffff) { /* h/w no longer present (hotplug)? */
2322 if (vortex_debug > 1) 2318 if (vortex_debug > 1)
2323 printk(KERN_DEBUG "boomerang_interrupt(1): status = 0xffff\n"); 2319 pr_debug("boomerang_interrupt(1): status = 0xffff\n");
2324 goto handler_exit; 2320 goto handler_exit;
2325 } 2321 }
2326 2322
@@ -2330,16 +2326,16 @@ boomerang_interrupt(int irq, void *dev_id)
2330 } 2326 }
2331 2327
2332 if (vortex_debug > 4) 2328 if (vortex_debug > 4)
2333 printk(KERN_DEBUG "%s: interrupt, status %4.4x, latency %d ticks.\n", 2329 pr_debug("%s: interrupt, status %4.4x, latency %d ticks.\n",
2334 dev->name, status, ioread8(ioaddr + Timer)); 2330 dev->name, status, ioread8(ioaddr + Timer));
2335 do { 2331 do {
2336 if (vortex_debug > 5) 2332 if (vortex_debug > 5)
2337 printk(KERN_DEBUG "%s: In interrupt loop, status %4.4x.\n", 2333 pr_debug("%s: In interrupt loop, status %4.4x.\n",
2338 dev->name, status); 2334 dev->name, status);
2339 if (status & UpComplete) { 2335 if (status & UpComplete) {
2340 iowrite16(AckIntr | UpComplete, ioaddr + EL3_CMD); 2336 iowrite16(AckIntr | UpComplete, ioaddr + EL3_CMD);
2341 if (vortex_debug > 5) 2337 if (vortex_debug > 5)
2342 printk(KERN_DEBUG "boomerang_interrupt->boomerang_rx\n"); 2338 pr_debug("boomerang_interrupt->boomerang_rx\n");
2343 boomerang_rx(dev); 2339 boomerang_rx(dev);
2344 } 2340 }
2345 2341
@@ -2374,7 +2370,7 @@ boomerang_interrupt(int irq, void *dev_id)
2374 dev_kfree_skb_irq(skb); 2370 dev_kfree_skb_irq(skb);
2375 vp->tx_skbuff[entry] = NULL; 2371 vp->tx_skbuff[entry] = NULL;
2376 } else { 2372 } else {
2377 printk(KERN_DEBUG "boomerang_interrupt: no skb!\n"); 2373 pr_debug("boomerang_interrupt: no skb!\n");
2378 } 2374 }
2379 /* dev->stats.tx_packets++; Counted below. */ 2375 /* dev->stats.tx_packets++; Counted below. */
2380 dirty_tx++; 2376 dirty_tx++;
@@ -2382,7 +2378,7 @@ boomerang_interrupt(int irq, void *dev_id)
2382 vp->dirty_tx = dirty_tx; 2378 vp->dirty_tx = dirty_tx;
2383 if (vp->cur_tx - dirty_tx <= TX_RING_SIZE - 1) { 2379 if (vp->cur_tx - dirty_tx <= TX_RING_SIZE - 1) {
2384 if (vortex_debug > 6) 2380 if (vortex_debug > 6)
2385 printk(KERN_DEBUG "boomerang_interrupt: wake queue\n"); 2381 pr_debug("boomerang_interrupt: wake queue\n");
2386 netif_wake_queue (dev); 2382 netif_wake_queue (dev);
2387 } 2383 }
2388 } 2384 }
@@ -2392,8 +2388,8 @@ boomerang_interrupt(int irq, void *dev_id)
2392 vortex_error(dev, status); 2388 vortex_error(dev, status);
2393 2389
2394 if (--work_done < 0) { 2390 if (--work_done < 0) {
2395 printk(KERN_WARNING "%s: Too much work in interrupt, status " 2391 pr_warning("%s: Too much work in interrupt, status %4.4x.\n",
2396 "%4.4x.\n", dev->name, status); 2392 dev->name, status);
2397 /* Disable all pending interrupts. */ 2393 /* Disable all pending interrupts. */
2398 do { 2394 do {
2399 vp->deferred |= status; 2395 vp->deferred |= status;
@@ -2413,7 +2409,7 @@ boomerang_interrupt(int irq, void *dev_id)
2413 } while ((status = ioread16(ioaddr + EL3_STATUS)) & IntLatch); 2409 } while ((status = ioread16(ioaddr + EL3_STATUS)) & IntLatch);
2414 2410
2415 if (vortex_debug > 4) 2411 if (vortex_debug > 4)
2416 printk(KERN_DEBUG "%s: exiting interrupt, status %4.4x.\n", 2412 pr_debug("%s: exiting interrupt, status %4.4x.\n",
2417 dev->name, status); 2413 dev->name, status);
2418handler_exit: 2414handler_exit:
2419 spin_unlock(&vp->lock); 2415 spin_unlock(&vp->lock);
@@ -2428,13 +2424,13 @@ static int vortex_rx(struct net_device *dev)
2428 short rx_status; 2424 short rx_status;
2429 2425
2430 if (vortex_debug > 5) 2426 if (vortex_debug > 5)
2431 printk(KERN_DEBUG "vortex_rx(): status %4.4x, rx_status %4.4x.\n", 2427 pr_debug("vortex_rx(): status %4.4x, rx_status %4.4x.\n",
2432 ioread16(ioaddr+EL3_STATUS), ioread16(ioaddr+RxStatus)); 2428 ioread16(ioaddr+EL3_STATUS), ioread16(ioaddr+RxStatus));
2433 while ((rx_status = ioread16(ioaddr + RxStatus)) > 0) { 2429 while ((rx_status = ioread16(ioaddr + RxStatus)) > 0) {
2434 if (rx_status & 0x4000) { /* Error, update stats. */ 2430 if (rx_status & 0x4000) { /* Error, update stats. */
2435 unsigned char rx_error = ioread8(ioaddr + RxErrors); 2431 unsigned char rx_error = ioread8(ioaddr + RxErrors);
2436 if (vortex_debug > 2) 2432 if (vortex_debug > 2)
2437 printk(KERN_DEBUG " Rx error: status %2.2x.\n", rx_error); 2433 pr_debug(" Rx error: status %2.2x.\n", rx_error);
2438 dev->stats.rx_errors++; 2434 dev->stats.rx_errors++;
2439 if (rx_error & 0x01) dev->stats.rx_over_errors++; 2435 if (rx_error & 0x01) dev->stats.rx_over_errors++;
2440 if (rx_error & 0x02) dev->stats.rx_length_errors++; 2436 if (rx_error & 0x02) dev->stats.rx_length_errors++;
@@ -2448,7 +2444,7 @@ static int vortex_rx(struct net_device *dev)
2448 2444
2449 skb = dev_alloc_skb(pkt_len + 5); 2445 skb = dev_alloc_skb(pkt_len + 5);
2450 if (vortex_debug > 4) 2446 if (vortex_debug > 4)
2451 printk(KERN_DEBUG "Receiving packet size %d status %4.4x.\n", 2447 pr_debug("Receiving packet size %d status %4.4x.\n",
2452 pkt_len, rx_status); 2448 pkt_len, rx_status);
2453 if (skb != NULL) { 2449 if (skb != NULL) {
2454 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ 2450 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
@@ -2478,8 +2474,8 @@ static int vortex_rx(struct net_device *dev)
2478 break; 2474 break;
2479 continue; 2475 continue;
2480 } else if (vortex_debug > 0) 2476 } else if (vortex_debug > 0)
2481 printk(KERN_NOTICE "%s: No memory to allocate a sk_buff of " 2477 pr_notice("%s: No memory to allocate a sk_buff of size %d.\n",
2482 "size %d.\n", dev->name, pkt_len); 2478 dev->name, pkt_len);
2483 dev->stats.rx_dropped++; 2479 dev->stats.rx_dropped++;
2484 } 2480 }
2485 issue_and_wait(dev, RxDiscard); 2481 issue_and_wait(dev, RxDiscard);
@@ -2498,7 +2494,7 @@ boomerang_rx(struct net_device *dev)
2498 int rx_work_limit = vp->dirty_rx + RX_RING_SIZE - vp->cur_rx; 2494 int rx_work_limit = vp->dirty_rx + RX_RING_SIZE - vp->cur_rx;
2499 2495
2500 if (vortex_debug > 5) 2496 if (vortex_debug > 5)
2501 printk(KERN_DEBUG "boomerang_rx(): status %4.4x\n", ioread16(ioaddr+EL3_STATUS)); 2497 pr_debug("boomerang_rx(): status %4.4x\n", ioread16(ioaddr+EL3_STATUS));
2502 2498
2503 while ((rx_status = le32_to_cpu(vp->rx_ring[entry].status)) & RxDComplete){ 2499 while ((rx_status = le32_to_cpu(vp->rx_ring[entry].status)) & RxDComplete){
2504 if (--rx_work_limit < 0) 2500 if (--rx_work_limit < 0)
@@ -2506,7 +2502,7 @@ boomerang_rx(struct net_device *dev)
2506 if (rx_status & RxDError) { /* Error, update stats. */ 2502 if (rx_status & RxDError) { /* Error, update stats. */
2507 unsigned char rx_error = rx_status >> 16; 2503 unsigned char rx_error = rx_status >> 16;
2508 if (vortex_debug > 2) 2504 if (vortex_debug > 2)
2509 printk(KERN_DEBUG " Rx error: status %2.2x.\n", rx_error); 2505 pr_debug(" Rx error: status %2.2x.\n", rx_error);
2510 dev->stats.rx_errors++; 2506 dev->stats.rx_errors++;
2511 if (rx_error & 0x01) dev->stats.rx_over_errors++; 2507 if (rx_error & 0x01) dev->stats.rx_over_errors++;
2512 if (rx_error & 0x02) dev->stats.rx_length_errors++; 2508 if (rx_error & 0x02) dev->stats.rx_length_errors++;
@@ -2520,7 +2516,7 @@ boomerang_rx(struct net_device *dev)
2520 dma_addr_t dma = le32_to_cpu(vp->rx_ring[entry].addr); 2516 dma_addr_t dma = le32_to_cpu(vp->rx_ring[entry].addr);
2521 2517
2522 if (vortex_debug > 4) 2518 if (vortex_debug > 4)
2523 printk(KERN_DEBUG "Receiving packet size %d status %4.4x.\n", 2519 pr_debug("Receiving packet size %d status %4.4x.\n",
2524 pkt_len, rx_status); 2520 pkt_len, rx_status);
2525 2521
2526 /* Check if the packet is long enough to just accept without 2522 /* Check if the packet is long enough to just accept without
@@ -2566,7 +2562,7 @@ boomerang_rx(struct net_device *dev)
2566 if (skb == NULL) { 2562 if (skb == NULL) {
2567 static unsigned long last_jif; 2563 static unsigned long last_jif;
2568 if (time_after(jiffies, last_jif + 10 * HZ)) { 2564 if (time_after(jiffies, last_jif + 10 * HZ)) {
2569 printk(KERN_WARNING "%s: memory shortage\n", dev->name); 2565 pr_warning("%s: memory shortage\n", dev->name);
2570 last_jif = jiffies; 2566 last_jif = jiffies;
2571 } 2567 }
2572 if ((vp->cur_rx - vp->dirty_rx) == RX_RING_SIZE) 2568 if ((vp->cur_rx - vp->dirty_rx) == RX_RING_SIZE)
@@ -2598,7 +2594,7 @@ rx_oom_timer(unsigned long arg)
2598 if ((vp->cur_rx - vp->dirty_rx) == RX_RING_SIZE) /* This test is redundant, but makes me feel good */ 2594 if ((vp->cur_rx - vp->dirty_rx) == RX_RING_SIZE) /* This test is redundant, but makes me feel good */
2599 boomerang_rx(dev); 2595 boomerang_rx(dev);
2600 if (vortex_debug > 1) { 2596 if (vortex_debug > 1) {
2601 printk(KERN_DEBUG "%s: rx_oom_timer %s\n", dev->name, 2597 pr_debug("%s: rx_oom_timer %s\n", dev->name,
2602 ((vp->cur_rx - vp->dirty_rx) != RX_RING_SIZE) ? "succeeded" : "retrying"); 2598 ((vp->cur_rx - vp->dirty_rx) != RX_RING_SIZE) ? "succeeded" : "retrying");
2603 } 2599 }
2604 spin_unlock_irq(&vp->lock); 2600 spin_unlock_irq(&vp->lock);
@@ -2655,9 +2651,9 @@ vortex_close(struct net_device *dev)
2655 vortex_down(dev, 1); 2651 vortex_down(dev, 1);
2656 2652
2657 if (vortex_debug > 1) { 2653 if (vortex_debug > 1) {
2658 printk(KERN_DEBUG"%s: vortex_close() status %4.4x, Tx status %2.2x.\n", 2654 pr_debug("%s: vortex_close() status %4.4x, Tx status %2.2x.\n",
2659 dev->name, ioread16(ioaddr + EL3_STATUS), ioread8(ioaddr + TxStatus)); 2655 dev->name, ioread16(ioaddr + EL3_STATUS), ioread8(ioaddr + TxStatus));
2660 printk(KERN_DEBUG "%s: vortex close stats: rx_nocopy %d rx_copy %d" 2656 pr_debug("%s: vortex close stats: rx_nocopy %d rx_copy %d"
2661 " tx_queued %d Rx pre-checksummed %d.\n", 2657 " tx_queued %d Rx pre-checksummed %d.\n",
2662 dev->name, vp->rx_nocopy, vp->rx_copy, vp->queued_packet, vp->rx_csumhits); 2658 dev->name, vp->rx_nocopy, vp->rx_copy, vp->queued_packet, vp->rx_csumhits);
2663 } 2659 }
@@ -2666,8 +2662,7 @@ vortex_close(struct net_device *dev)
2666 if (vp->rx_csumhits && 2662 if (vp->rx_csumhits &&
2667 (vp->drv_flags & HAS_HWCKSM) == 0 && 2663 (vp->drv_flags & HAS_HWCKSM) == 0 &&
2668 (vp->card_idx >= MAX_UNITS || hw_checksums[vp->card_idx] == -1)) { 2664 (vp->card_idx >= MAX_UNITS || hw_checksums[vp->card_idx] == -1)) {
2669 printk(KERN_WARNING "%s supports hardware checksums, and we're " 2665 pr_warning("%s supports hardware checksums, and we're not using them!\n", dev->name);
2670 "not using them!\n", dev->name);
2671 } 2666 }
2672#endif 2667#endif
2673 2668
@@ -2717,16 +2712,16 @@ dump_tx_ring(struct net_device *dev)
2717 int i; 2712 int i;
2718 int stalled = ioread32(ioaddr + PktStatus) & 0x04; /* Possible racy. But it's only debug stuff */ 2713 int stalled = ioread32(ioaddr + PktStatus) & 0x04; /* Possible racy. But it's only debug stuff */
2719 2714
2720 printk(KERN_ERR " Flags; bus-master %d, dirty %d(%d) current %d(%d)\n", 2715 pr_err(" Flags; bus-master %d, dirty %d(%d) current %d(%d)\n",
2721 vp->full_bus_master_tx, 2716 vp->full_bus_master_tx,
2722 vp->dirty_tx, vp->dirty_tx % TX_RING_SIZE, 2717 vp->dirty_tx, vp->dirty_tx % TX_RING_SIZE,
2723 vp->cur_tx, vp->cur_tx % TX_RING_SIZE); 2718 vp->cur_tx, vp->cur_tx % TX_RING_SIZE);
2724 printk(KERN_ERR " Transmit list %8.8x vs. %p.\n", 2719 pr_err(" Transmit list %8.8x vs. %p.\n",
2725 ioread32(ioaddr + DownListPtr), 2720 ioread32(ioaddr + DownListPtr),
2726 &vp->tx_ring[vp->dirty_tx % TX_RING_SIZE]); 2721 &vp->tx_ring[vp->dirty_tx % TX_RING_SIZE]);
2727 issue_and_wait(dev, DownStall); 2722 issue_and_wait(dev, DownStall);
2728 for (i = 0; i < TX_RING_SIZE; i++) { 2723 for (i = 0; i < TX_RING_SIZE; i++) {
2729 printk(KERN_ERR " %d: @%p length %8.8x status %8.8x\n", i, 2724 pr_err(" %d: @%p length %8.8x status %8.8x\n", i,
2730 &vp->tx_ring[i], 2725 &vp->tx_ring[i],
2731#if DO_ZEROCOPY 2726#if DO_ZEROCOPY
2732 le32_to_cpu(vp->tx_ring[i].frag[0].length), 2727 le32_to_cpu(vp->tx_ring[i].frag[0].length),
@@ -2970,7 +2965,7 @@ static void set_rx_mode(struct net_device *dev)
2970 2965
2971 if (dev->flags & IFF_PROMISC) { 2966 if (dev->flags & IFF_PROMISC) {
2972 if (vortex_debug > 3) 2967 if (vortex_debug > 3)
2973 printk(KERN_NOTICE "%s: Setting promiscuous mode.\n", dev->name); 2968 pr_notice("%s: Setting promiscuous mode.\n", dev->name);
2974 new_mode = SetRxFilter|RxStation|RxMulticast|RxBroadcast|RxProm; 2969 new_mode = SetRxFilter|RxStation|RxMulticast|RxBroadcast|RxProm;
2975 } else if ((dev->mc_list) || (dev->flags & IFF_ALLMULTI)) { 2970 } else if ((dev->mc_list) || (dev->flags & IFF_ALLMULTI)) {
2976 new_mode = SetRxFilter|RxStation|RxMulticast|RxBroadcast; 2971 new_mode = SetRxFilter|RxStation|RxMulticast|RxBroadcast;
@@ -3145,8 +3140,7 @@ static void acpi_set_WOL(struct net_device *dev)
3145 iowrite16(RxEnable, ioaddr + EL3_CMD); 3140 iowrite16(RxEnable, ioaddr + EL3_CMD);
3146 3141
3147 if (pci_enable_wake(VORTEX_PCI(vp), PCI_D3hot, 1)) { 3142 if (pci_enable_wake(VORTEX_PCI(vp), PCI_D3hot, 1)) {
3148 printk(KERN_INFO "%s: WOL not supported.\n", 3143 pr_info("%s: WOL not supported.\n", pci_name(VORTEX_PCI(vp)));
3149 pci_name(VORTEX_PCI(vp)));
3150 3144
3151 vp->enable_wol = 0; 3145 vp->enable_wol = 0;
3152 return; 3146 return;
@@ -3164,7 +3158,7 @@ static void __devexit vortex_remove_one(struct pci_dev *pdev)
3164 struct vortex_private *vp; 3158 struct vortex_private *vp;
3165 3159
3166 if (!dev) { 3160 if (!dev) {
3167 printk("vortex_remove_one called for Compaq device!\n"); 3161 pr_err("vortex_remove_one called for Compaq device!\n");
3168 BUG(); 3162 BUG();
3169 } 3163 }
3170 3164