Module Name: src Committed By: martin Date: Sun Sep 23 17:43:37 UTC 2018
Modified Files: src/sys/dev/pci/ixgbe [netbsd-8]: ixgbe.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1029): sys/dev/pci/ixgbe/ixgbe.c: revision 1.166 - Fix a bug that Denverton accessed wrong register in ixgbe_setup_low_power_mode(). The location of some registers in Denverton were changed. The GRC register is one of them, so use IXGBE_GRC_BY_MAC(hw) instead of IXGBE_GRC. - ixgbe_check_wol_support() tests the capability of WOL, but the sysctl knobs for WOL were added only for IXGBE_DEV_ID_X550EM_X_10G_T. Add the knobs when adapter->wol_support is not 0. XXX pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.88.2.23 -r1.88.2.24 src/sys/dev/pci/ixgbe/ixgbe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.23 src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.24 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.23 Wed Sep 5 08:42:22 2018 +++ src/sys/dev/pci/ixgbe/ixgbe.c Sun Sep 23 17:43:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ixgbe.c,v 1.88.2.23 2018/09/05 08:42:22 martin Exp $ */ +/* $NetBSD: ixgbe.c,v 1.88.2.24 2018/09/23 17:43:36 martin Exp $ */ /****************************************************************************** @@ -3277,7 +3277,7 @@ ixgbe_add_device_sysctls(struct adapter aprint_error_dev(dev, "could not create sysctl\n"); /* for WoL-capable devices */ - if (hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) { + if (adapter->wol_support) { if (sysctl_createv(log, 0, &rnode, &cnode, CTLFLAG_READWRITE, CTLTYPE_BOOL, "wol_enable", SYSCTL_DESCR("Enable/Disable Wake on LAN"), @@ -3663,8 +3663,8 @@ ixgbe_setup_low_power_mode(struct adapte IXGBE_WRITE_REG(hw, IXGBE_WUC, 0); } else { /* Turn off support for APM wakeup. (Using ACPI instead) */ - IXGBE_WRITE_REG(hw, IXGBE_GRC, - IXGBE_READ_REG(hw, IXGBE_GRC) & ~(u32)2); + IXGBE_WRITE_REG(hw, IXGBE_GRC_BY_MAC(hw), + IXGBE_READ_REG(hw, IXGBE_GRC_BY_MAC(hw)) & ~(u32)2); /* * Clear Wake Up Status register to prevent any previous wakeup