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

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.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 1887023a
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -2175,11 +2175,21 @@ out:

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,
};