Message ID | 20160407174350.39412.3975.stgit@mdrustad-wks.jf.intel.com |
---|---|
State | Accepted |
Delegated to: | Jeff Kirsher |
Headers | show |
Hi Mark, [auto build test ERROR on net-next/master] [also build test ERROR on v4.6-rc2 next-20160407] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Mark-D-Rustad/ixgbe-Add-register-wait-for-slow-links/20160408-014717 config: x86_64-randconfig-x010-201614 (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): In file included from include/uapi/linux/stddef.h:1:0, from include/linux/stddef.h:4, from include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:29: drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: In function 'ixgbe_read_reg': >> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:367:8: error: 'IXGBE_NW_MNG_IF_SEL_ENABLE_10_100M' undeclared (first use in this function) IXGBE_NW_MNG_IF_SEL_ENABLE_10_100M)) { ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:367:8: note: each undeclared identifier is reported only once for each function it appears in IXGBE_NW_MNG_IF_SEL_ENABLE_10_100M)) { ^ include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' # define unlikely(x) __builtin_expect(!!(x), 0) ^ vim +/IXGBE_NW_MNG_IF_SEL_ENABLE_10_100M +367 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c 361 u8 __iomem *reg_addr = ACCESS_ONCE(hw->hw_addr); 362 u32 value; 363 364 if (ixgbe_removed(reg_addr)) 365 return IXGBE_FAILED_READ_REG; 366 if (unlikely(hw->phy.nw_mng_if_sel & > 367 IXGBE_NW_MNG_IF_SEL_ENABLE_10_100M)) { 368 struct ixgbe_adapter *adapter; 369 int i; 370 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Hi Mark, [auto build test WARNING on net-next/master] [also build test WARNING on v4.6-rc2 next-20160407] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Mark-D-Rustad/ixgbe-Add-register-wait-for-slow-links/20160408-014717 config: i386-randconfig-x012-201614 (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): In file included from include/uapi/linux/stddef.h:1:0, from include/linux/stddef.h:4, from include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:29: drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: In function 'ixgbe_read_reg': drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:367:8: error: 'IXGBE_NW_MNG_IF_SEL_ENABLE_10_100M' undeclared (first use in this function) IXGBE_NW_MNG_IF_SEL_ENABLE_10_100M)) { ^ include/linux/compiler.h:151:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^ >> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:366:2: note: in expansion of macro 'if' if (unlikely(hw->phy.nw_mng_if_sel & ^ >> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:366:6: note: in expansion of macro 'unlikely' if (unlikely(hw->phy.nw_mng_if_sel & ^ drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:367:8: note: each undeclared identifier is reported only once for each function it appears in IXGBE_NW_MNG_IF_SEL_ENABLE_10_100M)) { ^ include/linux/compiler.h:151:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^ >> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:366:2: note: in expansion of macro 'if' if (unlikely(hw->phy.nw_mng_if_sel & ^ >> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:366:6: note: in expansion of macro 'unlikely' if (unlikely(hw->phy.nw_mng_if_sel & ^ vim +/if +366 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c 360 { 361 u8 __iomem *reg_addr = ACCESS_ONCE(hw->hw_addr); 362 u32 value; 363 364 if (ixgbe_removed(reg_addr)) 365 return IXGBE_FAILED_READ_REG; > 366 if (unlikely(hw->phy.nw_mng_if_sel & > 367 IXGBE_NW_MNG_IF_SEL_ENABLE_10_100M)) { 368 struct ixgbe_adapter *adapter; 369 int i; 370 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
lkp <lkp@intel.com> wrote: > Hi Mark, > > [auto build test ERROR on net-next/master] > [also build test ERROR on v4.6-rc2 next-20160407] > [if your patch is applied to the wrong git tree, please drop us a note to > help improving the system] This particular patch needed to go on top of Jeff Kirsher's dev-queue branch. > url: > https://github.com/0day-ci/linux/commits/Mark-D-Rustad/ixgbe-Add-register-wait-for-slow-links/20160408-014717 > config: x86_64-randconfig-x010-201614 (attached as .config) > reproduce: > # save the attached .config to linux build tree > make ARCH=x86_64 > > All errors (new ones prefixed by >>): > > In file included from include/uapi/linux/stddef.h:1:0, > from include/linux/stddef.h:4, > from include/uapi/linux/posix_types.h:4, > from include/uapi/linux/types.h:13, > from include/linux/types.h:5, > from drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:29: > drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: In function 'ixgbe_read_reg': >>> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:367:8: error: >>> 'IXGBE_NW_MNG_IF_SEL_ENABLE_10_100M' undeclared (first use in this >>> function) > IXGBE_NW_MNG_IF_SEL_ENABLE_10_100M)) { > ^ > include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' > # define unlikely(x) __builtin_expect(!!(x), 0) > ^ > drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:367:8: note: each undeclared identifier is reported only once for each function it appears in > IXGBE_NW_MNG_IF_SEL_ENABLE_10_100M)) { > ^ > include/linux/compiler.h:170:42: note: in definition of macro 'unlikely' > # define unlikely(x) __builtin_expect(!!(x), 0) > ^ > > vim +/IXGBE_NW_MNG_IF_SEL_ENABLE_10_100M +367 > drivers/net/ethernet/intel/ixgbe/ixgbe_main.c > > 361 u8 __iomem *reg_addr = ACCESS_ONCE(hw->hw_addr); > 362 u32 value; > 363 > 364 if (ixgbe_removed(reg_addr)) > 365 return IXGBE_FAILED_READ_REG; > 366 if (unlikely(hw->phy.nw_mng_if_sel & >> 367 IXGBE_NW_MNG_IF_SEL_ENABLE_10_100M)) { > 368 struct ixgbe_adapter *adapter; > 369 int i; > 370 > > --- > 0-DAY kernel test infrastructure Open Source Technology > Center > https://lists.01.org/pipermail/kbuild-all Intel > Corporation > <.config.gz> -- Mark Rustad, Networking Division, Intel Corporation
> -----Original Message----- > From: Intel-wired-lan [mailto:intel-wired-lan-bounces@lists.osuosl.org] On > Behalf Of Mark D Rustad > Sent: Thursday, April 07, 2016 10:44 AM > To: intel-wired-lan@lists.osuosl.org > Subject: [Intel-wired-lan] [PATCH] ixgbe: Add register wait for slow links > > Use a new register to wait for previous register writes to complete before > issuing a register read. This is needed when slower links are in use. > > Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> > --- > Testing-hints: > - Test that x550em_a devices operate at lower speeds without complaint > - Test that x550em_a devices do not suffer throughput loss with fast links > - Test that X550EM_x, X550 and other devices operate normally > --- > drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 21 > +++++++++++++++++++++ > drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 1 + > 2 files changed, 22 insertions(+) Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Devices pass traffic correctly at low and normal speeds
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index cf95f8098f1f..bb21186d5b50 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -370,6 +370,27 @@ u32 ixgbe_read_reg(struct ixgbe_hw *hw, u32 reg) if (ixgbe_removed(reg_addr)) return IXGBE_FAILED_READ_REG; + if (unlikely(hw->phy.nw_mng_if_sel & + IXGBE_NW_MNG_IF_SEL_ENABLE_10_100M)) { + struct ixgbe_adapter *adapter; + int i; + + for (i = 0; i < 200; ++i) { + value = readl(reg_addr + IXGBE_MAC_SGMII_BUSY); + if (likely(!value)) + goto writes_completed; + if (value == IXGBE_FAILED_READ_REG) { + ixgbe_remove_adapter(hw); + return IXGBE_FAILED_READ_REG; + } + udelay(5); + } + + adapter = hw->back; + e_warn(hw, "register writes incomplete %08x\n", value); + } + +writes_completed: value = readl(reg_addr + reg); if (unlikely(value == IXGBE_FAILED_READ_REG)) ixgbe_check_remove(hw, reg); diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h index af43b0c9c6c4..1ba2c21d4a2b 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h @@ -1130,6 +1130,7 @@ struct ixgbe_thermal_sensor_data { #define IXGBE_XPCSS 0x04290 #define IXGBE_MFLCN 0x04294 #define IXGBE_SERDESC 0x04298 +#define IXGBE_MAC_SGMII_BUSY 0x04298 #define IXGBE_MACS 0x0429C #define IXGBE_AUTOC 0x042A0 #define IXGBE_LINKS 0x042A4
Use a new register to wait for previous register writes to complete before issuing a register read. This is needed when slower links are in use. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> --- Testing-hints: - Test that x550em_a devices operate at lower speeds without complaint - Test that x550em_a devices do not suffer throughput loss with fast links - Test that X550EM_x, X550 and other devices operate normally --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 21 +++++++++++++++++++++ drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 1 + 2 files changed, 22 insertions(+)