[etherlab-users] Problem at unplug and reconnection of network cable with Etherlab master patchset 20190904

Gavin Lambert gavin.lambert at tomra.com
Mon Apr 20 01:23:19 CEST 2020


You do need to shut down your master application (or at the very least, close all open EtherCAT handles, ie. ecrt_release_master) before you can restart the ethercat service, to avoid the "in use" errors.

I don't currently have access to my test hardware due to the lockdowns, so I am not entirely certain, but I believe my previous testing was mostly with the Intel PRO/1000 PT Dual Port cards.  Having said that, I don't recall if I tested putting a card into a motherboard that was affected by this issue.  (But on an affected motherboard with I219-LM onboard, the config change did successfully work around the issue for the onboard ports.)

I did try asking for advice from the Intel Wired LAN mailing list when originally experiencing the issue on my hardware (though it's a little tricky since Etherlab uses a modified driver) and they were familiar with the issue in general but didn't seem to think there was a purely software fix.  But they did suggest that config workaround.  It's possible they may be able to provide some assistance in your case as well.  (But again, it's tricky because the generic unpatched driver does appear to work as expected.)


Gavin Lambert
Senior Software Developer

[cid:logo_compac_5dcf97ef-52f5-498c-8b9b-728410ddffaf.png]
[cid:compacicon_82e8a8c7-154a-4a32-9720-a5badb6258e0.png]<http://www.compacsort.com> [cid:facebook_fa85b924-53b9-45cc-8162-0564f64ec3a3.png] <https://www.facebook.com/Compacsort>  [cid:linkedin_4ec016ad-84fa-443c-85a3-b9615a4ccef8.png] <https://www.linkedin.com/company/compac-sorting-equipment/>  [cid:youtube_32142163-fc27-4aed-b14d-e8a377f98a6d.png] <https://vimeo.com/compacsort>  [cid:twitter_d89338d8-98c8-4b65-9a9e-7b1333160b0d.png] <https://twitter.com/compacsort>  [cid:insta2_1cd85de9-b3a2-4971-9904-52b2481a7c82.png] <https://www.instagram.com/compacsort/>

COMPAC SORTING EQUIPMENT LTD | 4 Henderson Pl | Onehunga | Auckland 1061 | New Zealand
Switchboard: +64 96 34 00 88 | tomra.com<http://www.tomra.com>

The information contained in this communication and any attachment is confidential and may be legally privileged. It should only be read by the person(s) to whom it is addressed. If you have received this communication in error, please notify the sender and delete the communication.

From: BUSSIERES Vincent <vincent.bussieres at hemeria-group.com>
Sent: Friday, 17 April 2020 21:10
To: Gavin Lambert <gavin.lambert at tomra.com>; etherlab-users at etherlab.org
Subject: RE: Problem at unplug and reconnection of network cable with Etherlab master patchset 20190904

In fact, restarting the ethercat service doesn't work because kernel objects ec_e1000e and ec_master are still in use.
I kill them with « rmmod -f » and restart the ethercat service and it works.

In my project hardware architecture is not defined. Could you advise me a network card model in PCIe which is compatible with etherlab ?

Regards

Vincent BUSSIERES
Responsable Technique Logiciel

[cid:image001.png at 01D61703.BF951E90]
ZE Ma Campagne
36, Impasse Félix Nadar
16000 ANGOULEME
Tel: 33 (0)9.72.40.35.08
www.hemeria-group.com<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwebmail.nexeya.fr%2Fowa%2Fredir.aspx%3FC%3DGK_BqKCZef7LtPZnqnd_LGYr1NG9sz4Smy3iKIwO-pXqtJC7VgzXCA..%26URL%3Dhttp%253a%252f%252fwww.hemeria-group.com%252f&data=02%7C01%7Cgavin.lambert%40tomra.com%7C67009e55b16e497783f808d7e2af1a0b%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637227114034087938&sdata=Y160wOZzHpnLyWC1Xx2UvIcj7Q4xKMeatUBD5BmNbGo%3D&reserved=0>
P Afin de contribuer au respect de l'environnement, merci de n'imprimer ce courriel qu'en cas de nécessité.
Ce message et les fichiers pouvant être attachés sont confidentiels, réservés à l'usage unique des destinataires et n'engagent HEMERIA sous aucune forme que ce soit.
This email and any files transmitted with it are confidential, intented solely for the unique use of the recipients and don't commit HEMERIA.



De : Gavin Lambert <gavin.lambert at tomra.com<mailto:gavin.lambert at tomra.com>>
Envoyé : vendredi 17 avril 2020 01:40
À : BUSSIERES Vincent <vincent.bussieres at hemeria-group.com<mailto:vincent.bussieres at hemeria-group.com>>; etherlab-users at etherlab.org<mailto:etherlab-users at etherlab.org>
Objet : RE: Problem at unplug and reconnection of network cable with Etherlab master patchset 20190904

The udev rule is intended for motherboards with onboard e1000e only, due to an adverse interaction between the MEI power-saving and E1000E.  I don't think it will help with add-in cards - but then, in my testing none of the add-in cards that I had were affected by the issue either, since they shouldn't be interacting with the MEI.

As noted in the docs, restarting the ethercat service (thereby reloading the driver) should also recover from the fault, though obviously that's not an acceptable workaround in practice.

The good news is that (if it's the same issue) if you switch to the generic driver then the problem should go away.  The bad news is that this may limit your real-time performance.  Another option is to drop back to Debian 8, or at least a pre-4.4 Linux kernel.


Gavin Lambert
Senior Software Developer


[cid:image002.png at 01D61703.BF951E90]
[cid:image003.png at 01D61703.BF951E90]<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.compacsort.com%2F&data=02%7C01%7Cgavin.lambert%40tomra.com%7C67009e55b16e497783f808d7e2af1a0b%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637227114034087938&sdata=eh8Gz3nOuVkAxDn%2BOC1Es4Ec4lfpp9JWp86kWPX3kAU%3D&reserved=0>[cid:image004.png at 01D61703.BF951E90]<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.facebook.com%2FCompacsort&data=02%7C01%7Cgavin.lambert%40tomra.com%7C67009e55b16e497783f808d7e2af1a0b%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637227114034097936&sdata=CBlvfkGPJmw%2BGhk8%2BJRC2T8eOdrM3%2FW1%2B8j89K8yk7s%3D&reserved=0>[cid:image005.png at 01D61703.BF951E90]<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fcompac-sorting-equipment%2F&data=02%7C01%7Cgavin.lambert%40tomra.com%7C67009e55b16e497783f808d7e2af1a0b%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637227114034097936&sdata=A6ieo%2FX42tYTZbQ3jZptdYqHL1MfT3ny3ctR0BrhCtc%3D&reserved=0>[cid:image006.png at 01D61703.BF951E90]<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvimeo.com%2Fcompacsort&data=02%7C01%7Cgavin.lambert%40tomra.com%7C67009e55b16e497783f808d7e2af1a0b%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637227114034107928&sdata=X%2FFNRYKc2cBZf2AdV2bQ7F8DNVe0QDE6Y5MxjmsKioo%3D&reserved=0>[cid:image007.png at 01D61703.BF951E90]<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2Fcompacsort&data=02%7C01%7Cgavin.lambert%40tomra.com%7C67009e55b16e497783f808d7e2af1a0b%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637227114034107928&sdata=j4shwtV%2FYh8XpyO1sGRFkRJmo3hNI0r1QGPA4%2BCVXwc%3D&reserved=0>[cid:image008.png at 01D61703.BF951E90]<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.instagram.com%2Fcompacsort%2F&data=02%7C01%7Cgavin.lambert%40tomra.com%7C67009e55b16e497783f808d7e2af1a0b%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637227114034117922&sdata=VEzR187dNTbWIiRkkWnQhxslI0o%2FvjD5yCRx81Rs4gM%3D&reserved=0>

COMPAC SORTING EQUIPMENT LTD | 4 Henderson Pl | Onehunga | Auckland 1061 | New Zealand
Switchboard: +64 96 34 00 88 | tomra.com<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.tomra.com%2F&data=02%7C01%7Cgavin.lambert%40tomra.com%7C67009e55b16e497783f808d7e2af1a0b%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637227114034117922&sdata=uAao7KD%2F1b6aIQtSgpuZ83zBNezMv7MAe1MAh7BuDe0%3D&reserved=0>

The information contained in this communication and any attachment is confidential and may be legally privileged. It should only be read by the person(s) to whom it is addressed. If you have received this communication in error, please notify the sender and delete the communication.

From: BUSSIERES Vincent
Sent: Friday, 17 April 2020 11:23
To: etherlab-users at etherlab.org<mailto:etherlab-users at etherlab.org>
Subject: [etherlab-users] Problem at unplug and reconnection of network cable with Etherlab master patchset 20190904

Dear Etherlab users,

I am developing a software using Etherlab master patchset 20190904 for recent kernels.
My environment is Linux Debian 9.5 with 4.9.0-8-amd64 kernel. I am using a add-in network card, Kernel driver in use is ec_e100e.
I connect only one slave to the master.

I noticed strange behaviours when I unplug and reconnect network cable. First times everythings is OK, I can see state link jump from up to down and down to up, communication resumes.
But sometimes my software doesn't respond neither ethercat tools. Communication is break down, command etherlab master doesn't work too.
I must reboot computer to make it works again.

As advised in the patch documentation, I add a rule with the following content : ACTION=="add",KERNEL=="mei0",ATTR{../../power/control}="on" but that didn't solve the problem.

I didn't notice something wrong in dmesg log below.

[  171.720209] EtherCAT DEBUG: 0C D1 00 00 00 00 1D 00 00 00 00 00 00 00 00 00
[  171.720214] EtherCAT DEBUG: 00 00 00 00 00 00 0F 00 00 00 00 00 00 00 00 00
[  171.720218] EtherCAT DEBUG: 00 08 00 38 C0 37 06 00 00 00 00 00
[  171.721186] EtherCAT DEBUG 0: Datagram ffff8cb3d35a93d8 already queued (skipping).
[  171.721187] EtherCAT DEBUG 0: ec_master_send_datagrams(device_index = 0)
[  171.721187] EtherCAT DEBUG 0: Adding datagram 0xD2
[  171.721188] EtherCAT DEBUG 0: frame size: 46
[  171.721188] EtherCAT DEBUG 0: Sending frame:
[  171.721188] EtherCAT DEBUG: FF FF FF FF FF FF 68 05 CA 8B CE EB 88 A4 29 10
[  171.721192] EtherCAT DEBUG: 0C D2 00 00 00 00 1D 00 00 00 00 00 00 00 00 00
[  171.721196] EtherCAT DEBUG: 00 00 00 00 00 00 0F 00 00 00 00 00 00 00 00 00
[  171.721200] EtherCAT DEBUG: 00 08 00 38 C0 37 06 00 00 00 00 00
[  171.722184] EtherCAT DEBUG 0: Datagram ffff8cb3d35a93d8 already queued (skipping).
[  171.722185] EtherCAT DEBUG 0: ec_master_send_datagrams(device_index = 0)
[  171.722185] EtherCAT DEBUG 0: Adding datagram 0xD3
[  171.722186] EtherCAT DEBUG 0: frame size: 46
[  171.722186] EtherCAT DEBUG 0: Sending frame:
[  171.722186] EtherCAT DEBUG: FF FF FF FF FF FF 68 05 CA 8B CE EB 88 A4 29 10
[  171.722190] EtherCAT DEBUG: 0C D3 00 00 00 00 1D 00 00 00 00 00 00 00 00 00
[  171.722194] EtherCAT DEBUG: 00 00 00 00 00 00 0F 00 00 00 00 00 00 00 00 00
[  171.722198] EtherCAT DEBUG: 00 08 00 38 C0 37 06 00 00 00 00 00
[  171.723188] EtherCAT DEBUG 0: Datagram ffff8cb3d35a93d8 already queued (skipping).
[  171.723189] EtherCAT DEBUG 0: ec_master_send_datagrams(device_index = 0)
[  171.723189] EtherCAT DEBUG 0: Adding datagram 0xD4
[  171.723190] EtherCAT DEBUG 0: frame size: 46
[  171.723190] EtherCAT DEBUG 0: Sending frame:
[  171.723190] EtherCAT DEBUG: FF FF FF FF FF FF 68 05 CA 8B CE EB 88 A4 29 10
[  171.723194] EtherCAT DEBUG: 0C D4 00 00 00 00 1D 00 00 00 00 00 00 00 00 00
[  171.723198] EtherCAT DEBUG: 00 00 00 00 00 00 0F 00 00 00 00 00 00 00 00 00
[  171.723202] EtherCAT DEBUG: 00 08 00 38 C0 37 06 00 00 00 00 00
[  171.723898] EtherCAT 0: 0 slave(s) responding on main device.
[  171.723899] EtherCAT 0: Stopping EoE thread.

Does anybody has got an idea ? Thanks a lot.

Best regards

Vincent BUSSIERES
Responsable Technique Logiciel

[cid:image001.png at 01D61703.BF951E90]
ZE Ma Campagne
36, Impasse Félix Nadar
16000 ANGOULEME
Tel: 33 (0)9.72.40.35.08
www.hemeria-group.com<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwebmail.nexeya.fr%2Fowa%2Fredir.aspx%3FC%3DGK_BqKCZef7LtPZnqnd_LGYr1NG9sz4Smy3iKIwO-pXqtJC7VgzXCA..%26URL%3Dhttp%253a%252f%252fwww.hemeria-group.com%252f&data=02%7C01%7Cgavin.lambert%40tomra.com%7C67009e55b16e497783f808d7e2af1a0b%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637227114034127918&sdata=K9qhRWKkuyVt71zGXeFc%2F56gwJ5TnyhNgoZ49qCzxwc%3D&reserved=0>
P Afin de contribuer au respect de l'environnement, merci de n'imprimer ce courriel qu'en cas de nécessité.
Ce message et les fichiers pouvant être attachés sont confidentiels, réservés à l'usage unique des destinataires et n'engagent HEMERIA sous aucune forme que ce soit.
This email and any files transmitted with it are confidential, intented solely for the unique use of the recipients and don't commit HEMERIA.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200419/07eb158e/attachment-0004.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 5034 bytes
Desc: image001.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200419/07eb158e/attachment-0075.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 11438 bytes
Desc: image002.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200419/07eb158e/attachment-0076.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 1629 bytes
Desc: image003.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200419/07eb158e/attachment-0077.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 1750 bytes
Desc: image004.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200419/07eb158e/attachment-0078.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 1855 bytes
Desc: image005.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200419/07eb158e/attachment-0079.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 1970 bytes
Desc: image006.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200419/07eb158e/attachment-0080.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 20278 bytes
Desc: image007.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200419/07eb158e/attachment-0081.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 1506 bytes
Desc: image008.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200419/07eb158e/attachment-0082.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo_compac_5dcf97ef-52f5-498c-8b9b-728410ddffaf.png
Type: image/png
Size: 11438 bytes
Desc: logo_compac_5dcf97ef-52f5-498c-8b9b-728410ddffaf.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200419/07eb158e/attachment-0083.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compacicon_82e8a8c7-154a-4a32-9720-a5badb6258e0.png
Type: image/png
Size: 1629 bytes
Desc: compacicon_82e8a8c7-154a-4a32-9720-a5badb6258e0.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200419/07eb158e/attachment-0084.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: facebook_fa85b924-53b9-45cc-8162-0564f64ec3a3.png
Type: image/png
Size: 1750 bytes
Desc: facebook_fa85b924-53b9-45cc-8162-0564f64ec3a3.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200419/07eb158e/attachment-0085.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linkedin_4ec016ad-84fa-443c-85a3-b9615a4ccef8.png
Type: image/png
Size: 1855 bytes
Desc: linkedin_4ec016ad-84fa-443c-85a3-b9615a4ccef8.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200419/07eb158e/attachment-0086.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: youtube_32142163-fc27-4aed-b14d-e8a377f98a6d.png
Type: image/png
Size: 1970 bytes
Desc: youtube_32142163-fc27-4aed-b14d-e8a377f98a6d.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200419/07eb158e/attachment-0087.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: twitter_d89338d8-98c8-4b65-9a9e-7b1333160b0d.png
Type: image/png
Size: 20278 bytes
Desc: twitter_d89338d8-98c8-4b65-9a9e-7b1333160b0d.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200419/07eb158e/attachment-0088.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: insta2_1cd85de9-b3a2-4971-9904-52b2481a7c82.png
Type: image/png
Size: 1506 bytes
Desc: insta2_1cd85de9-b3a2-4971-9904-52b2481a7c82.png
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200419/07eb158e/attachment-0089.png>


More information about the Etherlab-users mailing list