Commit 2758f9ed authored by Raanan Avargil's avatar Raanan Avargil Committed by Jeff Kirsher

e1000e: Fix incorrect ASPM locking

This patch fixes wrong locking usage.
In the context of slot reset, we should use lock.
And during resume, there is no need of lock.
Reported-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: default avatarRaanan Avargil <raanan.avargil@intel.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent d5828915
...@@ -6493,7 +6493,7 @@ static int __e1000_resume(struct pci_dev *pdev) ...@@ -6493,7 +6493,7 @@ static int __e1000_resume(struct pci_dev *pdev)
if (adapter->flags2 & FLAG2_DISABLE_ASPM_L1) if (adapter->flags2 & FLAG2_DISABLE_ASPM_L1)
aspm_disable_flag |= PCIE_LINK_STATE_L1; aspm_disable_flag |= PCIE_LINK_STATE_L1;
if (aspm_disable_flag) if (aspm_disable_flag)
e1000e_disable_aspm_locked(pdev, aspm_disable_flag); e1000e_disable_aspm(pdev, aspm_disable_flag);
pci_set_master(pdev); pci_set_master(pdev);
...@@ -6771,7 +6771,7 @@ static pci_ers_result_t e1000_io_slot_reset(struct pci_dev *pdev) ...@@ -6771,7 +6771,7 @@ static pci_ers_result_t e1000_io_slot_reset(struct pci_dev *pdev)
if (adapter->flags2 & FLAG2_DISABLE_ASPM_L1) if (adapter->flags2 & FLAG2_DISABLE_ASPM_L1)
aspm_disable_flag |= PCIE_LINK_STATE_L1; aspm_disable_flag |= PCIE_LINK_STATE_L1;
if (aspm_disable_flag) if (aspm_disable_flag)
e1000e_disable_aspm(pdev, aspm_disable_flag); e1000e_disable_aspm_locked(pdev, aspm_disable_flag);
err = pci_enable_device_mem(pdev); err = pci_enable_device_mem(pdev);
if (err) { if (err) {
......
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