* [PATCH] igb: When GbE link up, wait for Remote receiver status condition.
@ 2015-12-30 12:09 Takuma Ueba
2015-12-31 4:42 ` Jeff Kirsher
0 siblings, 1 reply; 3+ messages in thread
From: Takuma Ueba @ 2015-12-30 12:09 UTC (permalink / raw)
To: netdev; +Cc: Takuma Ueba
I210 device IPv6 autoconf test sometimes fails,
because DAD NS for link-local is not transmitted.
This packet is silently dropped.
This problem is seen only GbE environment.
igb_watchdog_task link up detection continues to the following process.
The following cases are observed:
1.PHY 1000BASE-T Status Register Remote receiver status bit is NG.
(NG status becomes OK after about 200 - 700ms)
2.In this case, the transfer packet is silently dropped.
1000BASE-T Status register
[Expected]: 0x3800 or 0x7800
[problem occurred]: 0x2800 or 0x6800
Frequency of occurrence: approx 1/10 - 1/40 observed
In order to avoid this problem,
wait until 1000BASE-T Status register "Remote receiver status OK"
After applying this patch, at least 400 runs succeed with no problems.
Signed-off-by: Takuma Ueba <t.ueba11@gmail.com>
---
drivers/net/ethernet/intel/igb/igb_main.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 31e5f39..bc1e83d 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -4227,6 +4227,7 @@ static void igb_watchdog_task(struct work_struct *work)
u32 link;
int i;
u32 connsw;
+ u16 phy_data, retry_count = 20;
link = igb_has_link(adapter);
@@ -4305,6 +4306,25 @@ static void igb_watchdog_task(struct work_struct *work)
break;
}
+ if (adapter->link_speed != SPEED_1000)
+ goto no_wait;
+
+ /* wait for Remote receiver status OK */
+retry_read_status:
+ if (!igb_read_phy_reg(hw, PHY_1000T_STATUS,
+ &phy_data)) {
+ if (!(phy_data & SR_1000T_REMOTE_RX_STATUS) &&
+ retry_count) {
+ msleep(100);
+ retry_count--;
+ goto retry_read_status;
+ } else if (!retry_count) {
+ dev_err(&adapter->pdev->dev, "exceed max 2 second\n");
+ }
+ } else {
+ dev_err(&adapter->pdev->dev, "read 1000Base-T Status Reg\n");
+ }
+no_wait:
netif_carrier_on(netdev);
igb_ping_all_vfs(adapter);
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] igb: When GbE link up, wait for Remote receiver status condition.
2015-12-30 12:09 [PATCH] igb: When GbE link up, wait for Remote receiver status condition Takuma Ueba
@ 2015-12-31 4:42 ` Jeff Kirsher
2015-12-31 7:05 ` ueba takuma
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Kirsher @ 2015-12-31 4:42 UTC (permalink / raw)
To: Takuma Ueba; +Cc: netdev
On Wed, Dec 30, 2015 at 4:09 AM, Takuma Ueba <t.ueba11@gmail.com> wrote:
> I210 device IPv6 autoconf test sometimes fails,
> because DAD NS for link-local is not transmitted.
> This packet is silently dropped.
> This problem is seen only GbE environment.
>
> igb_watchdog_task link up detection continues to the following process.
> The following cases are observed:
> 1.PHY 1000BASE-T Status Register Remote receiver status bit is NG.
> (NG status becomes OK after about 200 - 700ms)
> 2.In this case, the transfer packet is silently dropped.
>
> 1000BASE-T Status register
> [Expected]: 0x3800 or 0x7800
> [problem occurred]: 0x2800 or 0x6800
> Frequency of occurrence: approx 1/10 - 1/40 observed
>
> In order to avoid this problem,
> wait until 1000BASE-T Status register "Remote receiver status OK"
>
> After applying this patch, at least 400 runs succeed with no problems.
>
> Signed-off-by: Takuma Ueba <t.ueba11@gmail.com>
> ---
> drivers/net/ethernet/intel/igb/igb_main.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
Please send this to intel-wired-lan@lists.osuosl.org mailing list, or
at least CC the list since all Wired Ethernet Intel driver patches are
handled through that list.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] igb: When GbE link up, wait for Remote receiver status condition.
2015-12-31 4:42 ` Jeff Kirsher
@ 2015-12-31 7:05 ` ueba takuma
0 siblings, 0 replies; 3+ messages in thread
From: ueba takuma @ 2015-12-31 7:05 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: netdev
2015-12-31 13:42 GMT+09:00 Jeff Kirsher <jeffrey.t.kirsher@intel.com>:
> Please send this to intel-wired-lan@lists.osuosl.org mailing list, or
> at least CC the list since all Wired Ethernet Intel driver patches are
> handled through that list.
Thanks for the info.
I just sent it.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-12-31 7:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-30 12:09 [PATCH] igb: When GbE link up, wait for Remote receiver status condition Takuma Ueba
2015-12-31 4:42 ` Jeff Kirsher
2015-12-31 7:05 ` ueba takuma
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.