diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-06-27 14:47:51 (GMT) |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-07-05 17:42:07 (GMT) |
commit | 2e8a538d865de0eb9813c8a0f2284e920299c0cc (patch) | |
tree | 30b773865f17b6a2768171f62fdae9700b54ec44 /drivers/net/cassini.c | |
parent | cabb7667dc150320ccd9d6f64fbd7a34766bc775 (diff) | |
download | linux-fsl-qoriq-2e8a538d865de0eb9813c8a0f2284e920299c0cc.tar.xz |
[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/cassini.c')
-rw-r--r-- | drivers/net/cassini.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index d33130f..428e206 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c @@ -4887,13 +4887,13 @@ static int __devinit cas_init_one(struct pci_dev *pdev, err = pci_enable_device(pdev); if (err) { - printk(KERN_ERR PFX "Cannot enable PCI device, " + dev_printk(KERN_ERR, &pdev->dev, "Cannot enable PCI device, " "aborting.\n"); return err; } if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { - printk(KERN_ERR PFX "Cannot find proper PCI device " + dev_printk(KERN_ERR, &pdev->dev, "Cannot find proper PCI device " "base address, aborting.\n"); err = -ENODEV; goto err_out_disable_pdev; @@ -4901,7 +4901,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, dev = alloc_etherdev(sizeof(*cp)); if (!dev) { - printk(KERN_ERR PFX "Etherdev alloc failed, aborting.\n"); + dev_printk(KERN_ERR, &pdev->dev, "Etherdev alloc failed, aborting.\n"); err = -ENOMEM; goto err_out_disable_pdev; } @@ -4910,7 +4910,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, err = pci_request_regions(pdev, dev->name); if (err) { - printk(KERN_ERR PFX "Cannot obtain PCI resources, " + dev_printk(KERN_ERR, &pdev->dev, "Cannot obtain PCI resources, " "aborting.\n"); goto err_out_free_netdev; } @@ -4941,7 +4941,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, if (pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, cas_cacheline_size)) { - printk(KERN_ERR PFX "Could not set PCI cache " + dev_printk(KERN_ERR, &pdev->dev, "Could not set PCI cache " "line size\n"); goto err_write_cacheline; } @@ -4955,7 +4955,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); if (err < 0) { - printk(KERN_ERR PFX "Unable to obtain 64-bit DMA " + dev_printk(KERN_ERR, &pdev->dev, "Unable to obtain 64-bit DMA " "for consistent allocations\n"); goto err_out_free_res; } @@ -4963,7 +4963,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, } else { err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); if (err) { - printk(KERN_ERR PFX "No usable DMA configuration, " + dev_printk(KERN_ERR, &pdev->dev, "No usable DMA configuration, " "aborting.\n"); goto err_out_free_res; } @@ -5023,7 +5023,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, /* give us access to cassini registers */ cp->regs = pci_iomap(pdev, 0, casreg_len); if (cp->regs == 0UL) { - printk(KERN_ERR PFX "Cannot map device registers, " + dev_printk(KERN_ERR, &pdev->dev, "Cannot map device registers, " "aborting.\n"); goto err_out_free_res; } @@ -5040,7 +5040,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, pci_alloc_consistent(pdev, sizeof(struct cas_init_block), &cp->block_dvma); if (!cp->init_block) { - printk(KERN_ERR PFX "Cannot allocate init block, " + dev_printk(KERN_ERR, &pdev->dev, "Cannot allocate init block, " "aborting.\n"); goto err_out_iounmap; } @@ -5085,7 +5085,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, dev->features |= NETIF_F_HIGHDMA; if (register_netdev(dev)) { - printk(KERN_ERR PFX "Cannot register net device, " + dev_printk(KERN_ERR, &pdev->dev, "Cannot register net device, " "aborting.\n"); goto err_out_free_consistent; } |