igb lets the device be runtime suspended even if it can't signal a wake-up from D3. Such a device doesn't notice the link coming back, so the port stays down until it is resumed from user space. Allow runtime PM only if pci_dev_run_wake() is true, as e1000e and r8169 do. Devices that can't wake up no longer runtime suspend, even with power/control set to auto. Tested with the 82576 emulated by QEMU. Fixes: 749ab2cd1270 ("igb: add basic runtime PM support") Cc: stable@vger.kernel.org Closes: https://bugzilla.ipfire.org/show_bug.cgi?id=13562 Signed-off-by: Antonio Quartulli --- v3: no changes v2: no code changes; mention the tested hardware Note: igc has the same issue: igc_probe() also allows runtime PM regardless of pci_dev_run_wake(). drivers/net/ethernet/intel/igb/igb_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 6196d7a..72eeaf3 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -3654,7 +3654,11 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NO_DIRECT_COMPLETE); - pm_runtime_put_noidle(&pdev->dev); + /* A device that can't wake up wouldn't notice the link coming back + * while runtime suspended + */ + if (pci_dev_run_wake(pdev)) + pm_runtime_put_noidle(&pdev->dev); return 0; err_register: @@ -3876,7 +3880,8 @@ static void igb_remove(struct pci_dev *pdev) struct igb_adapter *adapter = netdev_priv(netdev); struct e1000_hw *hw = &adapter->hw; - pm_runtime_get_noresume(&pdev->dev); + if (pci_dev_run_wake(pdev)) + pm_runtime_get_noresume(&pdev->dev); #ifdef CONFIG_IGB_HWMON igb_sysfs_exit(adapter); #endif -- 2.56.1