mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
ionic: prevent pci disable of already disabled device
[ Upstream commit 13943d6c82730a2a4e40e05d6deaca26a8de0a4d ]
If a reset fails, the PCI device is left in a disabled
state, so don't try to disable it again on driver remove.
This prevents a scary looking WARN trace in the kernel log.
ionic 0000:2b:00.0: disabling already-disabled device
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fb768e0571
commit
b41d5ce6b2
@@ -217,7 +217,9 @@ static void ionic_clear_pci(struct ionic *ionic)
|
||||
{
|
||||
ionic_unmap_bars(ionic);
|
||||
pci_release_regions(ionic->pdev);
|
||||
pci_disable_device(ionic->pdev);
|
||||
|
||||
if (atomic_read(&ionic->pdev->enable_cnt) > 0)
|
||||
pci_disable_device(ionic->pdev);
|
||||
}
|
||||
|
||||
static int ionic_setup_one(struct ionic *ionic)
|
||||
|
||||
Reference in New Issue
Block a user