-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Pi 4 Ethernet Network fails to connect to some 100Mb Switches #3122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Does the workaround described in this issue help ? #3108 (comment) |
I presume you are referring to the workaround with genet.force_reneg=y ??? NO. It has no effect. The autonegotiation seems to quickly fail. it does not appear to be a "sometimes" thing. I can help with hardware debugging, (have tools, but need guidance on what to look for.) Could not find much on the web since "ethernet" is a very common term. |
Have you updated to the latest |
That workaround currently requires you update the firmware & kernel using |
After rpi-update, same... no effect, no connection. now running kernel 4.19.64 #1250 |
And what does |
OK, so here's what happens. If I pull the cord on Case 1 after a while and plug into the GS108, like 3 minutes it ends up looking like case 2, except that the time is much larger... like 250 seconds. |
Thanks - that helps. This is clearly a different problem to that reported in #3108, although they may be related. The |
Yes. Is the phy programmable? Normally connection is pretty automatic
with no SW involved. I couldn't find any usable data sheets... sigh...
…On Thu, Aug 8, 2019, 04:00 Phil Elwell ***@***.***> wrote:
Thanks - that helps. This is clearly a different problem to that reported
in #3108 <#3108>, although
they may be related. The Forcing renegotiation message is displayed when
the renegotiation occurs, which is at the point where the link comes up for
the first time (although "up" may not be fully working). In the case of the
Realtek switch it sounds like the connection never gets that far.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3122?email_source=notifications&email_token=ABGXBQ545GWVFMIX6DN244TQDP4FLA5CNFSM4IJCCAN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD33IE7Q#issuecomment-519471742>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABGXBQY4AI7HE7O43TQD7OTQDP4FLANCNFSM4IJCCANQ>
.
|
The PHY is programmable. Watching the lights on the switch, there is a link very soon after power is applied, then when the kernel starts to boot the link gets reset (not as the result of my workaround) and auto-negotiation starts again. I'm wondering if preventing this reset would change the behaviour. |
Investigating the resets to prevent a re-negotiation led to an alternative workaround - skipping a reset step in the driver. See #3108 for more details. |
The latest rpi-update firmware includes the new workaround. |
upgrading to 4.19.65 has no effect for me. The issue still remains. It appears that the problem is with the setup of the chip itself. As I mentioned before, I don't get a link ever unless I force the phy to 100Mb. I suspect that the timing of auto negotiation is off, and that is what is causing these problems. Unfortunately the Pi foundation picked another NDA required chip to use as a phy, so I can't debug it myself... Perhaps a call to Broadcom is in order? |
@noafterglow Is this issue still present on the very latest Raspbian/firmware? |
I will check it out and let you know.
…On Fri, Dec 20, 2019, 07:15 James Hughes ***@***.***> wrote:
@noafterglow <https://github.com/noafterglow> Is this issue still present
on the very latest Raspbian/firmware?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3122?email_source=notifications&email_token=ABGXBQ4TXKA6G56DMCMZ3ZDQZTOSFA5CNFSM4IJCCAN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHNF5SA#issuecomment-567959240>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGXBQ7P3PQ6GIGCVA4KO33QZTOSFANCNFSM4IJCCANQ>
.
|
Sorry for the delay guys. I can confirm the problem still exists. I updated to the latest kernel 5.4.51 #1325 and it still behaves as before. No ethernet connectivity without forcing with mii-tool -F 100baseTx-FD eth0 In addition, I can now confirm that Realtek RTL8367-CG chipsets also fail to connect. I'm waiting for more info on this issue from our CM in china. Happy to provide hardware for the debugging effort, or to run whatever you like on the boards. |
James,
Sorry for the delay. I updated the github case. Sadly, the problem still
exists, and we have now found another chipset (this time 1Gb, rather than
100Mb) which also experiences the same issue.
Ihor Lys
617-470-2740
…On Fri, Dec 20, 2019 at 7:50 AM ihor lys ***@***.***> wrote:
I will check it out and let you know.
On Fri, Dec 20, 2019, 07:15 James Hughes ***@***.***> wrote:
> @noafterglow <https://github.com/noafterglow> Is this issue still
> present on the very latest Raspbian/firmware?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#3122?email_source=notifications&email_token=ABGXBQ4TXKA6G56DMCMZ3ZDQZTOSFA5CNFSM4IJCCAN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHNF5SA#issuecomment-567959240>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABGXBQ7P3PQ6GIGCVA4KO33QZTOSFANCNFSM4IJCCANQ>
> .
>
|
Found an interesting effect. when running mii-tool multiple times it occasionally reports the advertised capabilities of the remote peer, and correctly apparently. no link is established, but the PHY apparently does properly discover the remote peer, and apparently is able to report it to the MAC. Thus this may not be Phy timing issue, but rather some timing issue between the PHY and MAC. here is the dump of 4 consecutive executions:
|
Any updates? |
I think I'm hit by exactly this issue. I build up a device with an internal 5-Port switch. I think it is similar to the hat you're talking about. On one side there are 4 ethernet sockets. To one of them I connected an arduino with an ethernet shield. This one does work fine. The other 3 sockets are connected to 3 Raspbery Pi 4b. None of them gets a link. Only the LEDs of the ethernet sockets on the PIs are flashing from time to time. |
While I have not confirmed this beyond a single unit, of a 1GB switch chip, it may be that the RPi's ethernet chip is either extremely sensitive to the switch's crystal frequency, or is itself calibrated very poorly. It would be nice if you could mess around with your XTAL loading capacitors and report back if you are able to get it working, and if so, what freq range actually works for you. |
Root cause appears to be negotiation timing. I have now tested this on 2 peers with out of spec timing. This is apparently fairly common. Pi4 is apparently extremely sensitive to the timing during negotiation, so much so that it will fail to establish a link if the peer's crystal is out of spec. While I don't have a full analysis of how all of that happens, I can now report that you must have the peer's crystal in spec for the Pi4 to negotiate a connection. Also note that the crystal can be wildly out of spec, and the PI4 will happily communicate at either 100Mb or 1Gb speeds once told to do so with a manual connection setup. This suggests that timing will be an issue going forward on some PI4''s as crystals invariably age and drift. |
I ran into the same issue after updating from pi3 to pi4. Nothing changed here but the pi, and like you, no lan network. No light on on the port. The same pi4 works fine on all my other switches. |
ADDITIONAL INFO: It seems that Energy Efficient Ethernet can cause problems with SOME Pi variants. We ran into this on the RTL8367N, which has this as a pin strapping option or an option which can be read in from EEPROM. It is possible that SOME switches using this chip will have EEE enabled. The symptoms on a Pi 4 Model B rev 1.2 were: Connection auto negotiates, then drops several times at 1Gb, then connection gets established at 100Mb, BUT under load it drops again over and over. There are several episodes of carrier lost in the log files. |
I used an SD Card in an Pi Zero (bought in 2018). The System was a little old. Now I transfered the SD Card to an PI4 (the Keyboard Model, bought in 2023). The wifi and ETH0 was missing on the keyboard pi model:
|
I have what seems to be the same issue with an Edimax ES5500M switch. Older Raspberry Pis and other systems work fine with the switch but two RPi4 show the same behavior with no connectivity and no link lights. If I connect them to a UniFi switch, they work fine. I did run rpi-update and added genet.force_reneg=y to cmdline.txt but that did not help. |
We make a 100Mb switch which we used with Pi 2's and Pi3's... Its a "Hat", based on Realtek RTL8306MB. We have shipped thousands of them with Pi3's. They are bulletproof.
Pi4 will not connect to any port on this switch. The physical link will not establish. We can faintly see a little blink from the lower left LED on the socket, but no connectivity and no link lights.
I suspect this is an autonegotiation problem. It may be related to #3108 and #3121
Any other combination of switches aand Pi versions, including some other 100Mb switches not based on the RTL8306MB seem to work ok, but we have not stress tested the connection. Obviously we would like to not redesign the hat for our application, so this is an issue for us. I suspect it will also crop up a lot of other places.
kernel is 4.19.57.
If there are other registers we can dump to be helpful, I can do that.....
I can change the advertisement with no effect, but if I force it the connection is immediately up.
The text was updated successfully, but these errors were encountered: