From: Chen Yu Date: Tue, 1 Dec 2020 01:22:09 +0000 (+0800) Subject: e1000e: Remove the runtime suspend restriction on CNP+ X-Git-Tag: v5.13-rc1~94^2~525^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=3335369bad99c40b3513da2d165e6ae83f3f3c8b;p=linux-2.6-block.git e1000e: Remove the runtime suspend restriction on CNP+ Although there is platform issue of runtime suspend support on CNP, it would be more flexible to let the user decide whether to disable runtime or not because: 1. This can be done in userspace via echo on > /sys/devices/pci0000\:00/0000\:00\:1f.d/power/control 2. More and more NICs would support runtime suspend, disabling the runtime suspend on them by default would impact the validation. Only disable runtime suspend on CNP in case of any user space regression. Signed-off-by: Chen Yu Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen --- diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 3eaae9a5a44e..480f6712a3b6 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -7635,7 +7635,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_SMART_PREPARE); - if (pci_dev_run_wake(pdev) && hw->mac.type < e1000_pch_cnp) + if (pci_dev_run_wake(pdev) && hw->mac.type != e1000_pch_cnp) pm_runtime_put_noidle(&pdev->dev); return 0;