iavf-linux: Fix incorrect adapter get in iavf_resume
Subsystems (2)
PATCH 1/1 iavf-linux: Fix incorrect adapter get in iavf_resume
From: Sylwester Dziedziuch <[email protected]>
When calling iavf_resume there was a crash because wrong function was used to get iavf_adapter and net_device pointers. Changed how iavf_resume is getting iavf_adapter and net_device pointers from pci_dev.
--- drivers/net/ethernet/intel/iavf/iavf_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_main.c +2 -2
@@ -3806,8 +3806,8 @@ static int __maybe_unused iavf_suspend(struct device *dev_d)static int __maybe_unused iavf_resume (struct device *dev_d) {struct pci_dev *pdev =to_pci_dev (dev_d); -struct iavf_adapter *adapter =pci_get_drvdata (pdev); -struct net_device *netdev = adapter->netdev; +struct net_device *netdev =pci_get_drvdata (pdev); +struct iavf_adapter *adapter =netdev_priv (netdev);u32 err;pci_set_master (pdev);
Signature · 7 lines
2.17.1 --------------------------------------------------------------------- Intel Technology Poland sp. z o.o. ul. Sowackiego 173 | 80-298 Gdask | Sd Rejonowy Gdask Pnoc | VII Wydzia Gospodarczy Krajowego Rejestru Sdowego - KRS 101882 | NIP 957-07-52-316 | Kapita zakadowy 200.000 PLN. Ta wiadomo wraz z zacznikami jest przeznaczona dla okrelonego adresata i moe zawiera informacje poufne. W razie przypadkowego otrzymania tej wiadomoci, prosimy o powiadomienie nadawcy oraz trwae jej usunicie; jakiekolwiek przegldanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
Brown
PATCH 1/1 iavf-linux: Fix incorrect adapter get in iavf_resume
Quoted 15 lines
From: Intel-wired-lan <[email protected]> On Behalf Of Mateusz Palczewski
Sent: Wednesday, September 2, 2020 5:55 AM
To: intel-wired-lan at lists.osuosl.org
Cc: Dziedziuch, SylwesterX <[email protected]>
Subject: [Intel-wired-lan] [PATCH] iavf-linux: Fix incorrect adapter get iniavf_resumeFrom: Sylwester Dziedziuch <[email protected]>
When calling
iavf_resumethere was a crash because wrong function was used to getiavf_adapterandnet_devicepointers. Changed howiavf_resumeis gettingiavf_adapterandnet_devicepointers frompci_dev.
Quoted 6 lines
Signed-off-by Sylwester Dziedziuch <[email protected]>Reviewed-by Aleksandr Loktionov <[email protected]>--- drivers/net/ethernet/intel/iavf/iavf_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)