aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pci-skeleton.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pci-skeleton.c')
-rw-r--r--drivers/net/pci-skeleton.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c
index 3388ee1313ea..9c1ce318b077 100644
--- a/drivers/net/pci-skeleton.c
+++ b/drivers/net/pci-skeleton.c
@@ -601,7 +601,8 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev,
601 /* dev zeroed in alloc_etherdev */ 601 /* dev zeroed in alloc_etherdev */
602 dev = alloc_etherdev (sizeof (*tp)); 602 dev = alloc_etherdev (sizeof (*tp));
603 if (dev == NULL) { 603 if (dev == NULL) {
604 printk (KERN_ERR PFX "unable to alloc new ethernet\n"); 604 dev_printk (KERN_ERR, &pdev->dev,
605 "unable to alloc new ethernet\n");
605 DPRINTK ("EXIT, returning -ENOMEM\n"); 606 DPRINTK ("EXIT, returning -ENOMEM\n");
606 return -ENOMEM; 607 return -ENOMEM;
607 } 608 }
@@ -631,14 +632,16 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev,
631 632
632 /* make sure PCI base addr 0 is PIO */ 633 /* make sure PCI base addr 0 is PIO */
633 if (!(pio_flags & IORESOURCE_IO)) { 634 if (!(pio_flags & IORESOURCE_IO)) {
634 printk (KERN_ERR PFX "region #0 not a PIO resource, aborting\n"); 635 dev_printk (KERN_ERR, &pdev->dev,
636 "region #0 not a PIO resource, aborting\n");
635 rc = -ENODEV; 637 rc = -ENODEV;
636 goto err_out; 638 goto err_out;
637 } 639 }
638 640
639 /* make sure PCI base addr 1 is MMIO */ 641 /* make sure PCI base addr 1 is MMIO */
640 if (!(mmio_flags & IORESOURCE_MEM)) { 642 if (!(mmio_flags & IORESOURCE_MEM)) {
641 printk (KERN_ERR PFX "region #1 not an MMIO resource, aborting\n"); 643 dev_printk (KERN_ERR, &pdev->dev,
644 "region #1 not an MMIO resource, aborting\n");
642 rc = -ENODEV; 645 rc = -ENODEV;
643 goto err_out; 646 goto err_out;
644 } 647 }
@@ -646,12 +649,13 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev,
646 /* check for weird/broken PCI region reporting */ 649 /* check for weird/broken PCI region reporting */
647 if ((pio_len < NETDRV_MIN_IO_SIZE) || 650 if ((pio_len < NETDRV_MIN_IO_SIZE) ||
648 (mmio_len < NETDRV_MIN_IO_SIZE)) { 651 (mmio_len < NETDRV_MIN_IO_SIZE)) {
649 printk (KERN_ERR PFX "Invalid PCI region size(s), aborting\n"); 652 dev_printk (KERN_ERR, &pdev->dev,
653 "Invalid PCI region size(s), aborting\n");
650 rc = -ENODEV; 654 rc = -ENODEV;
651 goto err_out; 655 goto err_out;
652 } 656 }
653 657
654 rc = pci_request_regions (pdev, "pci-skeleton"); 658 rc = pci_request_regions (pdev, MODNAME);
655 if (rc) 659 if (rc)
656 goto err_out; 660 goto err_out;
657 661
@@ -663,7 +667,8 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev,
663 /* ioremap MMIO region */ 667 /* ioremap MMIO region */
664 ioaddr = ioremap (mmio_start, mmio_len); 668 ioaddr = ioremap (mmio_start, mmio_len);
665 if (ioaddr == NULL) { 669 if (ioaddr == NULL) {
666 printk (KERN_ERR PFX "cannot remap MMIO, aborting\n"); 670 dev_printk (KERN_ERR, &pdev->dev,
671 "cannot remap MMIO, aborting\n");
667 rc = -EIO; 672 rc = -EIO;
668 goto err_out_free_res; 673 goto err_out_free_res;
669 } 674 }
@@ -699,9 +704,10 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev,
699 } 704 }
700 705
701 /* if unknown chip, assume array element #0, original RTL-8139 in this case */ 706 /* if unknown chip, assume array element #0, original RTL-8139 in this case */
702 printk (KERN_DEBUG PFX "PCI device %s: unknown chip version, assuming RTL-8139\n", 707 dev_printk (KERN_DEBUG, &pdev->dev,
703 pci_name(pdev)); 708 "unknown chip version, assuming RTL-8139\n");
704 printk (KERN_DEBUG PFX "PCI device %s: TxConfig = 0x%lx\n", pci_name(pdev), NETDRV_R32 (TxConfig)); 709 dev_printk (KERN_DEBUG, &pdev->dev, "TxConfig = 0x%lx\n",
710 NETDRV_R32 (TxConfig));
705 tp->chipset = 0; 711 tp->chipset = 0;
706 712
707match: 713match: