Commit c1181f42 authored by Moritz Fischer's avatar Moritz Fischer Committed by Jakub Kicinski

net: dec: tulip: de2104x: Add shutdown handler to stop NIC

The driver does not implement a shutdown handler which leads to issues
when using kexec in certain scenarios. The NIC keeps on fetching
descriptors which gets flagged by the IOMMU with errors like this:

DMAR: DMAR:[DMA read] Request device [5e:00.0]fault addr fffff000
DMAR: DMAR:[DMA read] Request device [5e:00.0]fault addr fffff000
DMAR: DMAR:[DMA read] Request device [5e:00.0]fault addr fffff000
DMAR: DMAR:[DMA read] Request device [5e:00.0]fault addr fffff000
DMAR: DMAR:[DMA read] Request device [5e:00.0]fault addr fffff000
Signed-off-by: default avatarMoritz Fischer <mdf@kernel.org>
Link: https://lore.kernel.org/r/20201028172125.496942-1-mdf@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 1887023a
......@@ -2175,11 +2175,21 @@ static int __maybe_unused de_resume(struct device *dev_d)
static SIMPLE_DEV_PM_OPS(de_pm_ops, de_suspend, de_resume);
static void de_shutdown(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
rtnl_lock();
dev_close(dev);
rtnl_unlock();
}
static struct pci_driver de_driver = {
.name = DRV_NAME,
.id_table = de_pci_tbl,
.probe = de_init_one,
.remove = de_remove_one,
.shutdown = de_shutdown,
.driver.pm = &de_pm_ops,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment