]> git.itanic.dy.fi Git - linux-stable/commit
igc: Fix possible system crash when loading module
authorVinicius Costa Gomes <vinicius.gomes@intel.com>
Mon, 17 Apr 2023 22:18:39 +0000 (15:18 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jun 2023 14:01:00 +0000 (16:01 +0200)
commit9710e5c30bd4fa6d8ff4ccdc05dd7715890ed276
treed9826e7a93951b4b15e17bc8b6926a81b2e270fc
parentc6612bf33ebe348c84abc98635e38fe9fbbd4f08
igc: Fix possible system crash when loading module

[ Upstream commit c080fe262f9e73a00934b70c16b1479cf40cd2bd ]

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 re-enabled 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 <vinicius.gomes@intel.com>
Reviewed-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/igc/igc_main.c