bnx2x: More Shutdown revisions

Submission d9aee59 "bnx2x: Don't release PCI bars on shutdown" separated
the PCI remove and shutdown flows, but pci_disable_device() is still
being called on both.
As a result, a dev_WARN_ONCE will be hit during shutdown for every bnx2x
VF probed on a hypervisor (as its shutdown callback will be called and later
pci_disable_sriov() will call its remove callback).

This calls the pci_disable_device() only on the remove flow.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Yuval Mintz 2014-01-27 17:11:58 +02:00 коммит произвёл David S. Miller
Родитель 27d79f3b10
Коммит 5f6db130b5
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -13102,9 +13102,9 @@ static void __bnx2x_remove(struct pci_dev *pdev,
if (atomic_read(&pdev->enable_cnt) == 1)
pci_release_regions(pdev);
}
pci_disable_device(pdev);
pci_disable_device(pdev);
}
}
static void bnx2x_remove_one(struct pci_dev *pdev)