igc: Fix possible system crash when loading module
Subsystems (2)
PATCH 1/1 igc: Fix possible system crash when loading module
Guarantee that when probe() is run again, PTM and PCI busmaster will be in the same state as it was if the driver was never loaded.
Avoid an i225/i226 hardware issue that PTM requests can be made even though PCI bus mastering is not enabled. These unexpected PTM requests can crash some systems.
So, "force" disable PTM and busmastering before removing the driver, so they can be renabled in the right order during probe(). This is more like a workaround and should be applicable for i225 and i226, in any platform.
--- drivers/net/ethernet/intel/igc/igc_main.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/intel/igc/igc_main.c +3 -0
@@ -6712,6 +6712,9 @@ static void igc_remove(struct pci_dev *pdev)igc_ptp_stop (adapter); +pci_disable_ptm (pdev); +pci_clear_master (pdev); +set_bit (__IGC_DOWN, &adapter->state);del_timer_sync (&adapter->watchdog_timer);
Signature · 6 lines
2.39.2 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Quoted 18 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Vinicius Costa Gomes
Sent: Tuesday, 18 April, 2023 6:19 AM
To: [email protected]
Cc: Nguyen, Anthony L <[email protected]>
Subject: [Intel-wired-lan] [PATCH net-queue v1] igc: Fix possible system crash when loading moduleGuarantee that when
probe()is run again, PTM and PCI busmaster will be in the same state as it was if the driver was never loaded.Avoid an i225/i226 hardware issue that PTM requests can be made even though PCI bus mastering is not enabled. These unexpected PTM requests can crash some systems.
Quoted 6 lines
So, "force" disable PTM and busmastering before removing the driver, so they can be renabled in the right order during
probe(). This is more like a workaround and should be applicable for i225 and i226, in any platform.Fixes 1b5d73fb8624 ("igc: Enable PCIe PTM")Signed-off-by Vinicius Costa Gomes <[email protected]>
Quoted 22 lines
--- drivers/net/ethernet/intel/igc/igc_main.c | 3 +++ 1 file changed, 3 insertions(+)drivers/net/ethernet/intel/igc/igc_main.c +3
-1@@ -6712,6 +6712,9 @@ static void igc_remove(struct pci_dev *pdev)igc_ptp_stop (adapter); +pci_disable_ptm (pdev); +pci_clear_master (pdev); +set_bit (__IGC_DOWN, &adapter->state);del_timer_sync (&adapter->watchdog_timer); --2.39.2
Quoted 4 lines
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Quoted 12 lines · Vinicius Costa Gomes
Guarantee that when
probe()is run again, PTM and PCI busmaster will be in the same state as it was if the driver was never loaded.Avoid an i225/i226 hardware issue that PTM requests can be made even though PCI bus mastering is not enabled. These unexpected PTM requests can crash some systems.
So, "force" disable PTM and busmastering before removing the driver, so they can be renabled in the right order during
probe(). This is more like a workaround and should be applicable for i225 and i226, in any platform.
Quoted 5 lines
Fixes 1b5d73fb8624 ("igc: Enable PCIe PTM")Signed-off-by Vinicius Costa Gomes <[email protected]>--- drivers/net/ethernet/intel/igc/igc_main.c | 3 +++ 1 file changed, 3 insertions(+)
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan