Commit 1103a631 authored by Yanir Lubetkin's avatar Yanir Lubetkin Committed by Jeff Kirsher

e1000e: remove calls to ioremap/unmap for NVM addr

Starting I219, the NVM will not be mapped to its own BAR, but to an
address region in another bar.  The mapping/unmapping is relevant
to older HW only.

CC: John W Linville <linville@tuxdriver.com>
Reported-by: default avatarJohn W Linville <linville@tuxdriver.com>
Signed-off-by: default avatarYanir Lubetkin <yanirx.lubetkin@intel.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 9d17ce49
...@@ -6833,7 +6833,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -6833,7 +6833,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto err_ioremap; goto err_ioremap;
if ((adapter->flags & FLAG_HAS_FLASH) && if ((adapter->flags & FLAG_HAS_FLASH) &&
(pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) { (pci_resource_flags(pdev, 1) & IORESOURCE_MEM) &&
(hw->mac.type < e1000_pch_spt)) {
flash_start = pci_resource_start(pdev, 1); flash_start = pci_resource_start(pdev, 1);
flash_len = pci_resource_len(pdev, 1); flash_len = pci_resource_len(pdev, 1);
adapter->hw.flash_address = ioremap(flash_start, flash_len); adapter->hw.flash_address = ioremap(flash_start, flash_len);
...@@ -7069,7 +7070,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -7069,7 +7070,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
kfree(adapter->tx_ring); kfree(adapter->tx_ring);
kfree(adapter->rx_ring); kfree(adapter->rx_ring);
err_sw_init: err_sw_init:
if (adapter->hw.flash_address) if ((adapter->hw.flash_address) && (hw->mac.type < e1000_pch_spt))
iounmap(adapter->hw.flash_address); iounmap(adapter->hw.flash_address);
e1000e_reset_interrupt_capability(adapter); e1000e_reset_interrupt_capability(adapter);
err_flashmap: err_flashmap:
...@@ -7142,7 +7143,8 @@ static void e1000_remove(struct pci_dev *pdev) ...@@ -7142,7 +7143,8 @@ static void e1000_remove(struct pci_dev *pdev)
kfree(adapter->rx_ring); kfree(adapter->rx_ring);
iounmap(adapter->hw.hw_addr); iounmap(adapter->hw.hw_addr);
if (adapter->hw.flash_address) if ((adapter->hw.flash_address) &&
(adapter->hw.mac.type < e1000_pch_spt))
iounmap(adapter->hw.flash_address); iounmap(adapter->hw.flash_address);
pci_release_selected_regions(pdev, pci_release_selected_regions(pdev,
pci_select_bars(pdev, IORESOURCE_MEM)); pci_select_bars(pdev, IORESOURCE_MEM));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment