diff options
| -rw-r--r-- | drivers/net/8139cp.c | 17 | ||||
| -rw-r--r-- | drivers/net/8139too.c | 27 | ||||
| -rw-r--r-- | drivers/net/b44.c | 23 | ||||
| -rw-r--r-- | drivers/net/bnx2.c | 29 | ||||
| -rw-r--r-- | drivers/net/cassini.c | 25 | ||||
| -rw-r--r-- | drivers/net/eepro100.c | 8 | ||||
| -rw-r--r-- | drivers/net/epic100.c | 15 | ||||
| -rw-r--r-- | drivers/net/fealnx.c | 9 | ||||
| -rw-r--r-- | drivers/net/ne2k-pci.c | 11 | ||||
| -rw-r--r-- | drivers/net/ns83820.c | 12 | ||||
| -rw-r--r-- | drivers/net/pci-skeleton.c | 15 | ||||
| -rw-r--r-- | drivers/net/r8169.c | 19 | ||||
| -rw-r--r-- | drivers/net/via-velocity.c | 12 |
13 files changed, 88 insertions, 134 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c index 93b7c904bba9..d2150baa7e35 100644 --- a/drivers/net/8139cp.c +++ b/drivers/net/8139cp.c | |||
| @@ -1836,11 +1836,10 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 1836 | 1836 | ||
| 1837 | if (pdev->vendor == PCI_VENDOR_ID_REALTEK && | 1837 | if (pdev->vendor == PCI_VENDOR_ID_REALTEK && |
| 1838 | pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pci_rev < 0x20) { | 1838 | pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pci_rev < 0x20) { |
| 1839 | dev_printk(KERN_ERR, &pdev->dev, | 1839 | dev_err(&pdev->dev, |
| 1840 | "This (id %04x:%04x rev %02x) is not an 8139C+ compatible chip\n", | 1840 | "This (id %04x:%04x rev %02x) is not an 8139C+ compatible chip\n", |
| 1841 | pdev->vendor, pdev->device, pci_rev); | 1841 | pdev->vendor, pdev->device, pci_rev); |
| 1842 | dev_printk(KERN_ERR, &pdev->dev, | 1842 | dev_err(&pdev->dev, "Try the \"8139too\" driver instead.\n"); |
| 1843 | "Try the \"8139too\" driver instead.\n"); | ||
| 1844 | return -ENODEV; | 1843 | return -ENODEV; |
| 1845 | } | 1844 | } |
| 1846 | 1845 | ||
| @@ -1878,13 +1877,12 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 1878 | pciaddr = pci_resource_start(pdev, 1); | 1877 | pciaddr = pci_resource_start(pdev, 1); |
| 1879 | if (!pciaddr) { | 1878 | if (!pciaddr) { |
| 1880 | rc = -EIO; | 1879 | rc = -EIO; |
| 1881 | dev_printk(KERN_ERR, &pdev->dev, "no MMIO resource\n"); | 1880 | dev_err(&pdev->dev, "no MMIO resource\n"); |
| 1882 | goto err_out_res; | 1881 | goto err_out_res; |
| 1883 | } | 1882 | } |
| 1884 | if (pci_resource_len(pdev, 1) < CP_REGS_SIZE) { | 1883 | if (pci_resource_len(pdev, 1) < CP_REGS_SIZE) { |
| 1885 | rc = -EIO; | 1884 | rc = -EIO; |
| 1886 | dev_printk(KERN_ERR, &pdev->dev, | 1885 | dev_err(&pdev->dev, "MMIO resource (%llx) too small\n", |
| 1887 | "MMIO resource (%llx) too small\n", | ||
| 1888 | (unsigned long long)pci_resource_len(pdev, 1)); | 1886 | (unsigned long long)pci_resource_len(pdev, 1)); |
| 1889 | goto err_out_res; | 1887 | goto err_out_res; |
| 1890 | } | 1888 | } |
| @@ -1899,13 +1897,13 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 1899 | 1897 | ||
| 1900 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | 1898 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); |
| 1901 | if (rc) { | 1899 | if (rc) { |
| 1902 | dev_printk(KERN_ERR, &pdev->dev, | 1900 | dev_err(&pdev->dev, |
| 1903 | "No usable DMA configuration, aborting.\n"); | 1901 | "No usable DMA configuration, aborting.\n"); |
| 1904 | goto err_out_res; | 1902 | goto err_out_res; |
| 1905 | } | 1903 | } |
| 1906 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); | 1904 | rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); |
| 1907 | if (rc) { | 1905 | if (rc) { |
| 1908 | dev_printk(KERN_ERR, &pdev->dev, | 1906 | dev_err(&pdev->dev, |
| 1909 | "No usable consistent DMA configuration, " | 1907 | "No usable consistent DMA configuration, " |
| 1910 | "aborting.\n"); | 1908 | "aborting.\n"); |
| 1911 | goto err_out_res; | 1909 | goto err_out_res; |
| @@ -1918,8 +1916,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 1918 | regs = ioremap(pciaddr, CP_REGS_SIZE); | 1916 | regs = ioremap(pciaddr, CP_REGS_SIZE); |
| 1919 | if (!regs) { | 1917 | if (!regs) { |
| 1920 | rc = -EIO; | 1918 | rc = -EIO; |
| 1921 | dev_printk(KERN_ERR, &pdev->dev, | 1919 | dev_err(&pdev->dev, "Cannot map PCI MMIO (%lx@%lx)\n", |
| 1922 | "Cannot map PCI MMIO (%llx@%llx)\n", | ||
| 1923 | (unsigned long long)pci_resource_len(pdev, 1), | 1920 | (unsigned long long)pci_resource_len(pdev, 1), |
| 1924 | (unsigned long long)pciaddr); | 1921 | (unsigned long long)pciaddr); |
| 1925 | goto err_out_res; | 1922 | goto err_out_res; |
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 | ||
diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 5815e3dc1251..bea0fc0ede2f 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c | |||
| @@ -2120,13 +2120,13 @@ 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 | dev_printk(KERN_ERR, &pdev->dev, "Cannot enable PCI device, " | 2123 | dev_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 | dev_printk(KERN_ERR, &pdev->dev, | 2129 | dev_err(&pdev->dev, |
| 2130 | "Cannot find proper PCI device " | 2130 | "Cannot find proper PCI device " |
| 2131 | "base address, aborting.\n"); | 2131 | "base address, aborting.\n"); |
| 2132 | err = -ENODEV; | 2132 | err = -ENODEV; |
| @@ -2135,7 +2135,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev, | |||
| 2135 | 2135 | ||
| 2136 | err = pci_request_regions(pdev, DRV_MODULE_NAME); | 2136 | err = pci_request_regions(pdev, DRV_MODULE_NAME); |
| 2137 | if (err) { | 2137 | if (err) { |
| 2138 | dev_printk(KERN_ERR, &pdev->dev, | 2138 | dev_err(&pdev->dev, |
| 2139 | "Cannot obtain PCI resources, aborting.\n"); | 2139 | "Cannot obtain PCI resources, aborting.\n"); |
| 2140 | goto err_out_disable_pdev; | 2140 | goto err_out_disable_pdev; |
| 2141 | } | 2141 | } |
| @@ -2144,15 +2144,13 @@ static int __devinit b44_init_one(struct pci_dev *pdev, | |||
| 2144 | 2144 | ||
| 2145 | err = pci_set_dma_mask(pdev, (u64) B44_DMA_MASK); | 2145 | err = pci_set_dma_mask(pdev, (u64) B44_DMA_MASK); |
| 2146 | if (err) { | 2146 | if (err) { |
| 2147 | dev_printk(KERN_ERR, &pdev->dev, | 2147 | dev_err(&pdev->dev, "No usable DMA configuration, aborting.\n"); |
| 2148 | "No usable DMA configuration, aborting.\n"); | ||
| 2149 | goto err_out_free_res; | 2148 | goto err_out_free_res; |
| 2150 | } | 2149 | } |
| 2151 | 2150 | ||
| 2152 | err = pci_set_consistent_dma_mask(pdev, (u64) B44_DMA_MASK); | 2151 | err = pci_set_consistent_dma_mask(pdev, (u64) B44_DMA_MASK); |
| 2153 | if (err) { | 2152 | if (err) { |
| 2154 | dev_printk(KERN_ERR, &pdev->dev, | 2153 | dev_err(&pdev->dev, "No usable DMA configuration, aborting.\n"); |
| 2155 | "No usable DMA configuration, aborting.\n"); | ||
| 2156 | goto err_out_free_res; | 2154 | goto err_out_free_res; |
| 2157 | } | 2155 | } |
| 2158 | 2156 | ||
| @@ -2161,8 +2159,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev, | |||
| 2161 | 2159 | ||
| 2162 | dev = alloc_etherdev(sizeof(*bp)); | 2160 | dev = alloc_etherdev(sizeof(*bp)); |
| 2163 | if (!dev) { | 2161 | if (!dev) { |
| 2164 | dev_printk(KERN_ERR, &pdev->dev, | 2162 | dev_err(&pdev->dev, "Etherdev alloc failed, aborting.\n"); |
| 2165 | "Etherdev alloc failed, aborting.\n"); | ||
| 2166 | err = -ENOMEM; | 2163 | err = -ENOMEM; |
| 2167 | goto err_out_free_res; | 2164 | goto err_out_free_res; |
| 2168 | } | 2165 | } |
| @@ -2183,8 +2180,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev, | |||
| 2183 | 2180 | ||
| 2184 | bp->regs = ioremap(b44reg_base, b44reg_len); | 2181 | bp->regs = ioremap(b44reg_base, b44reg_len); |
| 2185 | if (bp->regs == 0UL) { | 2182 | if (bp->regs == 0UL) { |
| 2186 | dev_printk(KERN_ERR, &pdev->dev, "Cannot map device registers, " | 2183 | dev_err(&pdev->dev, "Cannot map device registers, aborting.\n"); |
| 2187 | "aborting.\n"); | ||
| 2188 | err = -ENOMEM; | 2184 | err = -ENOMEM; |
| 2189 | goto err_out_free_dev; | 2185 | goto err_out_free_dev; |
| 2190 | } | 2186 | } |
| @@ -2214,7 +2210,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev, | |||
| 2214 | 2210 | ||
| 2215 | err = b44_get_invariants(bp); | 2211 | err = b44_get_invariants(bp); |
| 2216 | if (err) { | 2212 | if (err) { |
| 2217 | dev_printk(KERN_ERR, &pdev->dev, | 2213 | dev_err(&pdev->dev, |
| 2218 | "Problem fetching invariants of chip, aborting.\n"); | 2214 | "Problem fetching invariants of chip, aborting.\n"); |
| 2219 | goto err_out_iounmap; | 2215 | goto err_out_iounmap; |
| 2220 | } | 2216 | } |
| @@ -2235,8 +2231,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev, | |||
| 2235 | 2231 | ||
| 2236 | err = register_netdev(dev); | 2232 | err = register_netdev(dev); |
| 2237 | if (err) { | 2233 | if (err) { |
| 2238 | dev_printk(KERN_ERR, &pdev->dev, "Cannot register net device, " | 2234 | dev_err(&pdev->dev, "Cannot register net device, aborting.\n"); |
| 2239 | "aborting.\n"); | ||
| 2240 | goto err_out_iounmap; | 2235 | goto err_out_iounmap; |
| 2241 | } | 2236 | } |
| 2242 | 2237 | ||
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 5502b9aeda53..64b6a72b4f6a 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
| @@ -5575,13 +5575,12 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
| 5575 | /* enable device (incl. PCI PM wakeup), and bus-mastering */ | 5575 | /* enable device (incl. PCI PM wakeup), and bus-mastering */ |
| 5576 | rc = pci_enable_device(pdev); | 5576 | rc = pci_enable_device(pdev); |
| 5577 | if (rc) { | 5577 | if (rc) { |
| 5578 | dev_printk(KERN_ERR, &pdev->dev, | 5578 | dev_err(&pdev->dev, "Cannot enable PCI device, aborting."); |
| 5579 | "Cannot enable PCI device, aborting."); | ||
| 5580 | goto err_out; | 5579 | goto err_out; |
| 5581 | } | 5580 | } |
| 5582 | 5581 | ||
| 5583 | if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { | 5582 | if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { |
| 5584 | dev_printk(KERN_ERR, &pdev->dev, | 5583 | dev_err(&pdev->dev, |
| 5585 | "Cannot find PCI device base address, aborting.\n"); | 5584 | "Cannot find PCI device base address, aborting.\n"); |
| 5586 | rc = -ENODEV; | 5585 | rc = -ENODEV; |
| 5587 | goto err_out_disable; | 5586 | goto err_out_disable; |
| @@ -5589,8 +5588,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
| 5589 | 5588 | ||
| 5590 | rc = pci_request_regions(pdev, DRV_MODULE_NAME); | 5589 | rc = pci_request_regions(pdev, DRV_MODULE_NAME); |
| 5591 | if (rc) { | 5590 | if (rc) { |
| 5592 | dev_printk(KERN_ERR, &pdev->dev, | 5591 | dev_err(&pdev->dev, "Cannot obtain PCI resources, aborting.\n"); |
| 5593 | "Cannot obtain PCI resources, aborting.\n"); | ||
| 5594 | goto err_out_disable; | 5592 | goto err_out_disable; |
| 5595 | } | 5593 | } |
| 5596 | 5594 | ||
| @@ -5598,7 +5596,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
| 5598 | 5596 | ||
| 5599 | bp->pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM); | 5597 | bp->pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM); |
| 5600 | if (bp->pm_cap == 0) { | 5598 | if (bp->pm_cap == 0) { |
| 5601 | dev_printk(KERN_ERR, &pdev->dev, | 5599 | dev_err(&pdev->dev, |
| 5602 | "Cannot find power management capability, aborting.\n"); | 5600 | "Cannot find power management capability, aborting.\n"); |
| 5603 | rc = -EIO; | 5601 | rc = -EIO; |
| 5604 | goto err_out_release; | 5602 | goto err_out_release; |
| @@ -5606,8 +5604,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
| 5606 | 5604 | ||
| 5607 | bp->pcix_cap = pci_find_capability(pdev, PCI_CAP_ID_PCIX); | 5605 | bp->pcix_cap = pci_find_capability(pdev, PCI_CAP_ID_PCIX); |
| 5608 | if (bp->pcix_cap == 0) { | 5606 | if (bp->pcix_cap == 0) { |
| 5609 | dev_printk(KERN_ERR, &pdev->dev, | 5607 | dev_err(&pdev->dev, "Cannot find PCIX capability, aborting.\n"); |
| 5610 | "Cannot find PCIX capability, aborting.\n"); | ||
| 5611 | rc = -EIO; | 5608 | rc = -EIO; |
| 5612 | goto err_out_release; | 5609 | goto err_out_release; |
| 5613 | } | 5610 | } |
| @@ -5615,15 +5612,14 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
| 5615 | if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) == 0) { | 5612 | if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) == 0) { |
| 5616 | bp->flags |= USING_DAC_FLAG; | 5613 | bp->flags |= USING_DAC_FLAG; |
| 5617 | if (pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK) != 0) { | 5614 | if (pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK) != 0) { |
| 5618 | dev_printk(KERN_ERR, &pdev->dev, | 5615 | dev_err(&pdev->dev, |
| 5619 | "pci_set_consistent_dma_mask failed, aborting.\n"); | 5616 | "pci_set_consistent_dma_mask failed, aborting.\n"); |
| 5620 | rc = -EIO; | 5617 | rc = -EIO; |
| 5621 | goto err_out_release; | 5618 | goto err_out_release; |
| 5622 | } | 5619 | } |
| 5623 | } | 5620 | } |
| 5624 | else if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) { | 5621 | else if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) { |
| 5625 | dev_printk(KERN_ERR, &pdev->dev, | 5622 | dev_err(&pdev->dev, "System does not support DMA, aborting.\n"); |
| 5626 | "System does not support DMA, aborting.\n"); | ||
| 5627 | rc = -EIO; | 5623 | rc = -EIO; |
| 5628 | goto err_out_release; | 5624 | goto err_out_release; |
| 5629 | } | 5625 | } |
| @@ -5643,8 +5639,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
| 5643 | bp->regview = ioremap_nocache(dev->base_addr, mem_len); | 5639 | bp->regview = ioremap_nocache(dev->base_addr, mem_len); |
| 5644 | 5640 | ||
| 5645 | if (!bp->regview) { | 5641 | if (!bp->regview) { |
| 5646 | dev_printk(KERN_ERR, &pdev->dev, | 5642 | dev_err(&pdev->dev, "Cannot map register space, aborting.\n"); |
| 5647 | "Cannot map register space, aborting.\n"); | ||
| 5648 | rc = -ENOMEM; | 5643 | rc = -ENOMEM; |
| 5649 | goto err_out_release; | 5644 | goto err_out_release; |
| 5650 | } | 5645 | } |
| @@ -5716,7 +5711,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
| 5716 | else if ((CHIP_ID(bp) == CHIP_ID_5706_A1) && | 5711 | else if ((CHIP_ID(bp) == CHIP_ID_5706_A1) && |
| 5717 | !(bp->flags & PCIX_FLAG)) { | 5712 | !(bp->flags & PCIX_FLAG)) { |
| 5718 | 5713 | ||
| 5719 | dev_printk(KERN_ERR, &pdev->dev, | 5714 | dev_err(&pdev->dev, |
| 5720 | "5706 A1 can only be used in a PCIX bus, aborting.\n"); | 5715 | "5706 A1 can only be used in a PCIX bus, aborting.\n"); |
| 5721 | goto err_out_unmap; | 5716 | goto err_out_unmap; |
| 5722 | } | 5717 | } |
| @@ -5738,8 +5733,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
| 5738 | 5733 | ||
| 5739 | if ((reg & BNX2_DEV_INFO_SIGNATURE_MAGIC_MASK) != | 5734 | if ((reg & BNX2_DEV_INFO_SIGNATURE_MAGIC_MASK) != |
| 5740 | BNX2_DEV_INFO_SIGNATURE_MAGIC) { | 5735 | BNX2_DEV_INFO_SIGNATURE_MAGIC) { |
| 5741 | dev_printk(KERN_ERR, &pdev->dev, | 5736 | dev_err(&pdev->dev, "Firmware not running, aborting.\n"); |
| 5742 | "Firmware not running, aborting.\n"); | ||
| 5743 | rc = -ENODEV; | 5737 | rc = -ENODEV; |
| 5744 | goto err_out_unmap; | 5738 | goto err_out_unmap; |
| 5745 | } | 5739 | } |
| @@ -5901,8 +5895,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 5901 | #endif | 5895 | #endif |
| 5902 | 5896 | ||
| 5903 | if ((rc = register_netdev(dev))) { | 5897 | if ((rc = register_netdev(dev))) { |
| 5904 | dev_printk(KERN_ERR, &pdev->dev, | 5898 | dev_err(&pdev->dev, "Cannot register net device\n"); |
| 5905 | "Cannot register net device\n"); | ||
| 5906 | if (bp->regview) | 5899 | if (bp->regview) |
| 5907 | iounmap(bp->regview); | 5900 | iounmap(bp->regview); |
| 5908 | pci_release_regions(pdev); | 5901 | pci_release_regions(pdev); |
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 428e2067738c..a31544ccb3c4 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
| @@ -4887,13 +4887,12 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
| 4887 | 4887 | ||
| 4888 | err = pci_enable_device(pdev); | 4888 | err = pci_enable_device(pdev); |
| 4889 | if (err) { | 4889 | if (err) { |
| 4890 | dev_printk(KERN_ERR, &pdev->dev, "Cannot enable PCI device, " | 4890 | dev_err(&pdev->dev, "Cannot enable PCI device, aborting.\n"); |
| 4891 | "aborting.\n"); | ||
| 4892 | return err; | 4891 | return err; |
| 4893 | } | 4892 | } |
| 4894 | 4893 | ||
| 4895 | if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { | 4894 | if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { |
| 4896 | dev_printk(KERN_ERR, &pdev->dev, "Cannot find proper PCI device " | 4895 | dev_err(&pdev->dev, "Cannot find proper PCI device " |
| 4897 | "base address, aborting.\n"); | 4896 | "base address, aborting.\n"); |
| 4898 | err = -ENODEV; | 4897 | err = -ENODEV; |
| 4899 | goto err_out_disable_pdev; | 4898 | goto err_out_disable_pdev; |
| @@ -4901,7 +4900,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
| 4901 | 4900 | ||
| 4902 | dev = alloc_etherdev(sizeof(*cp)); | 4901 | dev = alloc_etherdev(sizeof(*cp)); |
| 4903 | if (!dev) { | 4902 | if (!dev) { |
| 4904 | dev_printk(KERN_ERR, &pdev->dev, "Etherdev alloc failed, aborting.\n"); | 4903 | dev_err(&pdev->dev, "Etherdev alloc failed, aborting.\n"); |
| 4905 | err = -ENOMEM; | 4904 | err = -ENOMEM; |
| 4906 | goto err_out_disable_pdev; | 4905 | goto err_out_disable_pdev; |
| 4907 | } | 4906 | } |
| @@ -4910,8 +4909,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
| 4910 | 4909 | ||
| 4911 | err = pci_request_regions(pdev, dev->name); | 4910 | err = pci_request_regions(pdev, dev->name); |
| 4912 | if (err) { | 4911 | if (err) { |
| 4913 | dev_printk(KERN_ERR, &pdev->dev, "Cannot obtain PCI resources, " | 4912 | dev_err(&pdev->dev, "Cannot obtain PCI resources, aborting.\n"); |
| 4914 | "aborting.\n"); | ||
| 4915 | goto err_out_free_netdev; | 4913 | goto err_out_free_netdev; |
| 4916 | } | 4914 | } |
| 4917 | pci_set_master(pdev); | 4915 | pci_set_master(pdev); |
| @@ -4941,7 +4939,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
| 4941 | if (pci_write_config_byte(pdev, | 4939 | if (pci_write_config_byte(pdev, |
| 4942 | PCI_CACHE_LINE_SIZE, | 4940 | PCI_CACHE_LINE_SIZE, |
| 4943 | cas_cacheline_size)) { | 4941 | cas_cacheline_size)) { |
| 4944 | dev_printk(KERN_ERR, &pdev->dev, "Could not set PCI cache " | 4942 | dev_err(&pdev->dev, "Could not set PCI cache " |
| 4945 | "line size\n"); | 4943 | "line size\n"); |
| 4946 | goto err_write_cacheline; | 4944 | goto err_write_cacheline; |
| 4947 | } | 4945 | } |
| @@ -4955,7 +4953,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
| 4955 | err = pci_set_consistent_dma_mask(pdev, | 4953 | err = pci_set_consistent_dma_mask(pdev, |
| 4956 | DMA_64BIT_MASK); | 4954 | DMA_64BIT_MASK); |
| 4957 | if (err < 0) { | 4955 | if (err < 0) { |
| 4958 | dev_printk(KERN_ERR, &pdev->dev, "Unable to obtain 64-bit DMA " | 4956 | dev_err(&pdev->dev, "Unable to obtain 64-bit DMA " |
| 4959 | "for consistent allocations\n"); | 4957 | "for consistent allocations\n"); |
| 4960 | goto err_out_free_res; | 4958 | goto err_out_free_res; |
| 4961 | } | 4959 | } |
| @@ -4963,7 +4961,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
| 4963 | } else { | 4961 | } else { |
| 4964 | err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | 4962 | err = pci_set_dma_mask(pdev, DMA_32BIT_MASK); |
| 4965 | if (err) { | 4963 | if (err) { |
| 4966 | dev_printk(KERN_ERR, &pdev->dev, "No usable DMA configuration, " | 4964 | dev_err(&pdev->dev, "No usable DMA configuration, " |
| 4967 | "aborting.\n"); | 4965 | "aborting.\n"); |
| 4968 | goto err_out_free_res; | 4966 | goto err_out_free_res; |
| 4969 | } | 4967 | } |
| @@ -5023,8 +5021,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
| 5023 | /* give us access to cassini registers */ | 5021 | /* give us access to cassini registers */ |
| 5024 | cp->regs = pci_iomap(pdev, 0, casreg_len); | 5022 | cp->regs = pci_iomap(pdev, 0, casreg_len); |
| 5025 | if (cp->regs == 0UL) { | 5023 | if (cp->regs == 0UL) { |
| 5026 | dev_printk(KERN_ERR, &pdev->dev, "Cannot map device registers, " | 5024 | dev_err(&pdev->dev, "Cannot map device registers, aborting.\n"); |
| 5027 | "aborting.\n"); | ||
| 5028 | goto err_out_free_res; | 5025 | goto err_out_free_res; |
| 5029 | } | 5026 | } |
| 5030 | cp->casreg_len = casreg_len; | 5027 | cp->casreg_len = casreg_len; |
| @@ -5040,8 +5037,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
| 5040 | pci_alloc_consistent(pdev, sizeof(struct cas_init_block), | 5037 | pci_alloc_consistent(pdev, sizeof(struct cas_init_block), |
| 5041 | &cp->block_dvma); | 5038 | &cp->block_dvma); |
| 5042 | if (!cp->init_block) { | 5039 | if (!cp->init_block) { |
| 5043 | dev_printk(KERN_ERR, &pdev->dev, "Cannot allocate init block, " | 5040 | dev_err(&pdev->dev, "Cannot allocate init block, aborting.\n"); |
| 5044 | "aborting.\n"); | ||
| 5045 | goto err_out_iounmap; | 5041 | goto err_out_iounmap; |
| 5046 | } | 5042 | } |
| 5047 | 5043 | ||
| @@ -5085,8 +5081,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev, | |||
| 5085 | dev->features |= NETIF_F_HIGHDMA; | 5081 | dev->features |= NETIF_F_HIGHDMA; |
| 5086 | 5082 | ||
| 5087 | if (register_netdev(dev)) { | 5083 | if (register_netdev(dev)) { |
| 5088 | dev_printk(KERN_ERR, &pdev->dev, "Cannot register net device, " | 5084 | dev_err(&pdev->dev, "Cannot register net device, aborting.\n"); |
| 5089 | "aborting.\n"); | ||
| 5090 | goto err_out_free_consistent; | 5085 | goto err_out_free_consistent; |
| 5091 | } | 5086 | } |
| 5092 | 5087 | ||
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c index bccb12e03c2d..e445988c92ee 100644 --- a/drivers/net/eepro100.c +++ b/drivers/net/eepro100.c | |||
| @@ -555,14 +555,12 @@ static int __devinit eepro100_init_one (struct pci_dev *pdev, | |||
| 555 | 555 | ||
| 556 | if (!request_region(pci_resource_start(pdev, 1), | 556 | if (!request_region(pci_resource_start(pdev, 1), |
| 557 | pci_resource_len(pdev, 1), "eepro100")) { | 557 | pci_resource_len(pdev, 1), "eepro100")) { |
| 558 | dev_printk (KERN_ERR, &pdev->dev, | 558 | dev_err(&pdev->dev, "eepro100: cannot reserve I/O ports\n"); |
| 559 | "eepro100: cannot reserve I/O ports\n"); | ||
| 560 | goto err_out_none; | 559 | goto err_out_none; |
| 561 | } | 560 | } |
| 562 | if (!request_mem_region(pci_resource_start(pdev, 0), | 561 | if (!request_mem_region(pci_resource_start(pdev, 0), |
| 563 | pci_resource_len(pdev, 0), "eepro100")) { | 562 | pci_resource_len(pdev, 0), "eepro100")) { |
| 564 | dev_printk (KERN_ERR, &pdev->dev, | 563 | dev_err(&pdev->dev, "eepro100: cannot reserve MMIO region\n"); |
| 565 | "eepro100: cannot reserve MMIO region\n"); | ||
| 566 | goto err_out_free_pio_region; | 564 | goto err_out_free_pio_region; |
| 567 | } | 565 | } |
| 568 | 566 | ||
| @@ -575,7 +573,7 @@ static int __devinit eepro100_init_one (struct pci_dev *pdev, | |||
| 575 | 573 | ||
| 576 | ioaddr = pci_iomap(pdev, pci_bar, 0); | 574 | ioaddr = pci_iomap(pdev, pci_bar, 0); |
| 577 | if (!ioaddr) { | 575 | if (!ioaddr) { |
| 578 | dev_printk (KERN_ERR, &pdev->dev, "eepro100: cannot remap IO\n"); | 576 | dev_err(&pdev->dev, "eepro100: cannot remap IO\n"); |
| 579 | goto err_out_free_mmio_region; | 577 | goto err_out_free_mmio_region; |
| 580 | } | 578 | } |
| 581 | 579 | ||
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c index 6dd0e9d159de..a67650ccf084 100644 --- a/drivers/net/epic100.c +++ b/drivers/net/epic100.c | |||
| @@ -335,7 +335,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev, | |||
| 335 | irq = pdev->irq; | 335 | irq = pdev->irq; |
| 336 | 336 | ||
| 337 | if (pci_resource_len(pdev, 0) < EPIC_TOTAL_SIZE) { | 337 | if (pci_resource_len(pdev, 0) < EPIC_TOTAL_SIZE) { |
| 338 | dev_printk(KERN_ERR, &pdev->dev, "no PCI region space\n"); | 338 | dev_err(&pdev->dev, "no PCI region space\n"); |
| 339 | ret = -ENODEV; | 339 | ret = -ENODEV; |
| 340 | goto err_out_disable; | 340 | goto err_out_disable; |
| 341 | } | 341 | } |
| @@ -350,7 +350,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev, | |||
| 350 | 350 | ||
| 351 | dev = alloc_etherdev(sizeof (*ep)); | 351 | dev = alloc_etherdev(sizeof (*ep)); |
| 352 | if (!dev) { | 352 | if (!dev) { |
| 353 | dev_printk(KERN_ERR, &pdev->dev, "no memory for eth device\n"); | 353 | dev_err(&pdev->dev, "no memory for eth device\n"); |
| 354 | goto err_out_free_res; | 354 | goto err_out_free_res; |
| 355 | } | 355 | } |
| 356 | SET_MODULE_OWNER(dev); | 356 | SET_MODULE_OWNER(dev); |
| @@ -362,7 +362,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev, | |||
| 362 | ioaddr = pci_resource_start (pdev, 1); | 362 | ioaddr = pci_resource_start (pdev, 1); |
| 363 | ioaddr = (long) ioremap (ioaddr, pci_resource_len (pdev, 1)); | 363 | ioaddr = (long) ioremap (ioaddr, pci_resource_len (pdev, 1)); |
| 364 | if (!ioaddr) { | 364 | if (!ioaddr) { |
| 365 | dev_printk(KERN_ERR, &pdev->dev, "ioremap failed\n"); | 365 | dev_err(&pdev->dev, "ioremap failed\n"); |
| 366 | goto err_out_free_netdev; | 366 | goto err_out_free_netdev; |
| 367 | } | 367 | } |
| 368 | #endif | 368 | #endif |
| @@ -444,7 +444,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev, | |||
| 444 | int mii_status = mdio_read(dev, phy, MII_BMSR); | 444 | int mii_status = mdio_read(dev, phy, MII_BMSR); |
| 445 | if (mii_status != 0xffff && mii_status != 0x0000) { | 445 | if (mii_status != 0xffff && mii_status != 0x0000) { |
| 446 | ep->phys[phy_idx++] = phy; | 446 | ep->phys[phy_idx++] = phy; |
| 447 | dev_printk(KERN_INFO, &pdev->dev, | 447 | dev_info(&pdev->dev, |
| 448 | "MII transceiver #%d control " | 448 | "MII transceiver #%d control " |
| 449 | "%4.4x status %4.4x.\n", | 449 | "%4.4x status %4.4x.\n", |
| 450 | phy, mdio_read(dev, phy, 0), mii_status); | 450 | phy, mdio_read(dev, phy, 0), mii_status); |
| @@ -454,12 +454,12 @@ static int __devinit epic_init_one (struct pci_dev *pdev, | |||
| 454 | if (phy_idx != 0) { | 454 | if (phy_idx != 0) { |
| 455 | phy = ep->phys[0]; | 455 | phy = ep->phys[0]; |
| 456 | ep->mii.advertising = mdio_read(dev, phy, MII_ADVERTISE); | 456 | ep->mii.advertising = mdio_read(dev, phy, MII_ADVERTISE); |
| 457 | dev_printk(KERN_INFO, &pdev->dev, | 457 | dev_info(&pdev->dev, |
| 458 | "Autonegotiation advertising %4.4x link " | 458 | "Autonegotiation advertising %4.4x link " |
| 459 | "partner %4.4x.\n", | 459 | "partner %4.4x.\n", |
| 460 | ep->mii.advertising, mdio_read(dev, phy, 5)); | 460 | ep->mii.advertising, mdio_read(dev, phy, 5)); |
| 461 | } else if ( ! (ep->chip_flags & NO_MII)) { | 461 | } else if ( ! (ep->chip_flags & NO_MII)) { |
| 462 | dev_printk(KERN_WARNING, &pdev->dev, | 462 | dev_warn(&pdev->dev, |
| 463 | "***WARNING***: No MII transceiver found!\n"); | 463 | "***WARNING***: No MII transceiver found!\n"); |
| 464 | /* Use the known PHY address of the EPII. */ | 464 | /* Use the known PHY address of the EPII. */ |
| 465 | ep->phys[0] = 3; | 465 | ep->phys[0] = 3; |
| @@ -475,8 +475,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev, | |||
| 475 | /* The lower four bits are the media type. */ | 475 | /* The lower four bits are the media type. */ |
| 476 | if (duplex) { | 476 | if (duplex) { |
| 477 | ep->mii.force_media = ep->mii.full_duplex = 1; | 477 | ep->mii.force_media = ep->mii.full_duplex = 1; |
| 478 | dev_printk(KERN_INFO, &pdev->dev, | 478 | dev_info(&pdev->dev, "Forced full duplex requested.\n"); |
| 479 | "Forced full duplex operation requested.\n"); | ||
| 480 | } | 479 | } |
| 481 | dev->if_port = ep->default_port = option; | 480 | dev->if_port = ep->default_port = option; |
| 482 | 481 | ||
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c index d26140ad36e9..97d34fee8c1f 100644 --- a/drivers/net/fealnx.c +++ b/drivers/net/fealnx.c | |||
| @@ -505,7 +505,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev, | |||
| 505 | 505 | ||
| 506 | len = pci_resource_len(pdev, bar); | 506 | len = pci_resource_len(pdev, bar); |
| 507 | if (len < MIN_REGION_SIZE) { | 507 | if (len < MIN_REGION_SIZE) { |
| 508 | dev_printk(KERN_ERR, &pdev->dev, | 508 | dev_err(&pdev->dev, |
| 509 | "region size %ld too small, aborting\n", len); | 509 | "region size %ld too small, aborting\n", len); |
| 510 | return -ENODEV; | 510 | return -ENODEV; |
| 511 | } | 511 | } |
| @@ -578,7 +578,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev, | |||
| 578 | 578 | ||
| 579 | if (mii_status != 0xffff && mii_status != 0x0000) { | 579 | if (mii_status != 0xffff && mii_status != 0x0000) { |
| 580 | np->phys[phy_idx++] = phy; | 580 | np->phys[phy_idx++] = phy; |
| 581 | dev_printk(KERN_INFO, &pdev->dev, | 581 | dev_info(&pdev->dev, |
| 582 | "MII PHY found at address %d, status " | 582 | "MII PHY found at address %d, status " |
| 583 | "0x%4.4x.\n", phy, mii_status); | 583 | "0x%4.4x.\n", phy, mii_status); |
| 584 | /* get phy type */ | 584 | /* get phy type */ |
| @@ -604,7 +604,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev, | |||
| 604 | 604 | ||
| 605 | np->mii_cnt = phy_idx; | 605 | np->mii_cnt = phy_idx; |
| 606 | if (phy_idx == 0) | 606 | if (phy_idx == 0) |
| 607 | dev_printk(KERN_WARNING, &pdev->dev, | 607 | dev_warn(&pdev->dev, |
| 608 | "MII PHY not found -- this device may " | 608 | "MII PHY not found -- this device may " |
| 609 | "not operate correctly.\n"); | 609 | "not operate correctly.\n"); |
| 610 | } else { | 610 | } else { |
| @@ -632,8 +632,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev, | |||
| 632 | np->mii.full_duplex = full_duplex[card_idx]; | 632 | np->mii.full_duplex = full_duplex[card_idx]; |
| 633 | 633 | ||
| 634 | if (np->mii.full_duplex) { | 634 | if (np->mii.full_duplex) { |
| 635 | dev_printk(KERN_INFO, &pdev->dev, | 635 | dev_info(&pdev->dev, "Media type forced to Full Duplex.\n"); |
| 636 | "Media type forced to Full Duplex.\n"); | ||
| 637 | /* 89/6/13 add, (begin) */ | 636 | /* 89/6/13 add, (begin) */ |
| 638 | // if (np->PHYType==MarvellPHY) | 637 | // if (np->PHYType==MarvellPHY) |
| 639 | if ((np->PHYType == MarvellPHY) || (np->PHYType == LevelOnePHY)) { | 638 | if ((np->PHYType == MarvellPHY) || (np->PHYType == LevelOnePHY)) { |
diff --git a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c index 4f226064d55e..34bdba9eec79 100644 --- a/drivers/net/ne2k-pci.c +++ b/drivers/net/ne2k-pci.c | |||
| @@ -231,14 +231,12 @@ 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 | dev_printk (KERN_ERR, &pdev->dev, | 234 | dev_err(&pdev->dev, "no I/O resource at PCI BAR #0\n"); |
| 235 | "no I/O resource at PCI BAR #0\n"); | ||
| 236 | return -ENODEV; | 235 | return -ENODEV; |
| 237 | } | 236 | } |
| 238 | 237 | ||
| 239 | if (request_region (ioaddr, NE_IO_EXTENT, DRV_NAME) == NULL) { | 238 | if (request_region (ioaddr, NE_IO_EXTENT, DRV_NAME) == NULL) { |
| 240 | dev_printk (KERN_ERR, &pdev->dev, | 239 | dev_err(&pdev->dev, "I/O resource 0x%x @ 0x%lx busy\n", |
| 241 | "I/O resource 0x%x @ 0x%lx busy\n", | ||
| 242 | NE_IO_EXTENT, ioaddr); | 240 | NE_IO_EXTENT, ioaddr); |
| 243 | return -EBUSY; | 241 | return -EBUSY; |
| 244 | } | 242 | } |
| @@ -265,8 +263,7 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev, | |||
| 265 | /* Allocate net_device, dev->priv; fill in 8390 specific dev fields. */ | 263 | /* Allocate net_device, dev->priv; fill in 8390 specific dev fields. */ |
| 266 | dev = alloc_ei_netdev(); | 264 | dev = alloc_ei_netdev(); |
| 267 | if (!dev) { | 265 | if (!dev) { |
| 268 | dev_printk (KERN_ERR, &pdev->dev, | 266 | dev_err(&pdev->dev, "cannot allocate ethernet device\n"); |
| 269 | "cannot allocate ethernet device\n"); | ||
| 270 | goto err_out_free_res; | 267 | goto err_out_free_res; |
| 271 | } | 268 | } |
| 272 | SET_MODULE_OWNER(dev); | 269 | SET_MODULE_OWNER(dev); |
| @@ -284,7 +281,7 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev, | |||
| 284 | while ((inb(ioaddr + EN0_ISR) & ENISR_RESET) == 0) | 281 | while ((inb(ioaddr + EN0_ISR) & ENISR_RESET) == 0) |
| 285 | /* Limit wait: '2' avoids jiffy roll-over. */ | 282 | /* Limit wait: '2' avoids jiffy roll-over. */ |
| 286 | if (jiffies - reset_start_time > 2) { | 283 | if (jiffies - reset_start_time > 2) { |
| 287 | dev_printk(KERN_ERR, &pdev->dev, | 284 | dev_err(&pdev->dev, |
| 288 | "Card failure (no reset ack).\n"); | 285 | "Card failure (no reset ack).\n"); |
| 289 | goto err_out_free_netdev; | 286 | goto err_out_free_netdev; |
| 290 | } | 287 | } |
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index d6e7ac2d0c94..d0ed8646902f 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c | |||
| @@ -1832,8 +1832,7 @@ 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 | dev_printk(KERN_WARNING, &pci_dev->dev, | 1835 | dev_warn(&pci_dev->dev, "pci_set_dma_mask failed!\n"); |
| 1836 | "pci_set_dma_mask failed!\n"); | ||
| 1837 | return -ENODEV; | 1836 | return -ENODEV; |
| 1838 | } | 1837 | } |
| 1839 | 1838 | ||
| @@ -1856,8 +1855,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ | |||
| 1856 | 1855 | ||
| 1857 | err = pci_enable_device(pci_dev); | 1856 | err = pci_enable_device(pci_dev); |
| 1858 | if (err) { | 1857 | if (err) { |
| 1859 | dev_printk(KERN_INFO, &pci_dev->dev, | 1858 | dev_info(&pci_dev->dev, "pci_enable_dev failed: %d\n", err); |
| 1860 | "pci_enable_dev failed: %d\n", err); | ||
| 1861 | goto out_free; | 1859 | goto out_free; |
| 1862 | } | 1860 | } |
| 1863 | 1861 | ||
| @@ -1886,8 +1884,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ | |||
| 1886 | err = request_irq(pci_dev->irq, ns83820_irq, IRQF_SHARED, | 1884 | err = request_irq(pci_dev->irq, ns83820_irq, IRQF_SHARED, |
| 1887 | DRV_NAME, ndev); | 1885 | DRV_NAME, ndev); |
| 1888 | if (err) { | 1886 | if (err) { |
| 1889 | dev_printk(KERN_INFO, &pci_dev->dev, | 1887 | dev_info(&pci_dev->dev, "unable to register irq %d, err %d\n", |
| 1890 | "unable to register irq %d, err %d\n", | ||
| 1891 | pci_dev->irq, err); | 1888 | pci_dev->irq, err); |
| 1892 | goto out_disable; | 1889 | goto out_disable; |
| 1893 | } | 1890 | } |
| @@ -1902,8 +1899,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ | |||
| 1902 | rtnl_lock(); | 1899 | rtnl_lock(); |
| 1903 | err = dev_alloc_name(ndev, ndev->name); | 1900 | err = dev_alloc_name(ndev, ndev->name); |
| 1904 | if (err < 0) { | 1901 | if (err < 0) { |
| 1905 | dev_printk(KERN_INFO, &pci_dev->dev, | 1902 | dev_info(&pci_dev->dev, "unable to get netdev name: %d\n", err); |
| 1906 | "unable to get netdev name: %d\n", err); | ||
| 1907 | goto out_free_irq; | 1903 | goto out_free_irq; |
| 1908 | } | 1904 | } |
| 1909 | 1905 | ||
diff --git a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c index 9c1ce318b077..e0e293964042 100644 --- a/drivers/net/pci-skeleton.c +++ b/drivers/net/pci-skeleton.c | |||
| @@ -601,8 +601,7 @@ 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 | dev_printk (KERN_ERR, &pdev->dev, | 604 | dev_err(&pdev->dev, "unable to alloc new ethernet\n"); |
| 605 | "unable to alloc new ethernet\n"); | ||
| 606 | DPRINTK ("EXIT, returning -ENOMEM\n"); | 605 | DPRINTK ("EXIT, returning -ENOMEM\n"); |
| 607 | return -ENOMEM; | 606 | return -ENOMEM; |
| 608 | } | 607 | } |
| @@ -632,16 +631,14 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev, | |||
| 632 | 631 | ||
| 633 | /* make sure PCI base addr 0 is PIO */ | 632 | /* make sure PCI base addr 0 is PIO */ |
| 634 | if (!(pio_flags & IORESOURCE_IO)) { | 633 | if (!(pio_flags & IORESOURCE_IO)) { |
| 635 | dev_printk (KERN_ERR, &pdev->dev, | 634 | dev_err(&pdev->dev, "region #0 not a PIO resource, aborting\n"); |
| 636 | "region #0 not a PIO resource, aborting\n"); | ||
| 637 | rc = -ENODEV; | 635 | rc = -ENODEV; |
| 638 | goto err_out; | 636 | goto err_out; |
| 639 | } | 637 | } |
| 640 | 638 | ||
| 641 | /* make sure PCI base addr 1 is MMIO */ | 639 | /* make sure PCI base addr 1 is MMIO */ |
| 642 | if (!(mmio_flags & IORESOURCE_MEM)) { | 640 | if (!(mmio_flags & IORESOURCE_MEM)) { |
| 643 | dev_printk (KERN_ERR, &pdev->dev, | 641 | dev_err(&pdev->dev, "region #1 not an MMIO resource, aborting\n"); |
| 644 | "region #1 not an MMIO resource, aborting\n"); | ||
| 645 | rc = -ENODEV; | 642 | rc = -ENODEV; |
| 646 | goto err_out; | 643 | goto err_out; |
| 647 | } | 644 | } |
| @@ -649,8 +646,7 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev, | |||
| 649 | /* check for weird/broken PCI region reporting */ | 646 | /* check for weird/broken PCI region reporting */ |
| 650 | if ((pio_len < NETDRV_MIN_IO_SIZE) || | 647 | if ((pio_len < NETDRV_MIN_IO_SIZE) || |
| 651 | (mmio_len < NETDRV_MIN_IO_SIZE)) { | 648 | (mmio_len < NETDRV_MIN_IO_SIZE)) { |
| 652 | dev_printk (KERN_ERR, &pdev->dev, | 649 | dev_err(&pdev->dev, "Invalid PCI region size(s), aborting\n"); |
| 653 | "Invalid PCI region size(s), aborting\n"); | ||
| 654 | rc = -ENODEV; | 650 | rc = -ENODEV; |
| 655 | goto err_out; | 651 | goto err_out; |
| 656 | } | 652 | } |
| @@ -667,8 +663,7 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev, | |||
| 667 | /* ioremap MMIO region */ | 663 | /* ioremap MMIO region */ |
| 668 | ioaddr = ioremap (mmio_start, mmio_len); | 664 | ioaddr = ioremap (mmio_start, mmio_len); |
| 669 | if (ioaddr == NULL) { | 665 | if (ioaddr == NULL) { |
| 670 | dev_printk (KERN_ERR, &pdev->dev, | 666 | dev_err(&pdev->dev, "cannot remap MMIO, aborting\n"); |
| 671 | "cannot remap MMIO, aborting\n"); | ||
| 672 | rc = -EIO; | 667 | rc = -EIO; |
| 673 | goto err_out_free_res; | 668 | goto err_out_free_res; |
| 674 | } | 669 | } |
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index ae2a1f8f1454..4c2f575faad7 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
| @@ -1406,8 +1406,7 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out, | |||
| 1406 | dev = alloc_etherdev(sizeof (*tp)); | 1406 | dev = alloc_etherdev(sizeof (*tp)); |
| 1407 | if (dev == NULL) { | 1407 | if (dev == NULL) { |
| 1408 | if (netif_msg_drv(&debug)) | 1408 | if (netif_msg_drv(&debug)) |
| 1409 | dev_printk(KERN_ERR, &pdev->dev, | 1409 | dev_err(&pdev->dev, "unable to alloc new ethernet\n"); |
| 1410 | "unable to alloc new ethernet\n"); | ||
| 1411 | goto err_out; | 1410 | goto err_out; |
| 1412 | } | 1411 | } |
| 1413 | 1412 | ||
| @@ -1420,7 +1419,7 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out, | |||
| 1420 | rc = pci_enable_device(pdev); | 1419 | rc = pci_enable_device(pdev); |
| 1421 | if (rc < 0) { | 1420 | if (rc < 0) { |
| 1422 | if (netif_msg_probe(tp)) | 1421 | if (netif_msg_probe(tp)) |
| 1423 | dev_printk(KERN_ERR, &pdev->dev, "enable failure\n"); | 1422 | dev_err(&pdev->dev, "enable failure\n"); |
| 1424 | goto err_out_free_dev; | 1423 | goto err_out_free_dev; |
| 1425 | } | 1424 | } |
| 1426 | 1425 | ||
| @@ -1437,14 +1436,14 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out, | |||
| 1437 | acpi_idle_state = pwr_command & PCI_PM_CTRL_STATE_MASK; | 1436 | acpi_idle_state = pwr_command & PCI_PM_CTRL_STATE_MASK; |
| 1438 | } else { | 1437 | } else { |
| 1439 | if (netif_msg_probe(tp)) | 1438 | if (netif_msg_probe(tp)) |
| 1440 | dev_printk(KERN_ERR, &pdev->dev, | 1439 | dev_err(&pdev->dev, |
| 1441 | "PowerManagement capability not found.\n"); | 1440 | "PowerManagement capability not found.\n"); |
| 1442 | } | 1441 | } |
| 1443 | 1442 | ||
| 1444 | /* make sure PCI base addr 1 is MMIO */ | 1443 | /* make sure PCI base addr 1 is MMIO */ |
| 1445 | if (!(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) { | 1444 | if (!(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) { |
| 1446 | if (netif_msg_probe(tp)) | 1445 | if (netif_msg_probe(tp)) |
| 1447 | dev_printk(KERN_ERR, &pdev->dev, | 1446 | dev_err(&pdev->dev, |
| 1448 | "region #1 not an MMIO resource, aborting\n"); | 1447 | "region #1 not an MMIO resource, aborting\n"); |
| 1449 | rc = -ENODEV; | 1448 | rc = -ENODEV; |
| 1450 | goto err_out_mwi; | 1449 | goto err_out_mwi; |
| @@ -1452,7 +1451,7 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out, | |||
| 1452 | /* check for weird/broken PCI region reporting */ | 1451 | /* check for weird/broken PCI region reporting */ |
| 1453 | if (pci_resource_len(pdev, 1) < R8169_REGS_SIZE) { | 1452 | if (pci_resource_len(pdev, 1) < R8169_REGS_SIZE) { |
| 1454 | if (netif_msg_probe(tp)) | 1453 | if (netif_msg_probe(tp)) |
| 1455 | dev_printk(KERN_ERR, &pdev->dev, | 1454 | dev_err(&pdev->dev, |
| 1456 | "Invalid PCI region size(s), aborting\n"); | 1455 | "Invalid PCI region size(s), aborting\n"); |
| 1457 | rc = -ENODEV; | 1456 | rc = -ENODEV; |
| 1458 | goto err_out_mwi; | 1457 | goto err_out_mwi; |
| @@ -1461,8 +1460,7 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out, | |||
| 1461 | rc = pci_request_regions(pdev, MODULENAME); | 1460 | rc = pci_request_regions(pdev, MODULENAME); |
| 1462 | if (rc < 0) { | 1461 | if (rc < 0) { |
| 1463 | if (netif_msg_probe(tp)) | 1462 | if (netif_msg_probe(tp)) |
| 1464 | dev_printk(KERN_ERR, &pdev->dev, | 1463 | dev_err(&pdev->dev, "could not request regions.\n"); |
| 1465 | "could not request regions.\n"); | ||
| 1466 | goto err_out_mwi; | 1464 | goto err_out_mwi; |
| 1467 | } | 1465 | } |
| 1468 | 1466 | ||
| @@ -1476,7 +1474,7 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out, | |||
| 1476 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | 1474 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); |
| 1477 | if (rc < 0) { | 1475 | if (rc < 0) { |
| 1478 | if (netif_msg_probe(tp)) | 1476 | if (netif_msg_probe(tp)) |
| 1479 | dev_printk(KERN_ERR, &pdev->dev, | 1477 | dev_err(&pdev->dev, |
| 1480 | "DMA configuration failed.\n"); | 1478 | "DMA configuration failed.\n"); |
| 1481 | goto err_out_free_res; | 1479 | goto err_out_free_res; |
| 1482 | } | 1480 | } |
| @@ -1488,8 +1486,7 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out, | |||
| 1488 | ioaddr = ioremap(pci_resource_start(pdev, 1), R8169_REGS_SIZE); | 1486 | ioaddr = ioremap(pci_resource_start(pdev, 1), R8169_REGS_SIZE); |
| 1489 | if (ioaddr == NULL) { | 1487 | if (ioaddr == NULL) { |
| 1490 | if (netif_msg_probe(tp)) | 1488 | if (netif_msg_probe(tp)) |
| 1491 | dev_printk(KERN_ERR, &pdev->dev, | 1489 | dev_err(&pdev->dev, "cannot remap MMIO, aborting\n"); |
| 1492 | "cannot remap MMIO, aborting\n"); | ||
| 1493 | rc = -EIO; | 1490 | rc = -EIO; |
| 1494 | goto err_out_free_res; | 1491 | goto err_out_free_res; |
| 1495 | } | 1492 | } |
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index 7e3b2a318146..f5b0078eb4ad 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
| @@ -695,14 +695,14 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi | |||
| 695 | * can support more than MAX_UNITS. | 695 | * can support more than MAX_UNITS. |
| 696 | */ | 696 | */ |
| 697 | if (velocity_nics >= MAX_UNITS) { | 697 | if (velocity_nics >= MAX_UNITS) { |
| 698 | dev_printk(KERN_NOTICE, &pdev->dev, "already found %d NICs.\n", | 698 | dev_notice(&pdev->dev, "already found %d NICs.\n", |
| 699 | velocity_nics); | 699 | velocity_nics); |
| 700 | return -ENODEV; | 700 | return -ENODEV; |
| 701 | } | 701 | } |
| 702 | 702 | ||
| 703 | dev = alloc_etherdev(sizeof(struct velocity_info)); | 703 | dev = alloc_etherdev(sizeof(struct velocity_info)); |
| 704 | if (!dev) { | 704 | if (!dev) { |
| 705 | dev_printk(KERN_ERR, &pdev->dev, "allocate net device failed.\n"); | 705 | dev_err(&pdev->dev, "allocate net device failed.\n"); |
| 706 | goto out; | 706 | goto out; |
| 707 | } | 707 | } |
| 708 | 708 | ||
| @@ -739,7 +739,7 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi | |||
| 739 | 739 | ||
| 740 | ret = pci_request_regions(pdev, VELOCITY_NAME); | 740 | ret = pci_request_regions(pdev, VELOCITY_NAME); |
| 741 | if (ret < 0) { | 741 | if (ret < 0) { |
| 742 | dev_printk(KERN_ERR, &pdev->dev, "No PCI resources.\n"); | 742 | dev_err(&pdev->dev, "No PCI resources.\n"); |
| 743 | goto err_disable; | 743 | goto err_disable; |
| 744 | } | 744 | } |
| 745 | 745 | ||
| @@ -895,19 +895,19 @@ static int __devinit velocity_get_pci_info(struct velocity_info *vptr, struct pc | |||
| 895 | vptr->memaddr = pci_resource_start(pdev, 1); | 895 | vptr->memaddr = pci_resource_start(pdev, 1); |
| 896 | 896 | ||
| 897 | if (!(pci_resource_flags(pdev, 0) & IORESOURCE_IO)) { | 897 | if (!(pci_resource_flags(pdev, 0) & IORESOURCE_IO)) { |
| 898 | dev_printk(KERN_ERR, &pdev->dev, | 898 | dev_err(&pdev->dev, |
| 899 | "region #0 is not an I/O resource, aborting.\n"); | 899 | "region #0 is not an I/O resource, aborting.\n"); |
| 900 | return -EINVAL; | 900 | return -EINVAL; |
| 901 | } | 901 | } |
| 902 | 902 | ||
| 903 | if ((pci_resource_flags(pdev, 1) & IORESOURCE_IO)) { | 903 | if ((pci_resource_flags(pdev, 1) & IORESOURCE_IO)) { |
| 904 | dev_printk(KERN_ERR, &pdev->dev, | 904 | dev_err(&pdev->dev, |
| 905 | "region #1 is an I/O resource, aborting.\n"); | 905 | "region #1 is an I/O resource, aborting.\n"); |
| 906 | return -EINVAL; | 906 | return -EINVAL; |
| 907 | } | 907 | } |
| 908 | 908 | ||
| 909 | if (pci_resource_len(pdev, 1) < VELOCITY_IO_SIZE) { | 909 | if (pci_resource_len(pdev, 1) < VELOCITY_IO_SIZE) { |
| 910 | dev_printk(KERN_ERR, &pdev->dev, "region #1 is too small.\n"); | 910 | dev_err(&pdev->dev, "region #1 is too small.\n"); |
| 911 | return -EINVAL; | 911 | return -EINVAL; |
| 912 | } | 912 | } |
| 913 | vptr->pdev = pdev; | 913 | vptr->pdev = pdev; |
