diff options
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/netdev.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 6fa4fc05709e..4be4576d71aa 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c | |||
@@ -6833,7 +6833,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
6833 | goto err_ioremap; | 6833 | goto err_ioremap; |
6834 | 6834 | ||
6835 | if ((adapter->flags & FLAG_HAS_FLASH) && | 6835 | if ((adapter->flags & FLAG_HAS_FLASH) && |
6836 | (pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) { | 6836 | (pci_resource_flags(pdev, 1) & IORESOURCE_MEM) && |
6837 | (hw->mac.type < e1000_pch_spt)) { | ||
6837 | flash_start = pci_resource_start(pdev, 1); | 6838 | flash_start = pci_resource_start(pdev, 1); |
6838 | flash_len = pci_resource_len(pdev, 1); | 6839 | flash_len = pci_resource_len(pdev, 1); |
6839 | adapter->hw.flash_address = ioremap(flash_start, flash_len); | 6840 | adapter->hw.flash_address = ioremap(flash_start, flash_len); |
@@ -7069,7 +7070,7 @@ err_hw_init: | |||
7069 | kfree(adapter->tx_ring); | 7070 | kfree(adapter->tx_ring); |
7070 | kfree(adapter->rx_ring); | 7071 | kfree(adapter->rx_ring); |
7071 | err_sw_init: | 7072 | err_sw_init: |
7072 | if (adapter->hw.flash_address) | 7073 | if ((adapter->hw.flash_address) && (hw->mac.type < e1000_pch_spt)) |
7073 | iounmap(adapter->hw.flash_address); | 7074 | iounmap(adapter->hw.flash_address); |
7074 | e1000e_reset_interrupt_capability(adapter); | 7075 | e1000e_reset_interrupt_capability(adapter); |
7075 | err_flashmap: | 7076 | err_flashmap: |
@@ -7142,7 +7143,8 @@ static void e1000_remove(struct pci_dev *pdev) | |||
7142 | kfree(adapter->rx_ring); | 7143 | kfree(adapter->rx_ring); |
7143 | 7144 | ||
7144 | iounmap(adapter->hw.hw_addr); | 7145 | iounmap(adapter->hw.hw_addr); |
7145 | if (adapter->hw.flash_address) | 7146 | if ((adapter->hw.flash_address) && |
7147 | (adapter->hw.mac.type < e1000_pch_spt)) | ||
7146 | iounmap(adapter->hw.flash_address); | 7148 | iounmap(adapter->hw.flash_address); |
7147 | pci_release_selected_regions(pdev, | 7149 | pci_release_selected_regions(pdev, |
7148 | pci_select_bars(pdev, IORESOURCE_MEM)); | 7150 | pci_select_bars(pdev, IORESOURCE_MEM)); |