[etherlab-users] How to only use one adapter for EtherCAT??

Jeroen Van den Keybus jeroen.vandenkeybus at gmail.com
Fri Feb 28 10:05:58 CET 2014


Typo: /sys/bus/pci/driver should be /sys/bus/pci/drivers

Sorry,

J.



2014-02-28 10:04 GMT+01:00 Jeroen Van den Keybus <
jeroen.vandenkeybus at gmail.com>:

> There are some disadvantages to using the ec_... drivers for normal
> networking. Especially during development it can be a serious hindrance.
>
> An alternative is to unbind and bind the PCI network devices manually:
>
> Given is that the kernel (non-ECAT) driver is loaded for a couple of e.g.
> e1000 devices (you cannot do anything about that; the kernel internally
> enumerates all matching VIDs and PIDs so udev is of no help here).
>
> Load the ec_ driver (ec_e1000 in the example) for your device. Since
> there's already a driver loaded, it will load but not probe.
>
> Next you need to find the PCI device bus address for the device you want
> to use for ECAT using (e.g. eth2):
>
> # ethtool -i eth2
>
> and note the 0000:xx:xx.x PCI bus address ('bus-info')
>
> Then, as root, you unbind the kernel driver (e1000) for this device:
>
> # echo <PCI bus address> > /sys/bus/pci/driver/<name of driver to
> unbind>/unbind
>
> Finally, bind the EtherCAT capable driver (ec_e1000) for this device using:
>
> # echo <PCI bus address> > sys/bus/pci/driver/<name of loaded EtherCAT
> capable driver>/bind
>
>
> Now two different drivers are loaded for the same type of device.
>
>
> J.
>
>
> 2014-02-27 22:37 GMT+01:00 Gavin Lambert <gavinl at compacsort.com>:
>
> Quoth Fredrik Viksten:
>> > How would I go about setting the system up so I can A) use NIC eth0 for
>> > normal network traffic and B) use an EtherCAT-optimized kernel driver
>> > for NIC eth1 when they are both using the same chipset?
>>
>> All you should need to do is to explicitly specify the MAC that you want
>> to use for EtherCAT in the /etc/sysconfig/ethercat file, and let it load
>> the EtherCAT-optimised driver as normal.
>>
>> The modified driver includes checks to see whether it's being used in
>> EtherCAT mode or not for each individual instance, so the EtherCAT one will
>> operate in optimised polling mode and the Ethernet one will operate in
>> regular interrupt mode.
>>
>> You may also need to edit additional config files to avoid treating it as
>> a standard Ethernet port (eg. DHCP, network management, etc), but that will
>> vary by distribution.  I can't really help with that as I've only used
>> EtherCAT on small systems (no GUI, minimal number of installed packages).
>>
>>
>> _______________________________________________
>> etherlab-users mailing list
>> etherlab-users at etherlab.org
>> http://lists.etherlab.org/mailman/listinfo/etherlab-users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20140228/22f6028d/attachment-0004.htm>


More information about the Etherlab-users mailing list