Discussion:
[etherlab-dev] "Master still waiting for devices!" problem.
周甫霖
2017-01-18 08:26:42 UTC
Permalink
Hi all,

First appreciate the implement of etherlabmaster.
I'm devolping a non-native supported ethernet device to be able to work as
a RTDM EtherCAT master.
What the device is one part of TI AM335x SoC and is named "cpsw".
Everything smoothly while adapting driver code, building module file, and
installing.
But I was stuck by a problem when I try to start EtherCAT master.
Following is my steps and message shown by dmesg:

# /etc/init.d/ethercat start
Starting EtherCAT master 1.5.2 done

[ 30.849754] EtherCAT: Requesting master 0...
[ 30.854265] EtherCAT ERROR 0: Master still waiting for devices!

More information:

# /opt/etherlab/bin/ethercat master
Master0
Phase: Waiting for device(s)...
Active: no
Slaves: 0
Ethernet devices:
Main: a0:f6:fd:22:bd:ed (waiting...)
Link: DOWN
Tx frames: 0
Tx bytes: 0
Rx frames: 0
Rx bytes: 0
Tx errors: 0
Tx frame rate [1/s]: 0 0 0
Tx rate [KByte/s]: 0.0 0.0 0.0
Rx frame rate [1/s]: 0 0 0
Rx rate [KByte/s]: 0.0 0.0 0.0
Common:
Tx frames: 0
Tx bytes: 0
Rx frames: 0
Rx bytes: 0
Lost frames: 0
Tx frame rate [1/s]: 0 0 0
Tx rate [KByte/s]: 0.0 0.0 0.0
Rx frame rate [1/s]: -509579 -509608 -335544
Rx rate [KByte/s]: 845836.0 -469824.0 163840.0
Loss rate [1/s]: 0 0 0
Frame loss [%]: 0.0 0.0 0.0
Distributed clocks:
Reference clock: None
Application time: 0
2000-01-01 00:00:00.000000000



Could anyone kindly advice what is the key point to go forword form
"waiting device"?

Best regards - Erix Chou
Graeme Foot
2017-01-18 21:27:49 UTC
Permalink
I can think of four possible errors at the moment:


1) Your ethercat configuration file isn't matching the correct MAC address.


In /etc/sysconfig/ethercat you have "MASTER0_DEVICE="ff:ff:ff:ff:ff:ff"". ff:ff:ff:ff:ff:ff matches the first available device, looking at devices in the order the drivers are loaded (in the DEVICE_MODULES key). So you may have sepecified a MAC address that is not matching your device



2) You are not loading your device module.


In /etc/sysconfig/ethercat you have "DEVICE_MODULES=". This specifies the network driver modules (ethercat versions) that you want to run (space delimited list). You should put your module first in the list if you use a generic MAC address (ie: ff:ff:ff:ff:ff:ff) in the setting above.


eg:

DEVICE_MODULES="cpsw e1000 e1000e"



3) Your driver doesn't work.


Check dmesg for any errors.



4) Your driver is not correctly integrating with the EtherCAT master.


There's various functions that your driver needs to interact with the master. But from memory the one that tells the master that a device is available is:

ecdev_offer();



But the guts of it is that no offered net devices match the requirements of the MASTER0_DEVICE config setting.



I wrote a patch for the CX2100 device a while ago. You could look it up in the forums to check how it interacts with the master (or I could send it if you can't find it). Look for the ecdev_... methods and the notes about the skb's.



Regards,

Graeme.





________________________________
From: etherlab-dev <etherlab-dev-***@etherlab.org> on behalf of $B<~JcpC(B <***@mapacode.tw>
Sent: Wednesday, 18 January 2017 9:26:42 PM
To: etherlab-***@etherlab.org
Subject: [etherlab-dev] "Master still waiting for devices!" problem.

Hi all,

First appreciate the implement of etherlabmaster.
I'm devolping a non-native supported ethernet device to be able to work as a RTDM EtherCAT master.
What the device is one part of TI AM335x SoC and is named "cpsw".
Everything smoothly while adapting driver code, building module file, and installing.
But I was stuck by a problem when I try to start EtherCAT master.
Following is my steps and message shown by dmesg:

# /etc/init.d/ethercat start
Starting EtherCAT master 1.5.2 done

[ 30.849754] EtherCAT: Requesting master 0...
[ 30.854265] EtherCAT ERROR 0: Master still waiting for devices!

More information:

# /opt/etherlab/bin/ethercat master
Master0
Phase: Waiting for device(s)...
Active: no
Slaves: 0
Ethernet devices:
Main: a0:f6:fd:22:bd:ed (waiting...)
Link: DOWN
Tx frames: 0
Tx bytes: 0
Rx frames: 0
Rx bytes: 0
Tx errors: 0
Tx frame rate [1/s]: 0 0 0
Tx rate [KByte/s]: 0.0 0.0 0.0
Rx frame rate [1/s]: 0 0 0
Rx rate [KByte/s]: 0.0 0.0 0.0
Common:
Tx frames: 0
Tx bytes: 0
Rx frames: 0
Rx bytes: 0
Lost frames: 0
Tx frame rate [1/s]: 0 0 0
Tx rate [KByte/s]: 0.0 0.0 0.0
Rx frame rate [1/s]: -509579 -509608 -335544
Rx rate [KByte/s]: 845836.0 -469824.0 163840.0
Loss rate [1/s]: 0 0 0
Frame loss [%]: 0.0 0.0 0.0
Distributed clocks:
Reference clock: None
Application time: 0
2000-01-01 00:00:00.000000000



Could anyone kindly advice what is the key point to go forword form "waiting device"?

Best regards - Erix Chou
周甫霖
2017-01-19 03:14:33 UTC
Permalink
Hi Graeme,

I think that 1) and 2) was done correctly in my case.
For 3), I'll check dmesg.
For 4), I found the thread in 2013:
http://lists.etherlab.org/pipermail/etherlab-users/2013/002074.html
But I can't get the attachment since I'm not in the etherlab-user mail list.
Is there any other way to get the attachment?

Thank you for your response.
Best regards - Erix Chou

2017-01-19 5:27 GMT+08:00 Graeme Foot <***@touchcut.com>:

> I can think of four possible errors at the moment:
>
>
> 1) Your ethercat configuration file isn't matching the correct MAC address.
>
>
> In /etc/sysconfig/ethercat you have "MASTER0_DEVICE="ff:ff:ff:ff:ff:ff"".
> ff:ff:ff:ff:ff:ff matches the first available device, looking at devices
> in the order the drivers are loaded (in the DEVICE_MODULES key). So you
> may have sepecified a MAC address that is not matching your device
>
>
>
> 2) You are not loading your device module.
>
>
> In /etc/sysconfig/ethercat you have "DEVICE_MODULES=". This specifies
> the network driver modules (ethercat versions) that you want to run (space
> delimited list). You should put your module first in the list if you use a
> generic MAC address (ie: ff:ff:ff:ff:ff:ff) in the setting above.
>
>
> eg:
>
> DEVICE_MODULES="cpsw e1000 e1000e"
>
>
>
> 3) Your driver doesn't work.
>
>
> Check dmesg for any errors.
>
>
>
> 4) Your driver is not correctly integrating with the EtherCAT master.
>
>
> There's various functions that your driver needs to interact with the
> master. But from memory the one that tells the master that a device is
> available is:
>
> ecdev_offer();
>
>
>
> But the guts of it is that no offered net devices match the requirements
> of the MASTER0_DEVICE config setting.
>
>
>
> I wrote a patch for the CX2100 device a while ago. You could look it up
> in the forums to check how it interacts with the master (or I could send it
> if you can't find it). Look for the ecdev_... methods and the notes about
> the skb's.
>
>
>
> Regards,
>
> Graeme.
>
>
>
>
>
> ------------------------------
> *From:* etherlab-dev <etherlab-dev-***@etherlab.org> on behalf of 呚甫霖
> <***@mapacode.tw>
> *Sent:* Wednesday, 18 January 2017 9:26:42 PM
> *To:* etherlab-***@etherlab.org
> *Subject:* [etherlab-dev] "Master still waiting for devices!" problem.
>
> Hi all,
>
> First appreciate the implement of etherlabmaster.
> I'm devolping a non-native supported ethernet device to be able to work as
> a RTDM EtherCAT master.
> What the device is one part of TI AM335x SoC and is named "cpsw".
> Everything smoothly while adapting driver code, building module file, and
> installing.
> But I was stuck by a problem when I try to start EtherCAT master.
> Following is my steps and message shown by dmesg:
>
> # /etc/init.d/ethercat start
> Starting EtherCAT master 1.5.2 done
>
> [ 30.849754] EtherCAT: Requesting master 0...
> [ 30.854265] EtherCAT ERROR 0: Master still waiting for devices!
>
> More information:
>
> # /opt/etherlab/bin/ethercat master
> Master0
> Phase: Waiting for device(s)...
> Active: no
> Slaves: 0
> Ethernet devices:
> Main: a0:f6:fd:22:bd:ed (waiting...)
> Link: DOWN
> Tx frames: 0
> Tx bytes: 0
> Rx frames: 0
> Rx bytes: 0
> Tx errors: 0
> Tx frame rate [1/s]: 0 0 0
> Tx rate [KByte/s]: 0.0 0.0 0.0
> Rx frame rate [1/s]: 0 0 0
> Rx rate [KByte/s]: 0.0 0.0 0.0
> Common:
> Tx frames: 0
> Tx bytes: 0
> Rx frames: 0
> Rx bytes: 0
> Lost frames: 0
> Tx frame rate [1/s]: 0 0 0
> Tx rate [KByte/s]: 0.0 0.0 0.0
> Rx frame rate [1/s]: -509579 -509608 -335544
> Rx rate [KByte/s]: 845836.0 -469824.0 163840.0
> Loss rate [1/s]: 0 0 0
> Frame loss [%]: 0.0 0.0 0.0
> Distributed clocks:
> Reference clock: None
> Application time: 0
> 2000-01-01 00:00:00.000000000
>
>
>
> Could anyone kindly advice what is the key point to go forword form
> "waiting device"?
>
> Best regards - Erix Chou
>



--
動皋科技有限公叞
台南垂安平區建平十䞃街159號䞃暓之䞀
呚甫霖 Erix Chou
E-mail***@mapacode.tw
TEL06-2970665
Mobile0985946776
Graeme Foot
2017-01-19 04:56:54 UTC
Permalink
Hi,


My CX2100 patch is attached.


Graeme.


________________________________
From: $B<~JcpC(B <***@mapacode.tw>
Sent: Thursday, 19 January 2017 4:14:33 PM
To: Graeme Foot
Cc: etherlab-***@etherlab.org
Subject: Re: [etherlab-dev] "Master still waiting for devices!" problem.

Hi Graeme,

I think that 1) and 2) was done correctly in my case.
For 3), I'll check dmesg.
For 4), I found the thread in 2013:
http://lists.etherlab.org/pipermail/etherlab-users/2013/002074.html
But I can't get the attachment since I'm not in the etherlab-user mail list.
Is there any other way to get the attachment?

Thank you for your response.
Best regards - Erix Chou

2017-01-19 5:27 GMT+08:00 Graeme Foot <***@touchcut.com<mailto:***@touchcut.com>>:

I can think of four possible errors at the moment:


1) Your ethercat configuration file isn't matching the correct MAC address.


In /etc/sysconfig/ethercat you have "MASTER0_DEVICE="ff:ff:ff:ff:ff:ff"". ff:ff:ff:ff:ff:ff matches the first available device, looking at devices in the order the drivers are loaded (in the DEVICE_MODULES key). So you may have sepecified a MAC address that is not matching your device



2) You are not loading your device module.


In /etc/sysconfig/ethercat you have "DEVICE_MODULES=". This specifies the network driver modules (ethercat versions) that you want to run (space delimited list). You should put your module first in the list if you use a generic MAC address (ie: ff:ff:ff:ff:ff:ff) in the setting above.


eg:

DEVICE_MODULES="cpsw e1000 e1000e"



3) Your driver doesn't work.


Check dmesg for any errors.



4) Your driver is not correctly integrating with the EtherCAT master.


There's various functions that your driver needs to interact with the master. But from memory the one that tells the master that a device is available is:

ecdev_offer();



But the guts of it is that no offered net devices match the requirements of the MASTER0_DEVICE config setting.



I wrote a patch for the CX2100 device a while ago. You could look it up in the forums to check how it interacts with the master (or I could send it if you can't find it). Look for the ecdev_... methods and the notes about the skb's.



Regards,

Graeme.





________________________________
From: etherlab-dev <etherlab-dev-***@etherlab.org<mailto:etherlab-dev-***@etherlab.org>> on behalf of $B<~JcpC(B <***@mapacode.tw<mailto:***@mapacode.tw>>
Sent: Wednesday, 18 January 2017 9:26:42 PM
To: etherlab-***@etherlab.org<mailto:etherlab-***@etherlab.org>
Subject: [etherlab-dev] "Master still waiting for devices!" problem.

Hi all,

First appreciate the implement of etherlabmaster.
I'm devolping a non-native supported ethernet device to be able to work as a RTDM EtherCAT master.
What the device is one part of TI AM335x SoC and is named "cpsw".
Everything smoothly while adapting driver code, building module file, and installing.
But I was stuck by a problem when I try to start EtherCAT master.
Following is my steps and message shown by dmesg:

# /etc/init.d/ethercat start
Starting EtherCAT master 1.5.2 done

[ 30.849754] EtherCAT: Requesting master 0...
[ 30.854265] EtherCAT ERROR 0: Master still waiting for devices!

More information:

# /opt/etherlab/bin/ethercat master
Master0
Phase: Waiting for device(s)...
Active: no
Slaves: 0
Ethernet devices:
Main: a0:f6:fd:22:bd:ed (waiting...)
Link: DOWN
Tx frames: 0
Tx bytes: 0
Rx frames: 0
Rx bytes: 0
Tx errors: 0
Tx frame rate [1/s]: 0 0 0
Tx rate [KByte/s]: 0.0 0.0 0.0
Rx frame rate [1/s]: 0 0 0
Rx rate [KByte/s]: 0.0 0.0 0.0
Common:
Tx frames: 0
Tx bytes: 0
Rx frames: 0
Rx bytes: 0
Lost frames: 0
Tx frame rate [1/s]: 0 0 0
Tx rate [KByte/s]: 0.0 0.0 0.0
Rx frame rate [1/s]: -509579 -509608 -335544
Rx rate [KByte/s]: 845836.0 -469824.0 163840.0
Loss rate [1/s]: 0 0 0
Frame loss [%]: 0.0 0.0 0.0
Distributed clocks:
Reference clock: None
Application time: 0
2000-01-01 00:00:00.000000000



Could anyone kindly advice what is the key point to go forword form "waiting device"?

Best regards - Erix Chou



--
$BF0Dx2J5;M-8B8x;J(B
$BBfFn;T0BJ?R?7zJ?==<739(B159$BiK<7\lG70l(B
$B<~JcpC(B Erix Chou
E-mail$B!'(***@mapacode.tw<mailto:***@mapacode.tw>
TEL$B!'(B06-2970665
Mobile$B!'(B0985946776
Patrick Brünn
2017-01-19 09:51:55 UTC
Permalink
Just another thought:
In your log I see a:
Link: DOWN

Check if your driver is propagating the link state to Etherlab by calling: ecdev_set_link(ecdev, 1);

Regards,
Patrick


From: etherlab-dev [mailto:etherlab-dev-***@etherlab.org] On Behalf Of ???
Sent: Donnerstag, 19. Januar 2017 04:15
To: Graeme Foot <***@touchcut.com>
Cc: etherlab-***@etherlab.org
Subject: Re: [etherlab-dev] "Master still waiting for devices!" problem.

Hi Graeme,
I think that 1) and 2) was done correctly in my case.
For 3), I'll check dmesg.
For 4), I found the thread in 2013:
http://lists.etherlab.org/pipermail/etherlab-users/2013/002074.html
But I can't get the attachment since I'm not in the etherlab-user mail list.
Is there any other way to get the attachment?
Thank you for your response.
Best regards - Erix Chou

2017-01-19 5:27 GMT+08:00 Graeme Foot <***@touchcut.com<mailto:***@touchcut.com>>:

Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff
Registered office: Verl, Germany | Register court: Guetersloh HRA 7075


I can think of four possible errors at the moment:



1) Your ethercat configuration file isn't matching the correct MAC address.



In /etc/sysconfig/ethercat you have "MASTER0_DEVICE="ff:ff:ff:ff:ff:ff"". ff:ff:ff:ff:ff:ff matches the first available device, looking at devices in the order the drivers are loaded (in the DEVICE_MODULES key). So you may have sepecified a MAC address that is not matching your device





2) You are not loading your device module.



In /etc/sysconfig/ethercat you have "DEVICE_MODULES=". This specifies the network driver modules (ethercat versions) that you want to run (space delimited list). You should put your module first in the list if you use a generic MAC address (ie: ff:ff:ff:ff:ff:ff) in the setting above.



eg:

DEVICE_MODULES="cpsw e1000 e1000e"





3) Your driver doesn't work.



Check dmesg for any errors.





4) Your driver is not correctly integrating with the EtherCAT master.



There's various functions that your driver needs to interact with the master. But from memory the one that tells the master that a device is available is:

ecdev_offer();





But the guts of it is that no offered net devices match the requirements of the MASTER0_DEVICE config setting.





I wrote a patch for the CX2100 device a while ago. You could look it up in the forums to check how it interacts with the master (or I could send it if you can't find it). Look for the ecdev_... methods and the notes about the skb's.





Regards,

Graeme.









________________________________
From: etherlab-dev <etherlab-dev-***@etherlab.org<mailto:etherlab-dev-***@etherlab.org>> on behalf of 呚甫霖 <***@mapacode.tw<mailto:***@mapacode.tw>>
Sent: Wednesday, 18 January 2017 9:26:42 PM
To: etherlab-***@etherlab.org<mailto:etherlab-***@etherlab.org>
Subject: [etherlab-dev] "Master still waiting for devices!" problem.

Hi all,

First appreciate the implement of etherlabmaster.
I'm devolping a non-native supported ethernet device to be able to work as a RTDM EtherCAT master.
What the device is one part of TI AM335x SoC and is named "cpsw".
Everything smoothly while adapting driver code, building module file, and installing.
But I was stuck by a problem when I try to start EtherCAT master.
Following is my steps and message shown by dmesg:

# /etc/init.d/ethercat start
Starting EtherCAT master 1.5.2 done

[ 30.849754] EtherCAT: Requesting master 0...
[ 30.854265] EtherCAT ERROR 0: Master still waiting for devices!

More information:

# /opt/etherlab/bin/ethercat master
Master0
Phase: Waiting for device(s)...
Active: no
Slaves: 0
Ethernet devices:
Main: a0:f6:fd:22:bd:ed (waiting...)
Link: DOWN
Tx frames: 0
Tx bytes: 0
Rx frames: 0
Rx bytes: 0
Tx errors: 0
Tx frame rate [1/s]: 0 0 0
Tx rate [KByte/s]: 0.0 0.0 0.0
Rx frame rate [1/s]: 0 0 0
Rx rate [KByte/s]: 0.0 0.0 0.0
Common:
Tx frames: 0
Tx bytes: 0
Rx frames: 0
Rx bytes: 0
Lost frames: 0
Tx frame rate [1/s]: 0 0 0
Tx rate [KByte/s]: 0.0 0.0 0.0
Rx frame rate [1/s]: -509579 -509608 -335544
Rx rate [KByte/s]: 845836.0 -469824.0 163840.0
Loss rate [1/s]: 0 0 0
Frame loss [%]: 0.0 0.0 0.0
Distributed clocks:
Reference clock: None
Application time: 0
2000-01-01 00:00:00.000000000



Could anyone kindly advice what is the key point to go forword form "waiting device"?

Best regards - Erix Chou



--
動皋科技有限公叞
台南垂安平區建平十䞃街159號䞃暓之䞀
呚甫霖 Erix Chou
E-mail***@mapacode.tw<mailto:***@mapacode.tw>
TEL06-2970665
Mobile0985946776
周甫霖
2017-01-31 09:24:03 UTC
Permalink
Hi all,

The "Master still waiting for devices!" problem was cleared after we
departed the network driver from kernel and blocked the module.
Now we got a new problem. It's seems like related to IRQ.
Here's the info in dmesg:

[ 42.811736] EtherCAT: Master driver 1.5.2 unknown
[ 42.823040] EtherCAT 0: Registering RTDM device EtherCAT.
[ 42.829957] EtherCAT: 1 master waiting for devices.
[ 42.977620] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[ 42.984045] davinci_mdio 4a101000.mdio: detected phy mask fffffff5
[ 43.051015] libphy: 4a101000.mdio: probed
[ 43.055261] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01,
driver TLK110
[ 43.063694] davinci_mdio 4a101000.mdio: phy[3]: device 4a101000.mdio:03,
driver TLK110
[ 43.079564] ec_cpsw 4a100000.ethernet: Detected MACID = a0:f6:fd:22:bd:ed
[ 43.107209] EtherCAT: Accepting A0:F6:FD:22:BD:ED as main device for
master 0.
[ 43.121821] (null): initializing cpsw version 1.12 (0)
[ 43.209114] (null): phy found : id is : 0x2000a211
[ 43.228929] EtherCAT 0: Starting EtherCAT-IDLE thread.
[ 55.208124] libphy: 4a101000.mdio:01 - Link is Up - 100/Full
[ 55.214091] EtherCAT 0: Link state of ecm0 changed to UP.
[ 55.465263] irq 58: nobody cared (try booting with the "irqpoll" option)
[ 55.472258] CPU: 0 PID: 2102 Comm: EtherCAT-IDLE Tainted: G O
3.14.26-g1126d79-dirty #3
[ 55.481499] Backtrace:
[ 55.484084] [<c0011df0>] (dump_backtrace) from [<c0012004>]
(show_stack+0x18/0x1c)
[ 55.492026] r7:00000000 r6:0000003a r5:00000000 r4:dd006e3c
[ 55.497948] [<c0011fec>] (show_stack) from [<c060ae0c>]
(dump_stack+0x24/0x28)
[ 55.505538] [<c060ade8>] (dump_stack) from [<c006d020>]
(__report_bad_irq.isra.7+0x30/0xe4)
[ 55.514306] [<c006cff0>] (__report_bad_irq.isra.7) from [<c006d3a4>]
(note_interrupt+0x260/0x2b0)
[ 55.523615] r5:00000000 r4:dd006e00
[ 55.527357] [<c006d144>] (note_interrupt) from [<c006b528>]
(handle_irq_event_percpu+0x158/0x1d0)
[ 55.536594] r10:dd006e00 r9:0000003a r8:c088dc08 r7:00000000
r6:00000000 r5:00000000
[ 55.544767] r4:00000000 r3:00000000
[ 55.548503] [<c006b3d0>] (handle_irq_event_percpu) from [<c006b5d0>]
(handle_irq_event+0x30/0x40)
[ 55.557740] r10:c088dc08 r9:c08efb80 r8:00000001 r7:c088dc0c
r6:00000000 r5:0000003a
[ 55.565912] r4:dd006e00
[ 55.568556] [<c006b5a0>] (handle_irq_event) from [<c006e444>]
(handle_level_irq+0x6c/0xcc)
[ 55.577159] r5:0000003a r4:dd006e00
[ 55.580892] [<c006e3d8>] (handle_level_irq) from [<c006abe8>]
(generic_handle_irq+0x34/0x44)
[ 55.589678] r5:0000003a r4:0000003a
[ 55.593413] [<c006abb4>] (generic_handle_irq) from [<c000f294>]
(handle_IRQ+0x40/0x8c)
[ 55.601655] r5:0000003a r4:c0898acc
[ 55.605394] [<c000f254>] (handle_IRQ) from [<c0017b9c>]
(__ipipe_do_IRQ+0x14/0x1c)
[ 55.613274] r7:c088dc0c r6:c088dc10 r5:00000004 r4:c08f0a00
[ 55.619198] [<c0017b88>] (__ipipe_do_IRQ) from [<c008d4d4>]
(__ipipe_do_sync_stage+0x250/0x274)
[ 55.628334] [<c008d284>] (__ipipe_do_sync_stage) from [<c008d588>]
(__ipipe_do_sync_pipeline+0x90/0x98)
[ 55.638191] r10:00000000 r9:c088ec08 r8:c088fc08 r7:c08efb80
r6:c08efb40 r5:c088dc08
[ 55.646365] r4:c088dc08
[ 55.649010] [<c008d4f8>] (__ipipe_do_sync_pipeline) from [<c008da40>]
(__ipipe_dispatch_irq+0x1d0/0x260)
[ 55.658957] r9:c088ec08 r8:c088fc08 r7:0000003b r6:00000000 r5:0000003a
r4:c088dc04
[ 55.667050] [<c008d870>] (__ipipe_dispatch_irq) from [<c0008428>]
(__ipipe_grab_irq+0x50/0x5c)
[ 55.676084] r10:00000000 r9:0000002e r8:db299ed8 r7:0000003a
r6:db299e58 r5:c08c5ccc
[ 55.684258] r4:db299e58 r3:c088dc08
[ 55.687989] [<c00083d8>] (__ipipe_grab_irq) from [<c000876c>]
(omap3_intc_handle_irq+0x98/0xa8)
[ 55.697048] Exception stack(0xdb299e38 to 0xdb299e80)
[ 55.702309] 9e20:
bf0b06b0 600f0013
[ 55.710829] 9e40: ffffffff db299e8c db299ebc db299e58 c060f1c0 c00086e0
00000000 dd5ec230
[ 55.719350] 9e60: 00000000 00000000 dd5ec060 0000003c dd424740 00000000
db299ed8 0000002e
[ 55.727864] r5:c08c5ccc r4:fa200000
[ 55.731604] [<c00086d4>] (omap3_intc_handle_irq) from [<c060f1c0>]
(__irq_svc+0x40/0x4c)
[ 55.740028] Exception stack(0xdb299e58 to 0xdb299ea0)
[ 55.745287] 9e40:
00000000 dd5ec230
[ 55.753806] 9e60: 00000000 00000000 dd5ec060 0000003c dd424740 00000000
db299ed8 0000002e
[ 55.762326] 9e80: 00000000 db299ebc db299e38 db299ea0 c0451408 bf0b06b0
600f0013 ffffffff
[ 55.770839] r7:db299e8c r6:ffffffff r5:600f0013 r4:bf0b06b0
[ 55.776985] [<bf0b0638>] (ec_device_send [ec_master]) from [<bf0ca43c>]
(ec_master_send_datagrams+0x1d4/0x324 [ec_master])
[ 55.788577] r7:db74074e r6:dd5ec720 r5:db74077c r4:00000000
[ 55.794592] [<bf0ca268>] (ec_master_send_datagrams [ec_master]) from
[<bf0ca5fc>] (ecrt_master_send+0x70/0x110 [ec_master])
[ 55.806273] r10:00000001 r9:dd5ed000 r8:00000005 r7:dd5ec060
r6:00000000 r5:00000000
[ 55.814447] r4:dd5ec000
[ 55.817186] [<bf0ca58c>] (ecrt_master_send [ec_master]) from
[<bf0cb398>] (ec_master_idle_thread+0xbc/0x14c [ec_master])
[ 55.828593] r9:dd5ed000 r8:dd5ec544 r7:dd5ec054 r6:dd5ec2b0 r5:dd5ed284
r4:dd5ec000
[ 55.836737] [<bf0cb2dc>] (ec_master_idle_thread [ec_master]) from
[<c0055abc>] (kthread+0xcc/0xe4)
[ 55.846137] r10:00000000 r9:00000000 r8:00000000 r7:bf0cb2dc
r6:dd5ec000 r5:db785e80
[ 55.854311] r4:00000000 r3:dd41c400
[ 55.858046] [<c00559f0>] (kthread) from [<c000ea20>]
(ret_from_fork+0x18/0x38)
[ 55.865564] r7:00000000 r6:00000000 r5:c00559f0 r4:db785e80
[ 55.871469] handlers:
[ 55.873853] [<bf111ba0>] cpsw_tx_interrupt [ec_cpsw]
[ 55.879021] Disabling IRQ #58
[ 55.901101] EtherCAT WARNING 0: 1 datagram TIMED OUT!
[ 56.897597] EtherCAT WARNING 0: 50 datagrams TIMED OUT!
[ 57.897595] EtherCAT WARNING 0: 50 datagrams TIMED OUT!
[ 58.897598] EtherCAT WARNING 0: 50 datagrams TIMED OUT!
[ 59.897602] EtherCAT WARNING 0: 50 datagrams TIMED OUT!
[ 60.897605] EtherCAT WARNING 0: 50 datagrams TIMED OUT!
[ 61.897602] EtherCAT WARNING 0: 50 datagrams TIMED OUT!
[ 62.897593] EtherCAT WARNING 0: 50 datagrams TIMED OUT!
[ 63.897589] EtherCAT WARNING 0: 50 datagrams TIMED OUT!
[ 64.897599] EtherCAT WARNING 0: 50 datagrams TIMED OUT!
[ 65.897592] EtherCAT WARNING 0: 50 datagrams TIMED OUT!
[ 66.897604] EtherCAT WARNING 0: 50 datagrams TIMED OUT!

Does that mean we did not adapt the cpsw driver correctly?
How could it be caused?

Attachments are the related files and patchs.

Thanks & Regards.

2017-01-19 17:51 GMT+08:00 Patrick BrÃŒnn <***@beckhoff.com>:

> Just another thought:
>
> In your log I see a:
>
> Link: DOWN
>
>
>
> Check if your driver is propagating the link state to Etherlab by
> calling: ecdev_set_link(ecdev, 1);
>
>
>
> Regards,
>
> Patrick
>
>
>
>
>
> *From:* etherlab-dev [mailto:etherlab-dev-***@etherlab.org] *On
> Behalf Of *???
> *Sent:* Donnerstag, 19. Januar 2017 04:15
> *To:* Graeme Foot <***@touchcut.com>
> *Cc:* etherlab-***@etherlab.org
> *Subject:* Re: [etherlab-dev] "Master still waiting for devices!" problem.
>
>
>
> Hi Graeme,
>
> I think that 1) and 2) was done correctly in my case.
>
> For 3), I'll check dmesg.
>
> For 4), I found the thread in 2013:
> http://lists.etherlab.org/pipermail/etherlab-users/2013/002074.html
>
> But I can't get the attachment since I'm not in the etherlab-user mail
> list.
>
> Is there any other way to get the attachment?
>
> Thank you for your response.
> Best regards - Erix Chou
>
>
>
> 2017-01-19 5:27 GMT+08:00 Graeme Foot <***@touchcut.com>:
>
> Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans
> Beckhoff
> Registered office: Verl, Germany | Register court: Guetersloh HRA 7075
>
> I can think of four possible errors at the moment:
>
>
>
> 1) Your ethercat configuration file isn't matching the correct MAC address.
>
>
>
> In /etc/sysconfig/ethercat you have "MASTER0_DEVICE="ff:ff:ff:ff:ff:ff"".
> ff:ff:ff:ff:ff:ff matches the first available device, looking at devices
> in the order the drivers are loaded (in the DEVICE_MODULES key). So you
> may have sepecified a MAC address that is not matching your device
>
>
>
>
>
> 2) You are not loading your device module.
>
>
>
> In /etc/sysconfig/ethercat you have "DEVICE_MODULES=". This specifies the
> network driver modules (ethercat versions) that you want to run (space
> delimited list). You should put your module first in the list if you use a
> generic MAC address (ie: ff:ff:ff:ff:ff:ff) in the setting above.
>
>
>
> eg:
>
> DEVICE_MODULES="cpsw e1000 e1000e"
>
>
>
>
>
> 3) Your driver doesn't work.
>
>
>
> Check dmesg for any errors.
>
>
>
>
>
> 4) Your driver is not correctly integrating with the EtherCAT master.
>
>
>
> There's various functions that your driver needs to interact with the
> master. But from memory the one that tells the master that a device is
> available is:
>
> ecdev_offer();
>
>
>
>
>
> But the guts of it is that no offered net devices match the requirements
> of the MASTER0_DEVICE config setting.
>
>
>
>
>
> I wrote a patch for the CX2100 device a while ago. You could look it up
> in the forums to check how it interacts with the master (or I could send it
> if you can't find it). Look for the ecdev_... methods and the notes about
> the skb's.
>
>
>
>
>
> Regards,
>
> Graeme.
>
>
>
>
>
>
>
>
> ------------------------------
>
> *From:* etherlab-dev <etherlab-dev-***@etherlab.org> on behalf of 呚甫霖
> <***@mapacode.tw>
> *Sent:* Wednesday, 18 January 2017 9:26:42 PM
> *To:* etherlab-***@etherlab.org
> *Subject:* [etherlab-dev] "Master still waiting for devices!" problem.
>
>
>
> Hi all,
>
> First appreciate the implement of etherlabmaster.
> I'm devolping a non-native supported ethernet device to be able to work as
> a RTDM EtherCAT master.
> What the device is one part of TI AM335x SoC and is named "cpsw".
> Everything smoothly while adapting driver code, building module file, and
> installing.
> But I was stuck by a problem when I try to start EtherCAT master.
> Following is my steps and message shown by dmesg:
>
> # /etc/init.d/ethercat start
> Starting EtherCAT master 1.5.2 done
>
> [ 30.849754] EtherCAT: Requesting master 0...
> [ 30.854265] EtherCAT ERROR 0: Master still waiting for devices!
>
> More information:
>
> # /opt/etherlab/bin/ethercat master
> Master0
> Phase: Waiting for device(s)...
> Active: no
> Slaves: 0
> Ethernet devices:
> Main: a0:f6:fd:22:bd:ed (waiting...)
> Link: DOWN
> Tx frames: 0
> Tx bytes: 0
> Rx frames: 0
> Rx bytes: 0
> Tx errors: 0
> Tx frame rate [1/s]: 0 0 0
> Tx rate [KByte/s]: 0.0 0.0 0.0
> Rx frame rate [1/s]: 0 0 0
> Rx rate [KByte/s]: 0.0 0.0 0.0
> Common:
> Tx frames: 0
> Tx bytes: 0
> Rx frames: 0
> Rx bytes: 0
> Lost frames: 0
> Tx frame rate [1/s]: 0 0 0
> Tx rate [KByte/s]: 0.0 0.0 0.0
> Rx frame rate [1/s]: -509579 -509608 -335544
> Rx rate [KByte/s]: 845836.0 -469824.0 163840.0
> Loss rate [1/s]: 0 0 0
> Frame loss [%]: 0.0 0.0 0.0
> Distributed clocks:
> Reference clock: None
> Application time: 0
> 2000-01-01 00:00:00.000000000
>
>
>
> Could anyone kindly advice what is the key point to go forword form
> "waiting device"?
>
> Best regards - Erix Chou
>
>
>
>
> --
>
> 動皋科技有限公叞
>
> 台南垂安平區建平十䞃街159號䞃暓之䞀
>
> 呚甫霖 Erix Chou
>
> E-mail***@mapacode.tw
>
> TEL06-2970665
>
> Mobile0985946776
>



--
動皋科技有限公叞
台南垂安平區建平十䞃街159號䞃暓之䞀
呚甫霖 Erix Chou
E-mail***@mapacode.tw
TEL06-2970665
Mobile0985946776
Continue reading on narkive:
Loading...