[netdrvr] use dev_xxx() printk helpers, rather than dev_printk(KERN_xxx, ...
Suggested by Jiri Slaby. Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
2e8a538d86
commit
9b91cf9daa
|
@ -1836,11 +1836,10 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
|
|
||||||
if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
|
if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
|
||||||
pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pci_rev < 0x20) {
|
pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pci_rev < 0x20) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"This (id %04x:%04x rev %02x) is not an 8139C+ compatible chip\n",
|
"This (id %04x:%04x rev %02x) is not an 8139C+ compatible chip\n",
|
||||||
pdev->vendor, pdev->device, pci_rev);
|
pdev->vendor, pdev->device, pci_rev);
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "Try the \"8139too\" driver instead.\n");
|
||||||
"Try the \"8139too\" driver instead.\n");
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1878,13 +1877,12 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
pciaddr = pci_resource_start(pdev, 1);
|
pciaddr = pci_resource_start(pdev, 1);
|
||||||
if (!pciaddr) {
|
if (!pciaddr) {
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "no MMIO resource\n");
|
dev_err(&pdev->dev, "no MMIO resource\n");
|
||||||
goto err_out_res;
|
goto err_out_res;
|
||||||
}
|
}
|
||||||
if (pci_resource_len(pdev, 1) < CP_REGS_SIZE) {
|
if (pci_resource_len(pdev, 1) < CP_REGS_SIZE) {
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "MMIO resource (%llx) too small\n",
|
||||||
"MMIO resource (%llx) too small\n",
|
|
||||||
(unsigned long long)pci_resource_len(pdev, 1));
|
(unsigned long long)pci_resource_len(pdev, 1));
|
||||||
goto err_out_res;
|
goto err_out_res;
|
||||||
}
|
}
|
||||||
|
@ -1899,13 +1897,13 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
|
|
||||||
rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"No usable DMA configuration, aborting.\n");
|
"No usable DMA configuration, aborting.\n");
|
||||||
goto err_out_res;
|
goto err_out_res;
|
||||||
}
|
}
|
||||||
rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
|
rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"No usable consistent DMA configuration, "
|
"No usable consistent DMA configuration, "
|
||||||
"aborting.\n");
|
"aborting.\n");
|
||||||
goto err_out_res;
|
goto err_out_res;
|
||||||
|
@ -1918,8 +1916,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
regs = ioremap(pciaddr, CP_REGS_SIZE);
|
regs = ioremap(pciaddr, CP_REGS_SIZE);
|
||||||
if (!regs) {
|
if (!regs) {
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "Cannot map PCI MMIO (%lx@%lx)\n",
|
||||||
"Cannot map PCI MMIO (%llx@%llx)\n",
|
|
||||||
(unsigned long long)pci_resource_len(pdev, 1),
|
(unsigned long long)pci_resource_len(pdev, 1),
|
||||||
(unsigned long long)pciaddr);
|
(unsigned long long)pciaddr);
|
||||||
goto err_out_res;
|
goto err_out_res;
|
||||||
|
|
|
@ -768,8 +768,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,
|
||||||
/* dev and priv zeroed in alloc_etherdev */
|
/* dev and priv zeroed in alloc_etherdev */
|
||||||
dev = alloc_etherdev (sizeof (*tp));
|
dev = alloc_etherdev (sizeof (*tp));
|
||||||
if (dev == NULL) {
|
if (dev == NULL) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "Unable to alloc new net device\n");
|
||||||
"Unable to alloc new net device\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
SET_MODULE_OWNER(dev);
|
SET_MODULE_OWNER(dev);
|
||||||
|
@ -801,29 +800,25 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,
|
||||||
#ifdef USE_IO_OPS
|
#ifdef USE_IO_OPS
|
||||||
/* make sure PCI base addr 0 is PIO */
|
/* make sure PCI base addr 0 is PIO */
|
||||||
if (!(pio_flags & IORESOURCE_IO)) {
|
if (!(pio_flags & IORESOURCE_IO)) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "region #0 not a PIO resource, aborting\n");
|
||||||
"region #0 not a PIO resource, aborting\n");
|
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
/* check for weird/broken PCI region reporting */
|
/* check for weird/broken PCI region reporting */
|
||||||
if (pio_len < RTL_MIN_IO_SIZE) {
|
if (pio_len < RTL_MIN_IO_SIZE) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "Invalid PCI I/O region size(s), aborting\n");
|
||||||
"Invalid PCI I/O region size(s), aborting\n");
|
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
/* make sure PCI base addr 1 is MMIO */
|
/* make sure PCI base addr 1 is MMIO */
|
||||||
if (!(mmio_flags & IORESOURCE_MEM)) {
|
if (!(mmio_flags & IORESOURCE_MEM)) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "region #1 not an MMIO resource, aborting\n");
|
||||||
"region #1 not an MMIO resource, aborting\n");
|
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
if (mmio_len < RTL_MIN_IO_SIZE) {
|
if (mmio_len < RTL_MIN_IO_SIZE) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "Invalid PCI mem region size(s), aborting\n");
|
||||||
"Invalid PCI mem region size(s), aborting\n");
|
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
@ -840,7 +835,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,
|
||||||
#ifdef USE_IO_OPS
|
#ifdef USE_IO_OPS
|
||||||
ioaddr = ioport_map(pio_start, pio_len);
|
ioaddr = ioport_map(pio_start, pio_len);
|
||||||
if (!ioaddr) {
|
if (!ioaddr) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev, "cannot map PIO, aborting\n");
|
dev_err(&pdev->dev, "cannot map PIO, aborting\n");
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
@ -851,8 +846,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,
|
||||||
/* ioremap MMIO region */
|
/* ioremap MMIO region */
|
||||||
ioaddr = pci_iomap(pdev, 1, 0);
|
ioaddr = pci_iomap(pdev, 1, 0);
|
||||||
if (ioaddr == NULL) {
|
if (ioaddr == NULL) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "cannot remap MMIO, aborting\n");
|
||||||
"cannot remap MMIO, aborting\n");
|
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
@ -866,8 +860,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev,
|
||||||
|
|
||||||
/* check for missing/broken hardware */
|
/* check for missing/broken hardware */
|
||||||
if (RTL_R32 (TxConfig) == 0xFFFFFFFF) {
|
if (RTL_R32 (TxConfig) == 0xFFFFFFFF) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "Chip not responding, ignoring board\n");
|
||||||
"Chip not responding, ignoring board\n");
|
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
@ -961,10 +954,10 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
|
||||||
|
|
||||||
if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
|
if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
|
||||||
pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pci_rev >= 0x20) {
|
pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pci_rev >= 0x20) {
|
||||||
dev_printk(KERN_INFO, &pdev->dev,
|
dev_info(&pdev->dev,
|
||||||
"This (id %04x:%04x rev %02x) is an enhanced 8139C+ chip\n",
|
"This (id %04x:%04x rev %02x) is an enhanced 8139C+ chip\n",
|
||||||
pdev->vendor, pdev->device, pci_rev);
|
pdev->vendor, pdev->device, pci_rev);
|
||||||
dev_printk(KERN_INFO, &pdev->dev,
|
dev_info(&pdev->dev,
|
||||||
"Use the \"8139cp\" driver for improved performance and stability.\n");
|
"Use the \"8139cp\" driver for improved performance and stability.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2120,13 +2120,13 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
|
||||||
|
|
||||||
err = pci_enable_device(pdev);
|
err = pci_enable_device(pdev);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "Cannot enable PCI device, "
|
dev_err(&pdev->dev, "Cannot enable PCI device, "
|
||||||
"aborting.\n");
|
"aborting.\n");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {
|
if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"Cannot find proper PCI device "
|
"Cannot find proper PCI device "
|
||||||
"base address, aborting.\n");
|
"base address, aborting.\n");
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
|
@ -2135,7 +2135,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
|
||||||
|
|
||||||
err = pci_request_regions(pdev, DRV_MODULE_NAME);
|
err = pci_request_regions(pdev, DRV_MODULE_NAME);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"Cannot obtain PCI resources, aborting.\n");
|
"Cannot obtain PCI resources, aborting.\n");
|
||||||
goto err_out_disable_pdev;
|
goto err_out_disable_pdev;
|
||||||
}
|
}
|
||||||
|
@ -2144,15 +2144,13 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
|
||||||
|
|
||||||
err = pci_set_dma_mask(pdev, (u64) B44_DMA_MASK);
|
err = pci_set_dma_mask(pdev, (u64) B44_DMA_MASK);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "No usable DMA configuration, aborting.\n");
|
||||||
"No usable DMA configuration, aborting.\n");
|
|
||||||
goto err_out_free_res;
|
goto err_out_free_res;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = pci_set_consistent_dma_mask(pdev, (u64) B44_DMA_MASK);
|
err = pci_set_consistent_dma_mask(pdev, (u64) B44_DMA_MASK);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "No usable DMA configuration, aborting.\n");
|
||||||
"No usable DMA configuration, aborting.\n");
|
|
||||||
goto err_out_free_res;
|
goto err_out_free_res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2161,8 +2159,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
|
||||||
|
|
||||||
dev = alloc_etherdev(sizeof(*bp));
|
dev = alloc_etherdev(sizeof(*bp));
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "Etherdev alloc failed, aborting.\n");
|
||||||
"Etherdev alloc failed, aborting.\n");
|
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto err_out_free_res;
|
goto err_out_free_res;
|
||||||
}
|
}
|
||||||
|
@ -2183,8 +2180,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
|
||||||
|
|
||||||
bp->regs = ioremap(b44reg_base, b44reg_len);
|
bp->regs = ioremap(b44reg_base, b44reg_len);
|
||||||
if (bp->regs == 0UL) {
|
if (bp->regs == 0UL) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "Cannot map device registers, "
|
dev_err(&pdev->dev, "Cannot map device registers, aborting.\n");
|
||||||
"aborting.\n");
|
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto err_out_free_dev;
|
goto err_out_free_dev;
|
||||||
}
|
}
|
||||||
|
@ -2214,7 +2210,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
|
||||||
|
|
||||||
err = b44_get_invariants(bp);
|
err = b44_get_invariants(bp);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"Problem fetching invariants of chip, aborting.\n");
|
"Problem fetching invariants of chip, aborting.\n");
|
||||||
goto err_out_iounmap;
|
goto err_out_iounmap;
|
||||||
}
|
}
|
||||||
|
@ -2235,8 +2231,7 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
|
||||||
|
|
||||||
err = register_netdev(dev);
|
err = register_netdev(dev);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "Cannot register net device, "
|
dev_err(&pdev->dev, "Cannot register net device, aborting.\n");
|
||||||
"aborting.\n");
|
|
||||||
goto err_out_iounmap;
|
goto err_out_iounmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5575,13 +5575,12 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
|
||||||
/* enable device (incl. PCI PM wakeup), and bus-mastering */
|
/* enable device (incl. PCI PM wakeup), and bus-mastering */
|
||||||
rc = pci_enable_device(pdev);
|
rc = pci_enable_device(pdev);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "Cannot enable PCI device, aborting.");
|
||||||
"Cannot enable PCI device, aborting.");
|
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {
|
if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"Cannot find PCI device base address, aborting.\n");
|
"Cannot find PCI device base address, aborting.\n");
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
goto err_out_disable;
|
goto err_out_disable;
|
||||||
|
@ -5589,8 +5588,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
|
||||||
|
|
||||||
rc = pci_request_regions(pdev, DRV_MODULE_NAME);
|
rc = pci_request_regions(pdev, DRV_MODULE_NAME);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "Cannot obtain PCI resources, aborting.\n");
|
||||||
"Cannot obtain PCI resources, aborting.\n");
|
|
||||||
goto err_out_disable;
|
goto err_out_disable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5598,7 +5596,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
|
||||||
|
|
||||||
bp->pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);
|
bp->pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);
|
||||||
if (bp->pm_cap == 0) {
|
if (bp->pm_cap == 0) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"Cannot find power management capability, aborting.\n");
|
"Cannot find power management capability, aborting.\n");
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
goto err_out_release;
|
goto err_out_release;
|
||||||
|
@ -5606,8 +5604,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
|
||||||
|
|
||||||
bp->pcix_cap = pci_find_capability(pdev, PCI_CAP_ID_PCIX);
|
bp->pcix_cap = pci_find_capability(pdev, PCI_CAP_ID_PCIX);
|
||||||
if (bp->pcix_cap == 0) {
|
if (bp->pcix_cap == 0) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "Cannot find PCIX capability, aborting.\n");
|
||||||
"Cannot find PCIX capability, aborting.\n");
|
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
goto err_out_release;
|
goto err_out_release;
|
||||||
}
|
}
|
||||||
|
@ -5615,15 +5612,14 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
|
||||||
if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) == 0) {
|
if (pci_set_dma_mask(pdev, DMA_64BIT_MASK) == 0) {
|
||||||
bp->flags |= USING_DAC_FLAG;
|
bp->flags |= USING_DAC_FLAG;
|
||||||
if (pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK) != 0) {
|
if (pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK) != 0) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"pci_set_consistent_dma_mask failed, aborting.\n");
|
"pci_set_consistent_dma_mask failed, aborting.\n");
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
goto err_out_release;
|
goto err_out_release;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) {
|
else if (pci_set_dma_mask(pdev, DMA_32BIT_MASK) != 0) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "System does not support DMA, aborting.\n");
|
||||||
"System does not support DMA, aborting.\n");
|
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
goto err_out_release;
|
goto err_out_release;
|
||||||
}
|
}
|
||||||
|
@ -5643,8 +5639,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
|
||||||
bp->regview = ioremap_nocache(dev->base_addr, mem_len);
|
bp->regview = ioremap_nocache(dev->base_addr, mem_len);
|
||||||
|
|
||||||
if (!bp->regview) {
|
if (!bp->regview) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "Cannot map register space, aborting.\n");
|
||||||
"Cannot map register space, aborting.\n");
|
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
goto err_out_release;
|
goto err_out_release;
|
||||||
}
|
}
|
||||||
|
@ -5716,7 +5711,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
|
||||||
else if ((CHIP_ID(bp) == CHIP_ID_5706_A1) &&
|
else if ((CHIP_ID(bp) == CHIP_ID_5706_A1) &&
|
||||||
!(bp->flags & PCIX_FLAG)) {
|
!(bp->flags & PCIX_FLAG)) {
|
||||||
|
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"5706 A1 can only be used in a PCIX bus, aborting.\n");
|
"5706 A1 can only be used in a PCIX bus, aborting.\n");
|
||||||
goto err_out_unmap;
|
goto err_out_unmap;
|
||||||
}
|
}
|
||||||
|
@ -5738,8 +5733,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
|
||||||
|
|
||||||
if ((reg & BNX2_DEV_INFO_SIGNATURE_MAGIC_MASK) !=
|
if ((reg & BNX2_DEV_INFO_SIGNATURE_MAGIC_MASK) !=
|
||||||
BNX2_DEV_INFO_SIGNATURE_MAGIC) {
|
BNX2_DEV_INFO_SIGNATURE_MAGIC) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "Firmware not running, aborting.\n");
|
||||||
"Firmware not running, aborting.\n");
|
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
goto err_out_unmap;
|
goto err_out_unmap;
|
||||||
}
|
}
|
||||||
|
@ -5901,8 +5895,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((rc = register_netdev(dev))) {
|
if ((rc = register_netdev(dev))) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "Cannot register net device\n");
|
||||||
"Cannot register net device\n");
|
|
||||||
if (bp->regview)
|
if (bp->regview)
|
||||||
iounmap(bp->regview);
|
iounmap(bp->regview);
|
||||||
pci_release_regions(pdev);
|
pci_release_regions(pdev);
|
||||||
|
|
|
@ -4887,13 +4887,12 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||||
|
|
||||||
err = pci_enable_device(pdev);
|
err = pci_enable_device(pdev);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "Cannot enable PCI device, "
|
dev_err(&pdev->dev, "Cannot enable PCI device, aborting.\n");
|
||||||
"aborting.\n");
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {
|
if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "Cannot find proper PCI device "
|
dev_err(&pdev->dev, "Cannot find proper PCI device "
|
||||||
"base address, aborting.\n");
|
"base address, aborting.\n");
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto err_out_disable_pdev;
|
goto err_out_disable_pdev;
|
||||||
|
@ -4901,7 +4900,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||||
|
|
||||||
dev = alloc_etherdev(sizeof(*cp));
|
dev = alloc_etherdev(sizeof(*cp));
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "Etherdev alloc failed, aborting.\n");
|
dev_err(&pdev->dev, "Etherdev alloc failed, aborting.\n");
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto err_out_disable_pdev;
|
goto err_out_disable_pdev;
|
||||||
}
|
}
|
||||||
|
@ -4910,8 +4909,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||||
|
|
||||||
err = pci_request_regions(pdev, dev->name);
|
err = pci_request_regions(pdev, dev->name);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "Cannot obtain PCI resources, "
|
dev_err(&pdev->dev, "Cannot obtain PCI resources, aborting.\n");
|
||||||
"aborting.\n");
|
|
||||||
goto err_out_free_netdev;
|
goto err_out_free_netdev;
|
||||||
}
|
}
|
||||||
pci_set_master(pdev);
|
pci_set_master(pdev);
|
||||||
|
@ -4941,7 +4939,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||||
if (pci_write_config_byte(pdev,
|
if (pci_write_config_byte(pdev,
|
||||||
PCI_CACHE_LINE_SIZE,
|
PCI_CACHE_LINE_SIZE,
|
||||||
cas_cacheline_size)) {
|
cas_cacheline_size)) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "Could not set PCI cache "
|
dev_err(&pdev->dev, "Could not set PCI cache "
|
||||||
"line size\n");
|
"line size\n");
|
||||||
goto err_write_cacheline;
|
goto err_write_cacheline;
|
||||||
}
|
}
|
||||||
|
@ -4955,7 +4953,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||||
err = pci_set_consistent_dma_mask(pdev,
|
err = pci_set_consistent_dma_mask(pdev,
|
||||||
DMA_64BIT_MASK);
|
DMA_64BIT_MASK);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "Unable to obtain 64-bit DMA "
|
dev_err(&pdev->dev, "Unable to obtain 64-bit DMA "
|
||||||
"for consistent allocations\n");
|
"for consistent allocations\n");
|
||||||
goto err_out_free_res;
|
goto err_out_free_res;
|
||||||
}
|
}
|
||||||
|
@ -4963,7 +4961,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||||
} else {
|
} else {
|
||||||
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "No usable DMA configuration, "
|
dev_err(&pdev->dev, "No usable DMA configuration, "
|
||||||
"aborting.\n");
|
"aborting.\n");
|
||||||
goto err_out_free_res;
|
goto err_out_free_res;
|
||||||
}
|
}
|
||||||
|
@ -5023,8 +5021,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||||
/* give us access to cassini registers */
|
/* give us access to cassini registers */
|
||||||
cp->regs = pci_iomap(pdev, 0, casreg_len);
|
cp->regs = pci_iomap(pdev, 0, casreg_len);
|
||||||
if (cp->regs == 0UL) {
|
if (cp->regs == 0UL) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "Cannot map device registers, "
|
dev_err(&pdev->dev, "Cannot map device registers, aborting.\n");
|
||||||
"aborting.\n");
|
|
||||||
goto err_out_free_res;
|
goto err_out_free_res;
|
||||||
}
|
}
|
||||||
cp->casreg_len = casreg_len;
|
cp->casreg_len = casreg_len;
|
||||||
|
@ -5040,8 +5037,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||||
pci_alloc_consistent(pdev, sizeof(struct cas_init_block),
|
pci_alloc_consistent(pdev, sizeof(struct cas_init_block),
|
||||||
&cp->block_dvma);
|
&cp->block_dvma);
|
||||||
if (!cp->init_block) {
|
if (!cp->init_block) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "Cannot allocate init block, "
|
dev_err(&pdev->dev, "Cannot allocate init block, aborting.\n");
|
||||||
"aborting.\n");
|
|
||||||
goto err_out_iounmap;
|
goto err_out_iounmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5085,8 +5081,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
|
||||||
dev->features |= NETIF_F_HIGHDMA;
|
dev->features |= NETIF_F_HIGHDMA;
|
||||||
|
|
||||||
if (register_netdev(dev)) {
|
if (register_netdev(dev)) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "Cannot register net device, "
|
dev_err(&pdev->dev, "Cannot register net device, aborting.\n");
|
||||||
"aborting.\n");
|
|
||||||
goto err_out_free_consistent;
|
goto err_out_free_consistent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -555,14 +555,12 @@ static int __devinit eepro100_init_one (struct pci_dev *pdev,
|
||||||
|
|
||||||
if (!request_region(pci_resource_start(pdev, 1),
|
if (!request_region(pci_resource_start(pdev, 1),
|
||||||
pci_resource_len(pdev, 1), "eepro100")) {
|
pci_resource_len(pdev, 1), "eepro100")) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "eepro100: cannot reserve I/O ports\n");
|
||||||
"eepro100: cannot reserve I/O ports\n");
|
|
||||||
goto err_out_none;
|
goto err_out_none;
|
||||||
}
|
}
|
||||||
if (!request_mem_region(pci_resource_start(pdev, 0),
|
if (!request_mem_region(pci_resource_start(pdev, 0),
|
||||||
pci_resource_len(pdev, 0), "eepro100")) {
|
pci_resource_len(pdev, 0), "eepro100")) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "eepro100: cannot reserve MMIO region\n");
|
||||||
"eepro100: cannot reserve MMIO region\n");
|
|
||||||
goto err_out_free_pio_region;
|
goto err_out_free_pio_region;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -575,7 +573,7 @@ static int __devinit eepro100_init_one (struct pci_dev *pdev,
|
||||||
|
|
||||||
ioaddr = pci_iomap(pdev, pci_bar, 0);
|
ioaddr = pci_iomap(pdev, pci_bar, 0);
|
||||||
if (!ioaddr) {
|
if (!ioaddr) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev, "eepro100: cannot remap IO\n");
|
dev_err(&pdev->dev, "eepro100: cannot remap IO\n");
|
||||||
goto err_out_free_mmio_region;
|
goto err_out_free_mmio_region;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -335,7 +335,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
|
||||||
irq = pdev->irq;
|
irq = pdev->irq;
|
||||||
|
|
||||||
if (pci_resource_len(pdev, 0) < EPIC_TOTAL_SIZE) {
|
if (pci_resource_len(pdev, 0) < EPIC_TOTAL_SIZE) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "no PCI region space\n");
|
dev_err(&pdev->dev, "no PCI region space\n");
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
goto err_out_disable;
|
goto err_out_disable;
|
||||||
}
|
}
|
||||||
|
@ -350,7 +350,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
|
||||||
|
|
||||||
dev = alloc_etherdev(sizeof (*ep));
|
dev = alloc_etherdev(sizeof (*ep));
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "no memory for eth device\n");
|
dev_err(&pdev->dev, "no memory for eth device\n");
|
||||||
goto err_out_free_res;
|
goto err_out_free_res;
|
||||||
}
|
}
|
||||||
SET_MODULE_OWNER(dev);
|
SET_MODULE_OWNER(dev);
|
||||||
|
@ -362,7 +362,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
|
||||||
ioaddr = pci_resource_start (pdev, 1);
|
ioaddr = pci_resource_start (pdev, 1);
|
||||||
ioaddr = (long) ioremap (ioaddr, pci_resource_len (pdev, 1));
|
ioaddr = (long) ioremap (ioaddr, pci_resource_len (pdev, 1));
|
||||||
if (!ioaddr) {
|
if (!ioaddr) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "ioremap failed\n");
|
dev_err(&pdev->dev, "ioremap failed\n");
|
||||||
goto err_out_free_netdev;
|
goto err_out_free_netdev;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -444,7 +444,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
|
||||||
int mii_status = mdio_read(dev, phy, MII_BMSR);
|
int mii_status = mdio_read(dev, phy, MII_BMSR);
|
||||||
if (mii_status != 0xffff && mii_status != 0x0000) {
|
if (mii_status != 0xffff && mii_status != 0x0000) {
|
||||||
ep->phys[phy_idx++] = phy;
|
ep->phys[phy_idx++] = phy;
|
||||||
dev_printk(KERN_INFO, &pdev->dev,
|
dev_info(&pdev->dev,
|
||||||
"MII transceiver #%d control "
|
"MII transceiver #%d control "
|
||||||
"%4.4x status %4.4x.\n",
|
"%4.4x status %4.4x.\n",
|
||||||
phy, mdio_read(dev, phy, 0), mii_status);
|
phy, mdio_read(dev, phy, 0), mii_status);
|
||||||
|
@ -454,12 +454,12 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
|
||||||
if (phy_idx != 0) {
|
if (phy_idx != 0) {
|
||||||
phy = ep->phys[0];
|
phy = ep->phys[0];
|
||||||
ep->mii.advertising = mdio_read(dev, phy, MII_ADVERTISE);
|
ep->mii.advertising = mdio_read(dev, phy, MII_ADVERTISE);
|
||||||
dev_printk(KERN_INFO, &pdev->dev,
|
dev_info(&pdev->dev,
|
||||||
"Autonegotiation advertising %4.4x link "
|
"Autonegotiation advertising %4.4x link "
|
||||||
"partner %4.4x.\n",
|
"partner %4.4x.\n",
|
||||||
ep->mii.advertising, mdio_read(dev, phy, 5));
|
ep->mii.advertising, mdio_read(dev, phy, 5));
|
||||||
} else if ( ! (ep->chip_flags & NO_MII)) {
|
} else if ( ! (ep->chip_flags & NO_MII)) {
|
||||||
dev_printk(KERN_WARNING, &pdev->dev,
|
dev_warn(&pdev->dev,
|
||||||
"***WARNING***: No MII transceiver found!\n");
|
"***WARNING***: No MII transceiver found!\n");
|
||||||
/* Use the known PHY address of the EPII. */
|
/* Use the known PHY address of the EPII. */
|
||||||
ep->phys[0] = 3;
|
ep->phys[0] = 3;
|
||||||
|
@ -475,8 +475,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
|
||||||
/* The lower four bits are the media type. */
|
/* The lower four bits are the media type. */
|
||||||
if (duplex) {
|
if (duplex) {
|
||||||
ep->mii.force_media = ep->mii.full_duplex = 1;
|
ep->mii.force_media = ep->mii.full_duplex = 1;
|
||||||
dev_printk(KERN_INFO, &pdev->dev,
|
dev_info(&pdev->dev, "Forced full duplex requested.\n");
|
||||||
"Forced full duplex operation requested.\n");
|
|
||||||
}
|
}
|
||||||
dev->if_port = ep->default_port = option;
|
dev->if_port = ep->default_port = option;
|
||||||
|
|
||||||
|
|
|
@ -505,7 +505,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
|
||||||
|
|
||||||
len = pci_resource_len(pdev, bar);
|
len = pci_resource_len(pdev, bar);
|
||||||
if (len < MIN_REGION_SIZE) {
|
if (len < MIN_REGION_SIZE) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"region size %ld too small, aborting\n", len);
|
"region size %ld too small, aborting\n", len);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
@ -578,7 +578,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
|
||||||
|
|
||||||
if (mii_status != 0xffff && mii_status != 0x0000) {
|
if (mii_status != 0xffff && mii_status != 0x0000) {
|
||||||
np->phys[phy_idx++] = phy;
|
np->phys[phy_idx++] = phy;
|
||||||
dev_printk(KERN_INFO, &pdev->dev,
|
dev_info(&pdev->dev,
|
||||||
"MII PHY found at address %d, status "
|
"MII PHY found at address %d, status "
|
||||||
"0x%4.4x.\n", phy, mii_status);
|
"0x%4.4x.\n", phy, mii_status);
|
||||||
/* get phy type */
|
/* get phy type */
|
||||||
|
@ -604,7 +604,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
|
||||||
|
|
||||||
np->mii_cnt = phy_idx;
|
np->mii_cnt = phy_idx;
|
||||||
if (phy_idx == 0)
|
if (phy_idx == 0)
|
||||||
dev_printk(KERN_WARNING, &pdev->dev,
|
dev_warn(&pdev->dev,
|
||||||
"MII PHY not found -- this device may "
|
"MII PHY not found -- this device may "
|
||||||
"not operate correctly.\n");
|
"not operate correctly.\n");
|
||||||
} else {
|
} else {
|
||||||
|
@ -632,8 +632,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
|
||||||
np->mii.full_duplex = full_duplex[card_idx];
|
np->mii.full_duplex = full_duplex[card_idx];
|
||||||
|
|
||||||
if (np->mii.full_duplex) {
|
if (np->mii.full_duplex) {
|
||||||
dev_printk(KERN_INFO, &pdev->dev,
|
dev_info(&pdev->dev, "Media type forced to Full Duplex.\n");
|
||||||
"Media type forced to Full Duplex.\n");
|
|
||||||
/* 89/6/13 add, (begin) */
|
/* 89/6/13 add, (begin) */
|
||||||
// if (np->PHYType==MarvellPHY)
|
// if (np->PHYType==MarvellPHY)
|
||||||
if ((np->PHYType == MarvellPHY) || (np->PHYType == LevelOnePHY)) {
|
if ((np->PHYType == MarvellPHY) || (np->PHYType == LevelOnePHY)) {
|
||||||
|
|
|
@ -231,14 +231,12 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev,
|
||||||
irq = pdev->irq;
|
irq = pdev->irq;
|
||||||
|
|
||||||
if (!ioaddr || ((pci_resource_flags (pdev, 0) & IORESOURCE_IO) == 0)) {
|
if (!ioaddr || ((pci_resource_flags (pdev, 0) & IORESOURCE_IO) == 0)) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "no I/O resource at PCI BAR #0\n");
|
||||||
"no I/O resource at PCI BAR #0\n");
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request_region (ioaddr, NE_IO_EXTENT, DRV_NAME) == NULL) {
|
if (request_region (ioaddr, NE_IO_EXTENT, DRV_NAME) == NULL) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "I/O resource 0x%x @ 0x%lx busy\n",
|
||||||
"I/O resource 0x%x @ 0x%lx busy\n",
|
|
||||||
NE_IO_EXTENT, ioaddr);
|
NE_IO_EXTENT, ioaddr);
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
|
@ -265,8 +263,7 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev,
|
||||||
/* Allocate net_device, dev->priv; fill in 8390 specific dev fields. */
|
/* Allocate net_device, dev->priv; fill in 8390 specific dev fields. */
|
||||||
dev = alloc_ei_netdev();
|
dev = alloc_ei_netdev();
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "cannot allocate ethernet device\n");
|
||||||
"cannot allocate ethernet device\n");
|
|
||||||
goto err_out_free_res;
|
goto err_out_free_res;
|
||||||
}
|
}
|
||||||
SET_MODULE_OWNER(dev);
|
SET_MODULE_OWNER(dev);
|
||||||
|
@ -284,7 +281,7 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev,
|
||||||
while ((inb(ioaddr + EN0_ISR) & ENISR_RESET) == 0)
|
while ((inb(ioaddr + EN0_ISR) & ENISR_RESET) == 0)
|
||||||
/* Limit wait: '2' avoids jiffy roll-over. */
|
/* Limit wait: '2' avoids jiffy roll-over. */
|
||||||
if (jiffies - reset_start_time > 2) {
|
if (jiffies - reset_start_time > 2) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"Card failure (no reset ack).\n");
|
"Card failure (no reset ack).\n");
|
||||||
goto err_out_free_netdev;
|
goto err_out_free_netdev;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1832,8 +1832,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
|
||||||
} else if (!pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) {
|
} else if (!pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) {
|
||||||
using_dac = 0;
|
using_dac = 0;
|
||||||
} else {
|
} else {
|
||||||
dev_printk(KERN_WARNING, &pci_dev->dev,
|
dev_warn(&pci_dev->dev, "pci_set_dma_mask failed!\n");
|
||||||
"pci_set_dma_mask failed!\n");
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1856,8 +1855,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
|
||||||
|
|
||||||
err = pci_enable_device(pci_dev);
|
err = pci_enable_device(pci_dev);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_printk(KERN_INFO, &pci_dev->dev,
|
dev_info(&pci_dev->dev, "pci_enable_dev failed: %d\n", err);
|
||||||
"pci_enable_dev failed: %d\n", err);
|
|
||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1886,8 +1884,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
|
||||||
err = request_irq(pci_dev->irq, ns83820_irq, IRQF_SHARED,
|
err = request_irq(pci_dev->irq, ns83820_irq, IRQF_SHARED,
|
||||||
DRV_NAME, ndev);
|
DRV_NAME, ndev);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_printk(KERN_INFO, &pci_dev->dev,
|
dev_info(&pci_dev->dev, "unable to register irq %d, err %d\n",
|
||||||
"unable to register irq %d, err %d\n",
|
|
||||||
pci_dev->irq, err);
|
pci_dev->irq, err);
|
||||||
goto out_disable;
|
goto out_disable;
|
||||||
}
|
}
|
||||||
|
@ -1902,8 +1899,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
|
||||||
rtnl_lock();
|
rtnl_lock();
|
||||||
err = dev_alloc_name(ndev, ndev->name);
|
err = dev_alloc_name(ndev, ndev->name);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
dev_printk(KERN_INFO, &pci_dev->dev,
|
dev_info(&pci_dev->dev, "unable to get netdev name: %d\n", err);
|
||||||
"unable to get netdev name: %d\n", err);
|
|
||||||
goto out_free_irq;
|
goto out_free_irq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -601,8 +601,7 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev,
|
||||||
/* dev zeroed in alloc_etherdev */
|
/* dev zeroed in alloc_etherdev */
|
||||||
dev = alloc_etherdev (sizeof (*tp));
|
dev = alloc_etherdev (sizeof (*tp));
|
||||||
if (dev == NULL) {
|
if (dev == NULL) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "unable to alloc new ethernet\n");
|
||||||
"unable to alloc new ethernet\n");
|
|
||||||
DPRINTK ("EXIT, returning -ENOMEM\n");
|
DPRINTK ("EXIT, returning -ENOMEM\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
@ -632,16 +631,14 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev,
|
||||||
|
|
||||||
/* make sure PCI base addr 0 is PIO */
|
/* make sure PCI base addr 0 is PIO */
|
||||||
if (!(pio_flags & IORESOURCE_IO)) {
|
if (!(pio_flags & IORESOURCE_IO)) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "region #0 not a PIO resource, aborting\n");
|
||||||
"region #0 not a PIO resource, aborting\n");
|
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make sure PCI base addr 1 is MMIO */
|
/* make sure PCI base addr 1 is MMIO */
|
||||||
if (!(mmio_flags & IORESOURCE_MEM)) {
|
if (!(mmio_flags & IORESOURCE_MEM)) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "region #1 not an MMIO resource, aborting\n");
|
||||||
"region #1 not an MMIO resource, aborting\n");
|
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
@ -649,8 +646,7 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev,
|
||||||
/* check for weird/broken PCI region reporting */
|
/* check for weird/broken PCI region reporting */
|
||||||
if ((pio_len < NETDRV_MIN_IO_SIZE) ||
|
if ((pio_len < NETDRV_MIN_IO_SIZE) ||
|
||||||
(mmio_len < NETDRV_MIN_IO_SIZE)) {
|
(mmio_len < NETDRV_MIN_IO_SIZE)) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "Invalid PCI region size(s), aborting\n");
|
||||||
"Invalid PCI region size(s), aborting\n");
|
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
@ -667,8 +663,7 @@ static int __devinit netdrv_init_board (struct pci_dev *pdev,
|
||||||
/* ioremap MMIO region */
|
/* ioremap MMIO region */
|
||||||
ioaddr = ioremap (mmio_start, mmio_len);
|
ioaddr = ioremap (mmio_start, mmio_len);
|
||||||
if (ioaddr == NULL) {
|
if (ioaddr == NULL) {
|
||||||
dev_printk (KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "cannot remap MMIO, aborting\n");
|
||||||
"cannot remap MMIO, aborting\n");
|
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
goto err_out_free_res;
|
goto err_out_free_res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1406,8 +1406,7 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out,
|
||||||
dev = alloc_etherdev(sizeof (*tp));
|
dev = alloc_etherdev(sizeof (*tp));
|
||||||
if (dev == NULL) {
|
if (dev == NULL) {
|
||||||
if (netif_msg_drv(&debug))
|
if (netif_msg_drv(&debug))
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "unable to alloc new ethernet\n");
|
||||||
"unable to alloc new ethernet\n");
|
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1420,7 +1419,7 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out,
|
||||||
rc = pci_enable_device(pdev);
|
rc = pci_enable_device(pdev);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
if (netif_msg_probe(tp))
|
if (netif_msg_probe(tp))
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "enable failure\n");
|
dev_err(&pdev->dev, "enable failure\n");
|
||||||
goto err_out_free_dev;
|
goto err_out_free_dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1437,14 +1436,14 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out,
|
||||||
acpi_idle_state = pwr_command & PCI_PM_CTRL_STATE_MASK;
|
acpi_idle_state = pwr_command & PCI_PM_CTRL_STATE_MASK;
|
||||||
} else {
|
} else {
|
||||||
if (netif_msg_probe(tp))
|
if (netif_msg_probe(tp))
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"PowerManagement capability not found.\n");
|
"PowerManagement capability not found.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make sure PCI base addr 1 is MMIO */
|
/* make sure PCI base addr 1 is MMIO */
|
||||||
if (!(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) {
|
if (!(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) {
|
||||||
if (netif_msg_probe(tp))
|
if (netif_msg_probe(tp))
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"region #1 not an MMIO resource, aborting\n");
|
"region #1 not an MMIO resource, aborting\n");
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
goto err_out_mwi;
|
goto err_out_mwi;
|
||||||
|
@ -1452,7 +1451,7 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out,
|
||||||
/* check for weird/broken PCI region reporting */
|
/* check for weird/broken PCI region reporting */
|
||||||
if (pci_resource_len(pdev, 1) < R8169_REGS_SIZE) {
|
if (pci_resource_len(pdev, 1) < R8169_REGS_SIZE) {
|
||||||
if (netif_msg_probe(tp))
|
if (netif_msg_probe(tp))
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"Invalid PCI region size(s), aborting\n");
|
"Invalid PCI region size(s), aborting\n");
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
goto err_out_mwi;
|
goto err_out_mwi;
|
||||||
|
@ -1461,8 +1460,7 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out,
|
||||||
rc = pci_request_regions(pdev, MODULENAME);
|
rc = pci_request_regions(pdev, MODULENAME);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
if (netif_msg_probe(tp))
|
if (netif_msg_probe(tp))
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "could not request regions.\n");
|
||||||
"could not request regions.\n");
|
|
||||||
goto err_out_mwi;
|
goto err_out_mwi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1476,7 +1474,7 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out,
|
||||||
rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
if (netif_msg_probe(tp))
|
if (netif_msg_probe(tp))
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"DMA configuration failed.\n");
|
"DMA configuration failed.\n");
|
||||||
goto err_out_free_res;
|
goto err_out_free_res;
|
||||||
}
|
}
|
||||||
|
@ -1488,8 +1486,7 @@ rtl8169_init_board(struct pci_dev *pdev, struct net_device **dev_out,
|
||||||
ioaddr = ioremap(pci_resource_start(pdev, 1), R8169_REGS_SIZE);
|
ioaddr = ioremap(pci_resource_start(pdev, 1), R8169_REGS_SIZE);
|
||||||
if (ioaddr == NULL) {
|
if (ioaddr == NULL) {
|
||||||
if (netif_msg_probe(tp))
|
if (netif_msg_probe(tp))
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev, "cannot remap MMIO, aborting\n");
|
||||||
"cannot remap MMIO, aborting\n");
|
|
||||||
rc = -EIO;
|
rc = -EIO;
|
||||||
goto err_out_free_res;
|
goto err_out_free_res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -695,14 +695,14 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi
|
||||||
* can support more than MAX_UNITS.
|
* can support more than MAX_UNITS.
|
||||||
*/
|
*/
|
||||||
if (velocity_nics >= MAX_UNITS) {
|
if (velocity_nics >= MAX_UNITS) {
|
||||||
dev_printk(KERN_NOTICE, &pdev->dev, "already found %d NICs.\n",
|
dev_notice(&pdev->dev, "already found %d NICs.\n",
|
||||||
velocity_nics);
|
velocity_nics);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev = alloc_etherdev(sizeof(struct velocity_info));
|
dev = alloc_etherdev(sizeof(struct velocity_info));
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "allocate net device failed.\n");
|
dev_err(&pdev->dev, "allocate net device failed.\n");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -739,7 +739,7 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi
|
||||||
|
|
||||||
ret = pci_request_regions(pdev, VELOCITY_NAME);
|
ret = pci_request_regions(pdev, VELOCITY_NAME);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "No PCI resources.\n");
|
dev_err(&pdev->dev, "No PCI resources.\n");
|
||||||
goto err_disable;
|
goto err_disable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -895,19 +895,19 @@ static int __devinit velocity_get_pci_info(struct velocity_info *vptr, struct pc
|
||||||
vptr->memaddr = pci_resource_start(pdev, 1);
|
vptr->memaddr = pci_resource_start(pdev, 1);
|
||||||
|
|
||||||
if (!(pci_resource_flags(pdev, 0) & IORESOURCE_IO)) {
|
if (!(pci_resource_flags(pdev, 0) & IORESOURCE_IO)) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"region #0 is not an I/O resource, aborting.\n");
|
"region #0 is not an I/O resource, aborting.\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((pci_resource_flags(pdev, 1) & IORESOURCE_IO)) {
|
if ((pci_resource_flags(pdev, 1) & IORESOURCE_IO)) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev,
|
dev_err(&pdev->dev,
|
||||||
"region #1 is an I/O resource, aborting.\n");
|
"region #1 is an I/O resource, aborting.\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pci_resource_len(pdev, 1) < VELOCITY_IO_SIZE) {
|
if (pci_resource_len(pdev, 1) < VELOCITY_IO_SIZE) {
|
||||||
dev_printk(KERN_ERR, &pdev->dev, "region #1 is too small.\n");
|
dev_err(&pdev->dev, "region #1 is too small.\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
vptr->pdev = pdev;
|
vptr->pdev = pdev;
|
||||||
|
|
Loading…
Reference in New Issue