* [Intel-wired-lan] [PATCH] ixgbe: Add register wait for slow links
@ 2016-04-07 17:43 Mark D Rustad
2016-04-07 17:58 ` kbuild test robot
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Mark D Rustad @ 2016-04-07 17:43 UTC (permalink / raw)
To: intel-wired-lan
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(+)
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Intel-wired-lan] [PATCH] ixgbe: Add register wait for slow links
2016-04-07 17:43 [Intel-wired-lan] [PATCH] ixgbe: Add register wait for slow links Mark D Rustad
@ 2016-04-07 17:58 ` kbuild test robot
2016-04-07 18:05 ` Rustad, Mark D
2016-04-07 18:04 ` kbuild test robot
2016-04-12 21:50 ` Bowers, AndrewX
2 siblings, 1 reply; 5+ messages in thread
From: kbuild test robot @ 2016-04-07 17:58 UTC (permalink / raw)
To: intel-wired-lan
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/octet-stream
Size: 32342 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20160408/387104f6/attachment-0001.obj>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-wired-lan] [PATCH] ixgbe: Add register wait for slow links
2016-04-07 17:43 [Intel-wired-lan] [PATCH] ixgbe: Add register wait for slow links Mark D Rustad
2016-04-07 17:58 ` kbuild test robot
@ 2016-04-07 18:04 ` kbuild test robot
2016-04-12 21:50 ` Bowers, AndrewX
2 siblings, 0 replies; 5+ messages in thread
From: kbuild test robot @ 2016-04-07 18:04 UTC (permalink / raw)
To: intel-wired-lan
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/octet-stream
Size: 26293 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20160408/476a49cf/attachment-0001.obj>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-wired-lan] [PATCH] ixgbe: Add register wait for slow links
2016-04-07 17:58 ` kbuild test robot
@ 2016-04-07 18:05 ` Rustad, Mark D
0 siblings, 0 replies; 5+ messages in thread
From: Rustad, Mark D @ 2016-04-07 18:05 UTC (permalink / raw)
To: intel-wired-lan
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20160407/cf74b5a5/attachment.asc>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-wired-lan] [PATCH] ixgbe: Add register wait for slow links
2016-04-07 17:43 [Intel-wired-lan] [PATCH] ixgbe: Add register wait for slow links Mark D Rustad
2016-04-07 17:58 ` kbuild test robot
2016-04-07 18:04 ` kbuild test robot
@ 2016-04-12 21:50 ` Bowers, AndrewX
2 siblings, 0 replies; 5+ messages in thread
From: Bowers, AndrewX @ 2016-04-12 21:50 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Mark D Rustad
> Sent: Thursday, April 07, 2016 10:44 AM
> To: intel-wired-lan at 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-04-12 21:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-07 17:43 [Intel-wired-lan] [PATCH] ixgbe: Add register wait for slow links Mark D Rustad
2016-04-07 17:58 ` kbuild test robot
2016-04-07 18:05 ` Rustad, Mark D
2016-04-07 18:04 ` kbuild test robot
2016-04-12 21:50 ` Bowers, AndrewX
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.