Discussion:
[etherlab-dev] e1000e link detection issues with kernel 3.14
Christoph Permes
2016-07-06 10:04:26 UTC
Permalink
Hi,

I am experiencing problems with link detection in the e1000e driver using the
3.14 kernel and the latest stable-1.5 master. Once link is down the driver
does not detect link when plugging the cable back in. Link is only detected
again when restarting the EtherCAT master.
This seems to happen only with certain e1000e network cards (e.g. 82574L) and
works fine with some other (e.g. 82573L, I218-LM).

After checking the e1000e code I noticed that there has been a change in the
original driver between kernel 3.8 and 3.10 affecting link detection in the
e1000_watchdog function (the change has been reverted in kernel 3.16).
With these changes a check for adapter->ecdev got lost in the EtherCAT capable
drivers starting with kernel 3.10.

I have created some patches for kernel 3.14 and 3.16 that fix the problem for
me, the 3.14 patches should also work for 3.10 and 3.12.

e1000e-3.16-link-detection.patch adds the missing check for adapter->ecdev.

e1000e-3.14-link-detection-v1.patch adds the missing check for adapter->ecdev.
e1000e-3.14-link-detection-v2.patch adds the missing check for adapter->ecdev
and contains the backport of the reverted change in kernel 3.16, I'm not
completely sure if v1 or v2 is the more "correct" one.


Best regards
Christoph
Gavin Lambert
2016-07-07 01:26:56 UTC
Permalink
Post by Christoph Permes
After checking the e1000e code I noticed that there has been a change in the
original driver between kernel 3.8 and 3.10 affecting link detection in the
e1000_watchdog function (the change has been reverted in kernel 3.16).
With these changes a check for adapter->ecdev got lost in the EtherCAT
capable drivers starting with kernel 3.10.
I haven't yet looked into your patches but this sounds similar to something that I fixed in patch 0024 of my patchset, the latest version of which you can find here: http://lists.etherlab.org/pipermail/etherlab-dev/2016/000553.html (original post http://lists.etherlab.org/pipermail/etherlab-dev/2015/000475.html). Perhaps it may be of interest.

Although according to my notes this was to fix something changed in 2.6.37 and later, where the watchdog is called on the wrong thread (and often not at all). So they might be independent despite being related.
Christoph Permes
2016-07-07 14:38:34 UTC
Permalink
Post by Gavin Lambert
Post by Christoph Permes
After checking the e1000e code I noticed that there has been a change in the
original driver between kernel 3.8 and 3.10 affecting link detection in the
e1000_watchdog function (the change has been reverted in kernel 3.16).
With these changes a check for adapter->ecdev got lost in the EtherCAT
capable drivers starting with kernel 3.10.
I haven't yet looked into your patches but this sounds similar to something that I fixed in patch 0024 of my patchset, the latest version of which you can find here: http://lists.etherlab.org/pipermail/etherlab-dev/2016/000553.html (original post http://lists.etherlab.org/pipermail/etherlab-dev/2015/000475.html). Perhaps it may be of interest.
Although according to my notes this was to fix something changed in 2.6.37 and later, where the watchdog is called on the wrong thread (and often not at all). So they might be independent despite being related.
I had a look at your patch, seems that it solves a different issue that results in a similar behavior.
Continue reading on narkive:
Loading...