aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/epic100.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-06-27 10:47:51 -0400
committerJeff Garzik <jeff@garzik.org>2006-07-05 13:42:07 -0400
commit2e8a538d865de0eb9813c8a0f2284e920299c0cc (patch)
tree30b773865f17b6a2768171f62fdae9700b54ec44 /drivers/net/epic100.c
parentcabb7667dc150320ccd9d6f64fbd7a34766bc775 (diff)
[netdrvr] Use dev_printk() when ethernet interface isn't available
For messages prior to register_netdev(), prefer dev_printk() because that prints out both our driver name and our [PCI | whatever] bus id. Updates: 8139{cp,too}, b44, bnx2, cassini, {eepro,epic}100, fealnx, hamachi, ne2k-pci, ns83820, pci-skeleton, r8169. Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/epic100.c')
-rw-r--r--drivers/net/epic100.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c
index 05c9a26a74e2..6dd0e9d159de 100644
--- a/drivers/net/epic100.c
+++ b/drivers/net/epic100.c
@@ -422,8 +422,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
422 ((u16 *)dev->dev_addr)[i] = le16_to_cpu(inw(ioaddr + LAN0 + i*4)); 422 ((u16 *)dev->dev_addr)[i] = le16_to_cpu(inw(ioaddr + LAN0 + i*4));
423 423
424 if (debug > 2) { 424 if (debug > 2) {
425 printk(KERN_DEBUG DRV_NAME "(%s): EEPROM contents\n", 425 dev_printk(KERN_DEBUG, &pdev->dev, "EEPROM contents:\n");
426 pci_name(pdev));
427 for (i = 0; i < 64; i++) 426 for (i = 0; i < 64; i++)
428 printk(" %4.4x%s", read_eeprom(ioaddr, i), 427 printk(" %4.4x%s", read_eeprom(ioaddr, i),
429 i % 16 == 15 ? "\n" : ""); 428 i % 16 == 15 ? "\n" : "");
@@ -445,21 +444,23 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
445 int mii_status = mdio_read(dev, phy, MII_BMSR); 444 int mii_status = mdio_read(dev, phy, MII_BMSR);
446 if (mii_status != 0xffff && mii_status != 0x0000) { 445 if (mii_status != 0xffff && mii_status != 0x0000) {
447 ep->phys[phy_idx++] = phy; 446 ep->phys[phy_idx++] = phy;
448 printk(KERN_INFO DRV_NAME "(%s): MII transceiver #%d control " 447 dev_printk(KERN_INFO, &pdev->dev,
449 "%4.4x status %4.4x.\n", 448 "MII transceiver #%d control "
450 pci_name(pdev), phy, mdio_read(dev, phy, 0), mii_status); 449 "%4.4x status %4.4x.\n",
450 phy, mdio_read(dev, phy, 0), mii_status);
451 } 451 }
452 } 452 }
453 ep->mii_phy_cnt = phy_idx; 453 ep->mii_phy_cnt = phy_idx;
454 if (phy_idx != 0) { 454 if (phy_idx != 0) {
455 phy = ep->phys[0]; 455 phy = ep->phys[0];
456 ep->mii.advertising = mdio_read(dev, phy, MII_ADVERTISE); 456 ep->mii.advertising = mdio_read(dev, phy, MII_ADVERTISE);
457 printk(KERN_INFO DRV_NAME "(%s): Autonegotiation advertising %4.4x link " 457 dev_printk(KERN_INFO, &pdev->dev,
458 "Autonegotiation advertising %4.4x link "
458 "partner %4.4x.\n", 459 "partner %4.4x.\n",
459 pci_name(pdev), ep->mii.advertising, mdio_read(dev, phy, 5)); 460 ep->mii.advertising, mdio_read(dev, phy, 5));
460 } else if ( ! (ep->chip_flags & NO_MII)) { 461 } else if ( ! (ep->chip_flags & NO_MII)) {
461 printk(KERN_WARNING DRV_NAME "(%s): ***WARNING***: No MII transceiver found!\n", 462 dev_printk(KERN_WARNING, &pdev->dev,
462 pci_name(pdev)); 463 "***WARNING***: No MII transceiver found!\n");
463 /* Use the known PHY address of the EPII. */ 464 /* Use the known PHY address of the EPII. */
464 ep->phys[0] = 3; 465 ep->phys[0] = 3;
465 } 466 }
@@ -474,8 +475,8 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
474 /* The lower four bits are the media type. */ 475 /* The lower four bits are the media type. */
475 if (duplex) { 476 if (duplex) {
476 ep->mii.force_media = ep->mii.full_duplex = 1; 477 ep->mii.force_media = ep->mii.full_duplex = 1;
477 printk(KERN_INFO DRV_NAME "(%s): Forced full duplex operation requested.\n", 478 dev_printk(KERN_INFO, &pdev->dev,
478 pci_name(pdev)); 479 "Forced full duplex operation requested.\n");
479 } 480 }
480 dev->if_port = ep->default_port = option; 481 dev->if_port = ep->default_port = option;
481 482