This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux - Ethernet link up event comes after udhcpc discovery...

Other Parts Discussed in Thread: AM3352

Hi,

We are developing a healthcare product with SDK8, AM3352 processor with SMSC ethernet PHY. There is no PHY interrupt mechanism (only polling method). Most of the time, device is able to assign an IP address over DHCP successfully.

But we are seeing "No lease, failing" error once in a while. 

We observe that Ethernet link up event is coming late during failure condition. Please see the logs below

========

Configuring network interfaces... [    7.940364] net eth0: initializing cpsw version 1.12 (0)

[    8.024332] net eth0: phy found : id is : 0x7c0f1

[    8.029315] libphy: PHY 4a101000.mdio:01 not found

[    8.034328] net eth0: phy 4a101000.mdio:01 not found on slave 1

udhcpc (v1.21.1) started

Sending discover...

Sending discover...

Sending discover...

[   14.344583] libphy: 4a101000.mdio:00 - Link is Up - 100/Full

No lease, failing

done.

========

We see that "Link is up" event comes after 6 secs in this case. In success case, event comes in 3 sec. Please see below.

========

Configuring network interfaces... [    7.703213] net eth0: initializing cpsw version 1.12 (0)

[    7.784142] net eth0: phy found : id is : 0x7c0f1

[    7.789138] libphy: PHY 4a101000.mdio:01 not found

[    7.794156] net eth0: phy 4a101000.mdio:01 not found on slave 1

udhcpc (v1.21.1) started

Sending discover...

[   10.863998] libphy: 4a101000.mdio:00 - Link is Up - 100/Full

Sending discover...

Sending select for 192.168.82.99...

Lease of 192.168.82.99 obtained, lease time 86400

======

After failure to assign an IP address during booting, if i run the udhcpc command on shell prompt, we get the IP address properly.

Questions:

1. Increasing the lease time (more retries) is the only option to resolve the issue?

2. What could be the reason for this delayed "link is up" event?

3. We have also observed that device (BeagleBone Black or Custom board) takes more than 3 sec to detect the "Ethernet Link is up" event after plugging in the ethernet cable. Does it really need this time or what could be the reason for this?

Regards,

Kamal