diff options
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 2b70b0f6f60b..89d897d679e8 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -13514,7 +13514,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
13514 | const struct pci_device_id *ent) | 13514 | const struct pci_device_id *ent) |
13515 | { | 13515 | { |
13516 | static int tg3_version_printed = 0; | 13516 | static int tg3_version_printed = 0; |
13517 | resource_size_t tg3reg_len; | ||
13518 | struct net_device *dev; | 13517 | struct net_device *dev; |
13519 | struct tg3 *tp; | 13518 | struct tg3 *tp; |
13520 | int err, pm_cap; | 13519 | int err, pm_cap; |
@@ -13531,13 +13530,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
13531 | return err; | 13530 | return err; |
13532 | } | 13531 | } |
13533 | 13532 | ||
13534 | if (!(pci_resource_flags(pdev, BAR_0) & IORESOURCE_MEM)) { | ||
13535 | printk(KERN_ERR PFX "Cannot find proper PCI device " | ||
13536 | "base address, aborting.\n"); | ||
13537 | err = -ENODEV; | ||
13538 | goto err_out_disable_pdev; | ||
13539 | } | ||
13540 | |||
13541 | err = pci_request_regions(pdev, DRV_MODULE_NAME); | 13533 | err = pci_request_regions(pdev, DRV_MODULE_NAME); |
13542 | if (err) { | 13534 | if (err) { |
13543 | printk(KERN_ERR PFX "Cannot obtain PCI resources, " | 13535 | printk(KERN_ERR PFX "Cannot obtain PCI resources, " |
@@ -13606,11 +13598,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
13606 | spin_lock_init(&tp->indirect_lock); | 13598 | spin_lock_init(&tp->indirect_lock); |
13607 | INIT_WORK(&tp->reset_task, tg3_reset_task); | 13599 | INIT_WORK(&tp->reset_task, tg3_reset_task); |
13608 | 13600 | ||
13609 | dev->mem_start = pci_resource_start(pdev, BAR_0); | 13601 | tp->regs = pci_ioremap_bar(pdev, BAR_0); |
13610 | tg3reg_len = pci_resource_len(pdev, BAR_0); | ||
13611 | dev->mem_end = dev->mem_start + tg3reg_len; | ||
13612 | |||
13613 | tp->regs = ioremap_nocache(dev->mem_start, tg3reg_len); | ||
13614 | if (!tp->regs) { | 13602 | if (!tp->regs) { |
13615 | printk(KERN_ERR PFX "Cannot map device registers, " | 13603 | printk(KERN_ERR PFX "Cannot map device registers, " |
13616 | "aborting.\n"); | 13604 | "aborting.\n"); |
@@ -13733,13 +13721,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
13733 | } | 13721 | } |
13734 | 13722 | ||
13735 | if (tp->tg3_flags3 & TG3_FLG3_ENABLE_APE) { | 13723 | if (tp->tg3_flags3 & TG3_FLG3_ENABLE_APE) { |
13736 | if (!(pci_resource_flags(pdev, BAR_2) & IORESOURCE_MEM)) { | ||
13737 | printk(KERN_ERR PFX "Cannot find proper PCI device " | ||
13738 | "base address for APE, aborting.\n"); | ||
13739 | err = -ENODEV; | ||
13740 | goto err_out_iounmap; | ||
13741 | } | ||
13742 | |||
13743 | tp->aperegs = pci_ioremap_bar(pdev, BAR_2); | 13724 | tp->aperegs = pci_ioremap_bar(pdev, BAR_2); |
13744 | if (!tp->aperegs) { | 13725 | if (!tp->aperegs) { |
13745 | printk(KERN_ERR PFX "Cannot map APE registers, " | 13726 | printk(KERN_ERR PFX "Cannot map APE registers, " |