Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8f83638 authored by Don Skidmore's avatar Don Skidmore Committed by Jeff Kirsher
Browse files

ixgbe: Fix 1G link WoL



We reset during the shutdown path which will reset AUTOC register.  This
would change LMS to 10G.  If we were currently linked at 1G we will lose
link, which is a bad thing if we wanted WoL to work.  For the fix I needed
to know if WoL is supported so I created a new bool in the ixgbe_hw struct.
If this is set we will not allow the reset to change the current LMS value
in AUTOC.

Signed-off-by: default avatarDon Skidmore <donald.c.skidmore@intel.com>
Tested-by: default avatarPhil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 0b2679d6
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -1051,8 +1051,11 @@ static s32 ixgbe_reset_hw_82599(struct ixgbe_hw *hw)
		/* If MNG FW is running on a multi-speed device that
		/* If MNG FW is running on a multi-speed device that
		 * doesn't autoneg with out driver support we need to
		 * doesn't autoneg with out driver support we need to
		 * leave LMS in the state it was before we MAC reset.
		 * leave LMS in the state it was before we MAC reset.
		 * Likewise if we support WoL we don't want change the
		 * LMS state either.
		 */
		 */
		if (hw->phy.multispeed_fiber && hw->mng_fw_enabled)
		if ((hw->phy.multispeed_fiber && hw->mng_fw_enabled) ||
		    hw->wol_supported)
			hw->mac.orig_autoc =
			hw->mac.orig_autoc =
				(hw->mac.orig_autoc & ~IXGBE_AUTOC_LMS_MASK) |
				(hw->mac.orig_autoc & ~IXGBE_AUTOC_LMS_MASK) |
				curr_lms;
				curr_lms;
+3 −1
Original line number Original line Diff line number Diff line
@@ -7526,7 +7526,9 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
	/* WOL not supported for all devices */
	/* WOL not supported for all devices */
	adapter->wol = 0;
	adapter->wol = 0;
	hw->eeprom.ops.read(hw, 0x2c, &adapter->eeprom_cap);
	hw->eeprom.ops.read(hw, 0x2c, &adapter->eeprom_cap);
	if (ixgbe_wol_supported(adapter, pdev->device, pdev->subsystem_device))
	hw->wol_supported = ixgbe_wol_supported(adapter, pdev->device,
						pdev->subsystem_device);
	if (hw->wol_supported)
		adapter->wol = IXGBE_WUFC_MAG;
		adapter->wol = IXGBE_WUFC_MAG;


	device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
	device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
+1 −0
Original line number Original line Diff line number Diff line
@@ -2998,6 +2998,7 @@ struct ixgbe_hw {
	bool				force_full_reset;
	bool				force_full_reset;
	bool				allow_unsupported_sfp;
	bool				allow_unsupported_sfp;
	bool				mng_fw_enabled;
	bool				mng_fw_enabled;
	bool				wol_supported;
};
};


struct ixgbe_info {
struct ixgbe_info {