aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ne2k-pci.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/ne2k-pci.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/ne2k-pci.c')
-rw-r--r--drivers/net/ne2k-pci.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c
index fa50eb889408..4f226064d55e 100644
--- a/drivers/net/ne2k-pci.c
+++ b/drivers/net/ne2k-pci.c
@@ -231,12 +231,14 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev,
231 irq = pdev->irq; 231 irq = pdev->irq;
232 232
233 if (!ioaddr || ((pci_resource_flags (pdev, 0) & IORESOURCE_IO) == 0)) { 233 if (!ioaddr || ((pci_resource_flags (pdev, 0) & IORESOURCE_IO) == 0)) {
234 printk (KERN_ERR PFX "no I/O resource at PCI BAR #0\n"); 234 dev_printk (KERN_ERR, &pdev->dev,
235 "no I/O resource at PCI BAR #0\n");
235 return -ENODEV; 236 return -ENODEV;
236 } 237 }
237 238
238 if (request_region (ioaddr, NE_IO_EXTENT, DRV_NAME) == NULL) { 239 if (request_region (ioaddr, NE_IO_EXTENT, DRV_NAME) == NULL) {
239 printk (KERN_ERR PFX "I/O resource 0x%x @ 0x%lx busy\n", 240 dev_printk (KERN_ERR, &pdev->dev,
241 "I/O resource 0x%x @ 0x%lx busy\n",
240 NE_IO_EXTENT, ioaddr); 242 NE_IO_EXTENT, ioaddr);
241 return -EBUSY; 243 return -EBUSY;
242 } 244 }
@@ -263,7 +265,8 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev,
263 /* Allocate net_device, dev->priv; fill in 8390 specific dev fields. */ 265 /* Allocate net_device, dev->priv; fill in 8390 specific dev fields. */
264 dev = alloc_ei_netdev(); 266 dev = alloc_ei_netdev();
265 if (!dev) { 267 if (!dev) {
266 printk (KERN_ERR PFX "cannot allocate ethernet device\n"); 268 dev_printk (KERN_ERR, &pdev->dev,
269 "cannot allocate ethernet device\n");
267 goto err_out_free_res; 270 goto err_out_free_res;
268 } 271 }
269 SET_MODULE_OWNER(dev); 272 SET_MODULE_OWNER(dev);
@@ -281,7 +284,8 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev,
281 while ((inb(ioaddr + EN0_ISR) & ENISR_RESET) == 0) 284 while ((inb(ioaddr + EN0_ISR) & ENISR_RESET) == 0)
282 /* Limit wait: '2' avoids jiffy roll-over. */ 285 /* Limit wait: '2' avoids jiffy roll-over. */
283 if (jiffies - reset_start_time > 2) { 286 if (jiffies - reset_start_time > 2) {
284 printk(KERN_ERR PFX "Card failure (no reset ack).\n"); 287 dev_printk(KERN_ERR, &pdev->dev,
288 "Card failure (no reset ack).\n");
285 goto err_out_free_netdev; 289 goto err_out_free_netdev;
286 } 290 }
287 291