Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#10794 closed defect (fixed)

[PATHCH] correct problem with rtl8366 introduced in r29676 onwards

Reported by: Chris Martin <chris@…> Owned by: juhosg
Priority: response-needed Milestone: Barrier Breaker 14.07
Component: base system Version: Trunk
Keywords: Cc:


I have found that on Dlink DIR-825 that the rtl8366 driver doesn't work due to the change made in r29676

The firmware compiles from trunk OK, but the rtl8366 driver doesn't function. As a result there is no activity on the switch ports.

I have tested this extensively and found that if I comment out the change introduced in r29676 that firmware again functions correctly.

I do not understand why this is the cause of the problem, but it defiantly corrects the problem.

I have been compiling on Ubuntu 11.04 x64
Target: AR71xx
Subtarget: Generic
Profile: Dlink DIR-825

Index: target/linux/generic/files/drivers/net/phy/rtl8366_smi.c
--- target/linux/generic/files/drivers/net/phy/rtl8366_smi.c	(revision 29758)
+++ target/linux/generic/files/drivers/net/phy/rtl8366_smi.c	(working copy)
@@ -143,7 +143,7 @@
 		if (++retry_cnt > RTL8366_SMI_ACK_RETRY_COUNT) {
-			dev_err(smi->parent, "ACK timeout\n");
+		//	dev_err(smi->parent, "ACK timeout\n");
 			return -ETIMEDOUT;
 	} while (1);

Attachments (1)

rtl8366.patch (502 bytes) - added by Chris Martin <chris@…> 6 years ago.
Patch to reveres issue with r29676

Download all attachments as: .zip

Change History (12)

Changed 6 years ago by Chris Martin <chris@…>

Patch to reveres issue with r29676

comment:1 Changed 6 years ago by jow

  • Owner changed from developers to juhosg
  • Status changed from new to assigned

comment:2 Changed 6 years ago by camden.lindsay+openwrt@…

/ticket/10793.html is also same issue.

comment:3 Changed 6 years ago by jow

  • Priority changed from normal to response-needed

Please define "don't function".

Your patch merely comments out a printk(), the ACK timeout still occurs, you just hid the error message.

comment:4 Changed 6 years ago by h_surjuse@…

Patch worked.. Just compiled new firmware using patch and now switch worked with 100MB network devices.

The issue i saw was my computer/external network drive/VOIP phone with 100MB network didn't worked. Only 1000MB card worked with both DHCP and static IP.

comment:5 Changed 6 years ago by camden.lindsay+openwrt@…


This may just supposed to be a printk() call, but it does somehow bugger the switch driver. I have just verified.

in 10793 i recorded and posted a video showing a tftp flash and the switch not working.

I manually commented out only the line as noted in the diff above and compiled the software, and now the exact same scenario allows traffic.

Something odd is going on here, but i'm not sure how to troubleshoot further. I would be happy to patch or enable more debug output somehow and recompile/test if i have guidance.

comment:6 Changed 6 years ago by Alfred Ganz <alfred-ganz+openwrt@…>

Since my wzr-hp-g300nh works with the prebuilt (bleeding edge, r29763), and with the
RTL8366RB, and with an occasional timeout message:

[ 0.820000] Realtek RTL8366RB ethernet switc
[ 0.830000] rtl8366rb rtl8366rb: using GPIO
[ 0.830000] rtl8366rb rtl8366rb: RTL5937 ver
[ 0.840000] rtl8366rb rtl8366rb: ACK timeout
[ 0.890000] rtl8366rb: probed
[ 0.900000] eth0: Atheros AG71xx at 0xb90000
[ 1.200000] eth0: using fixed link parameter

I should probably report that in my case the interface got configured as this:

[ 13.000000] eth0: link up (1000Mbps/Full duplex)

This sure smells awfully much like a timing problem.

comment:7 Changed 6 years ago by camden.lindsay+openwrt@…

To report, the one i have that is not working is the rtl8366s:

[    0.820000] Realtek RTL8366S ethernet switch driver version 0.2.2
[    0.830000] rtl8366s rtl8366s: using GPIO pins 19 (SDA) and 20 (SCK)
[    0.830000] rtl8366s rtl8366s: RTL8366 ver. 1 chip found
[    0.840000] rtl8366s rtl8366s: ACK timeout
[    0.880000] rtl8366s: probed
[    0.890000] eth0: Atheros AG71xx at 0xb9000000, irq 4
[    1.190000] eth1: Atheros AG71xx at 0xba000000, irq 5

it also shows...

[    3.260000] eth0: link up (1000Mbps/Full duplex)

(then later goes into promiscuous mode)

comment:8 Changed 6 years ago by juhosg

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in r29844.

comment:9 Changed 6 years ago by Alfred Ganz <alfred-ganz+openwrt@…>

juhosg, thanks for tracking this one down. I also had a couple of hangs as everybody else
reported, but they went away on hard reboot and I ignored them as operator error, so it
looks like I was just lucky most of the time!

comment:10 Changed 6 years ago by camden.lindsay+openwrt@…

juhosg -- works perfectly! Thank you!

Any details on how you found this problem and chose to resolve it would be interesting to see, if you have time.


comment:11 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.