diff options
Diffstat (limited to 'drivers/net/8139too.c')
-rw-r--r-- | drivers/net/8139too.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index 5e9ef52a5ca9..cd9718512d1c 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c | |||
@@ -768,8 +768,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, | |||
768 | /* dev and priv zeroed in alloc_etherdev */ | 768 | /* dev and priv zeroed in alloc_etherdev */ |
769 | dev = alloc_etherdev (sizeof (*tp)); | 769 | dev = alloc_etherdev (sizeof (*tp)); |
770 | if (dev == NULL) { | 770 | if (dev == NULL) { |
771 | dev_printk (KERN_ERR, &pdev->dev, | 771 | dev_err(&pdev->dev, "Unable to alloc new net device\n"); |
772 | "Unable to alloc new net device\n"); | ||
773 | return -ENOMEM; | 772 | return -ENOMEM; |
774 | } | 773 | } |
775 | SET_MODULE_OWNER(dev); | 774 | SET_MODULE_OWNER(dev); |
@@ -801,29 +800,25 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, | |||
801 | #ifdef USE_IO_OPS | 800 | #ifdef USE_IO_OPS |
802 | /* make sure PCI base addr 0 is PIO */ | 801 | /* make sure PCI base addr 0 is PIO */ |
803 | if (!(pio_flags & IORESOURCE_IO)) { | 802 | if (!(pio_flags & IORESOURCE_IO)) { |
804 | dev_printk (KERN_ERR, &pdev->dev, | 803 | dev_err(&pdev->dev, "region #0 not a PIO resource, aborting\n"); |
805 | "region #0 not a PIO resource, aborting\n"); | ||
806 | rc = -ENODEV; | 804 | rc = -ENODEV; |
807 | goto err_out; | 805 | goto err_out; |
808 | } | 806 | } |
809 | /* check for weird/broken PCI region reporting */ | 807 | /* check for weird/broken PCI region reporting */ |
810 | if (pio_len < RTL_MIN_IO_SIZE) { | 808 | if (pio_len < RTL_MIN_IO_SIZE) { |
811 | dev_printk (KERN_ERR, &pdev->dev, | 809 | dev_err(&pdev->dev, "Invalid PCI I/O region size(s), aborting\n"); |
812 | "Invalid PCI I/O region size(s), aborting\n"); | ||
813 | rc = -ENODEV; | 810 | rc = -ENODEV; |
814 | goto err_out; | 811 | goto err_out; |
815 | } | 812 | } |
816 | #else | 813 | #else |
817 | /* make sure PCI base addr 1 is MMIO */ | 814 | /* make sure PCI base addr 1 is MMIO */ |
818 | if (!(mmio_flags & IORESOURCE_MEM)) { | 815 | if (!(mmio_flags & IORESOURCE_MEM)) { |
819 | dev_printk (KERN_ERR, &pdev->dev, | 816 | dev_err(&pdev->dev, "region #1 not an MMIO resource, aborting\n"); |
820 | "region #1 not an MMIO resource, aborting\n"); | ||
821 | rc = -ENODEV; | 817 | rc = -ENODEV; |
822 | goto err_out; | 818 | goto err_out; |
823 | } | 819 | } |
824 | if (mmio_len < RTL_MIN_IO_SIZE) { | 820 | if (mmio_len < RTL_MIN_IO_SIZE) { |
825 | dev_printk (KERN_ERR, &pdev->dev, | 821 | dev_err(&pdev->dev, "Invalid PCI mem region size(s), aborting\n"); |
826 | "Invalid PCI mem region size(s), aborting\n"); | ||
827 | rc = -ENODEV; | 822 | rc = -ENODEV; |
828 | goto err_out; | 823 | goto err_out; |
829 | } | 824 | } |
@@ -840,7 +835,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, | |||
840 | #ifdef USE_IO_OPS | 835 | #ifdef USE_IO_OPS |
841 | ioaddr = ioport_map(pio_start, pio_len); | 836 | ioaddr = ioport_map(pio_start, pio_len); |
842 | if (!ioaddr) { | 837 | if (!ioaddr) { |
843 | dev_printk (KERN_ERR, &pdev->dev, "cannot map PIO, aborting\n"); | 838 | dev_err(&pdev->dev, "cannot map PIO, aborting\n"); |
844 | rc = -EIO; | 839 | rc = -EIO; |
845 | goto err_out; | 840 | goto err_out; |
846 | } | 841 | } |
@@ -851,8 +846,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, | |||
851 | /* ioremap MMIO region */ | 846 | /* ioremap MMIO region */ |
852 | ioaddr = pci_iomap(pdev, 1, 0); | 847 | ioaddr = pci_iomap(pdev, 1, 0); |
853 | if (ioaddr == NULL) { | 848 | if (ioaddr == NULL) { |
854 | dev_printk (KERN_ERR, &pdev->dev, | 849 | dev_err(&pdev->dev, "cannot remap MMIO, aborting\n"); |
855 | "cannot remap MMIO, aborting\n"); | ||
856 | rc = -EIO; | 850 | rc = -EIO; |
857 | goto err_out; | 851 | goto err_out; |
858 | } | 852 | } |
@@ -866,8 +860,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, | |||
866 | 860 | ||
867 | /* check for missing/broken hardware */ | 861 | /* check for missing/broken hardware */ |
868 | if (RTL_R32 (TxConfig) == 0xFFFFFFFF) { | 862 | if (RTL_R32 (TxConfig) == 0xFFFFFFFF) { |
869 | dev_printk (KERN_ERR, &pdev->dev, | 863 | dev_err(&pdev->dev, "Chip not responding, ignoring board\n"); |
870 | "Chip not responding, ignoring board\n"); | ||
871 | rc = -EIO; | 864 | rc = -EIO; |
872 | goto err_out; | 865 | goto err_out; |
873 | } | 866 | } |
@@ -961,10 +954,10 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev, | |||
961 | 954 | ||
962 | if (pdev->vendor == PCI_VENDOR_ID_REALTEK && | 955 | if (pdev->vendor == PCI_VENDOR_ID_REALTEK && |
963 | pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pci_rev >= 0x20) { | 956 | pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pci_rev >= 0x20) { |
964 | dev_printk(KERN_INFO, &pdev->dev, | 957 | dev_info(&pdev->dev, |
965 | "This (id %04x:%04x rev %02x) is an enhanced 8139C+ chip\n", | 958 | "This (id %04x:%04x rev %02x) is an enhanced 8139C+ chip\n", |
966 | pdev->vendor, pdev->device, pci_rev); | 959 | pdev->vendor, pdev->device, pci_rev); |
967 | dev_printk(KERN_INFO, &pdev->dev, | 960 | dev_info(&pdev->dev, |
968 | "Use the \"8139cp\" driver for improved performance and stability.\n"); | 961 | "Use the \"8139cp\" driver for improved performance and stability.\n"); |
969 | } | 962 | } |
970 | 963 | ||