diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-06-27 10:47:51 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-07-05 13:42:07 -0400 |
commit | 2e8a538d865de0eb9813c8a0f2284e920299c0cc (patch) | |
tree | 30b773865f17b6a2768171f62fdae9700b54ec44 /drivers/net/ns83820.c | |
parent | cabb7667dc150320ccd9d6f64fbd7a34766bc775 (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/ns83820.c')
-rw-r--r-- | drivers/net/ns83820.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index 70429108c40d..d6e7ac2d0c94 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c | |||
@@ -1832,7 +1832,8 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ | |||
1832 | } else if (!pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) { | 1832 | } else if (!pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) { |
1833 | using_dac = 0; | 1833 | using_dac = 0; |
1834 | } else { | 1834 | } else { |
1835 | printk(KERN_WARNING "ns83820.c: pci_set_dma_mask failed!\n"); | 1835 | dev_printk(KERN_WARNING, &pci_dev->dev, |
1836 | "pci_set_dma_mask failed!\n"); | ||
1836 | return -ENODEV; | 1837 | return -ENODEV; |
1837 | } | 1838 | } |
1838 | 1839 | ||
@@ -1855,7 +1856,8 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ | |||
1855 | 1856 | ||
1856 | err = pci_enable_device(pci_dev); | 1857 | err = pci_enable_device(pci_dev); |
1857 | if (err) { | 1858 | if (err) { |
1858 | printk(KERN_INFO "ns83820: pci_enable_dev failed: %d\n", err); | 1859 | dev_printk(KERN_INFO, &pci_dev->dev, |
1860 | "pci_enable_dev failed: %d\n", err); | ||
1859 | goto out_free; | 1861 | goto out_free; |
1860 | } | 1862 | } |
1861 | 1863 | ||
@@ -1884,8 +1886,9 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ | |||
1884 | err = request_irq(pci_dev->irq, ns83820_irq, IRQF_SHARED, | 1886 | err = request_irq(pci_dev->irq, ns83820_irq, IRQF_SHARED, |
1885 | DRV_NAME, ndev); | 1887 | DRV_NAME, ndev); |
1886 | if (err) { | 1888 | if (err) { |
1887 | printk(KERN_INFO "ns83820: unable to register irq %d\n", | 1889 | dev_printk(KERN_INFO, &pci_dev->dev, |
1888 | pci_dev->irq); | 1890 | "unable to register irq %d, err %d\n", |
1891 | pci_dev->irq, err); | ||
1889 | goto out_disable; | 1892 | goto out_disable; |
1890 | } | 1893 | } |
1891 | 1894 | ||
@@ -1899,7 +1902,8 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ | |||
1899 | rtnl_lock(); | 1902 | rtnl_lock(); |
1900 | err = dev_alloc_name(ndev, ndev->name); | 1903 | err = dev_alloc_name(ndev, ndev->name); |
1901 | if (err < 0) { | 1904 | if (err < 0) { |
1902 | printk(KERN_INFO "ns83820: unable to get netdev name: %d\n", err); | 1905 | dev_printk(KERN_INFO, &pci_dev->dev, |
1906 | "unable to get netdev name: %d\n", err); | ||
1903 | goto out_free_irq; | 1907 | goto out_free_irq; |
1904 | } | 1908 | } |
1905 | 1909 | ||