From: Alexander Duyck <alexander.h.duyck@xxxxxxxxx> This change makes it so that both igb and ixgbe can trigger a full pcie function reset if the reset_devices kernel parameter is defined. The main reason for adding this is that kdump can cause serious issues when the kdump kernel resets the IOMMU while DMA transactions are still occurring. Signed-off-by: Alexander Duyck <alexander.h.duyck@xxxxxxxxx> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@xxxxxxxxx> --- drivers/net/igb/igb_main.c | 3 +++ drivers/net/ixgbe/ixgbe_main.c | 3 +++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 667b527..b924443 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c @@ -1731,6 +1731,9 @@ static int __devinit igb_probe(struct pci_dev *pdev, return -EINVAL; } + if (reset_devices && pci_reset_device_function(pdev)) + return -ENODEV; + err = pci_enable_device_mem(pdev); if (err) return err; diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 7d6a415..f459f24 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -6548,6 +6548,9 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, return -EINVAL; } + if (reset_devices && pci_reset_device_function(pdev)) + return -ENODEV; + err = pci_enable_device_mem(pdev); if (err) return err; -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html