aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/b44.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/b44.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/b44.c')
-rw-r--r--drivers/net/b44.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index cd98d31dee8c..5815e3dc1251 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -2120,13 +2120,14 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
2120 2120
2121 err = pci_enable_device(pdev); 2121 err = pci_enable_device(pdev);
2122 if (err) { 2122 if (err) {
2123 printk(KERN_ERR PFX "Cannot enable PCI device, " 2123 dev_printk(KERN_ERR, &pdev->dev, "Cannot enable PCI device, "
2124 "aborting.\n"); 2124 "aborting.\n");
2125 return err; 2125 return err;
2126 } 2126 }
2127 2127
2128 if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { 2128 if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {
2129 printk(KERN_ERR PFX "Cannot find proper PCI device " 2129 dev_printk(KERN_ERR, &pdev->dev,
2130 "Cannot find proper PCI device "
2130 "base address, aborting.\n"); 2131 "base address, aborting.\n");
2131 err = -ENODEV; 2132 err = -ENODEV;
2132 goto err_out_disable_pdev; 2133 goto err_out_disable_pdev;
@@ -2134,8 +2135,8 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
2134 2135
2135 err = pci_request_regions(pdev, DRV_MODULE_NAME); 2136 err = pci_request_regions(pdev, DRV_MODULE_NAME);
2136 if (err) { 2137 if (err) {
2137 printk(KERN_ERR PFX "Cannot obtain PCI resources, " 2138 dev_printk(KERN_ERR, &pdev->dev,
2138 "aborting.\n"); 2139 "Cannot obtain PCI resources, aborting.\n");
2139 goto err_out_disable_pdev; 2140 goto err_out_disable_pdev;
2140 } 2141 }
2141 2142
@@ -2143,15 +2144,15 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
2143 2144
2144 err = pci_set_dma_mask(pdev, (u64) B44_DMA_MASK); 2145 err = pci_set_dma_mask(pdev, (u64) B44_DMA_MASK);
2145 if (err) { 2146 if (err) {
2146 printk(KERN_ERR PFX "No usable DMA configuration, " 2147 dev_printk(KERN_ERR, &pdev->dev,
2147 "aborting.\n"); 2148 "No usable DMA configuration, aborting.\n");
2148 goto err_out_free_res; 2149 goto err_out_free_res;
2149 } 2150 }
2150 2151
2151 err = pci_set_consistent_dma_mask(pdev, (u64) B44_DMA_MASK); 2152 err = pci_set_consistent_dma_mask(pdev, (u64) B44_DMA_MASK);
2152 if (err) { 2153 if (err) {
2153 printk(KERN_ERR PFX "No usable DMA configuration, " 2154 dev_printk(KERN_ERR, &pdev->dev,
2154 "aborting.\n"); 2155 "No usable DMA configuration, aborting.\n");
2155 goto err_out_free_res; 2156 goto err_out_free_res;
2156 } 2157 }
2157 2158
@@ -2160,7 +2161,8 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
2160 2161
2161 dev = alloc_etherdev(sizeof(*bp)); 2162 dev = alloc_etherdev(sizeof(*bp));
2162 if (!dev) { 2163 if (!dev) {
2163 printk(KERN_ERR PFX "Etherdev alloc failed, aborting.\n"); 2164 dev_printk(KERN_ERR, &pdev->dev,
2165 "Etherdev alloc failed, aborting.\n");
2164 err = -ENOMEM; 2166 err = -ENOMEM;
2165 goto err_out_free_res; 2167 goto err_out_free_res;
2166 } 2168 }
@@ -2181,7 +2183,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
2181 2183
2182 bp->regs = ioremap(b44reg_base, b44reg_len); 2184 bp->regs = ioremap(b44reg_base, b44reg_len);
2183 if (bp->regs == 0UL) { 2185 if (bp->regs == 0UL) {
2184 printk(KERN_ERR PFX "Cannot map device registers, " 2186 dev_printk(KERN_ERR, &pdev->dev, "Cannot map device registers, "
2185 "aborting.\n"); 2187 "aborting.\n");
2186 err = -ENOMEM; 2188 err = -ENOMEM;
2187 goto err_out_free_dev; 2189 goto err_out_free_dev;
@@ -2212,8 +2214,8 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
2212 2214
2213 err = b44_get_invariants(bp); 2215 err = b44_get_invariants(bp);
2214 if (err) { 2216 if (err) {
2215 printk(KERN_ERR PFX "Problem fetching invariants of chip, " 2217 dev_printk(KERN_ERR, &pdev->dev,
2216 "aborting.\n"); 2218 "Problem fetching invariants of chip, aborting.\n");
2217 goto err_out_iounmap; 2219 goto err_out_iounmap;
2218 } 2220 }
2219 2221
@@ -2233,7 +2235,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
2233 2235
2234 err = register_netdev(dev); 2236 err = register_netdev(dev);
2235 if (err) { 2237 if (err) {
2236 printk(KERN_ERR PFX "Cannot register net device, " 2238 dev_printk(KERN_ERR, &pdev->dev, "Cannot register net device, "
2237 "aborting.\n"); 2239 "aborting.\n");
2238 goto err_out_iounmap; 2240 goto err_out_iounmap;
2239 } 2241 }