Re: [PATCH 0/3] net: microchip_t1s: additional phy support and collision detect handling
From: Ramón Nordin Rodriguez <hidden>
Date: 2023-11-27 15:31:30
Also in:
lkml
On Mon, Nov 27, 2023 at 02:58:32PM +0100, Andrew Lunn wrote:
quoted
Collision detection This has been tested on a setup where one ARM system with a LAN8650 mac-phy is daisy-chained to 8 mcus using lan8670 phys. Without the patch we were limited to really short cables, about 1m per node, but we were still getting a lot of connection drops. With the patch we could increase the total cable length to at least 40M.Did you do any testing of collision detection enabled, PLCA disabled?
In our dev system we've only tested with PLCA enabled, bit too tricky changing internals on the microcontrollers. But I have a lot of usb eval dongles that I can test with.
You say you think this is noise related. But the noise should be the same with or without PLCA. I'm just thinking maybe collision detection is just plain broken and should always be disabled?
I don't have access to the equipment to measure noise or reflections, I've looked at the link with an oscilloscope and it looked fine to me. The reason I'm mentioning noise is just me parroting the datasheet, for context I'll quote the footnote here "No physical collisions will occur when all nodes in a mixing segment are properly configured for PLCA operation. As a result, for improved performance in high noise environments where false collisions may be detected leading to dropped packets, it is recommended that the user write this bit to a ‘0’ to disable collision detection when PLCA is enabled. When collision detection is disabled, the PLCA reconciliation sublayer will still assert logical collisions to the MAC as part of normal operation." LAN8650 datasheet 11.5.51
I've not read much about T1S, but if we assume it is doing good old fashioned CSMA/CD, with short cables the CS bit works well and the CD is less important. CD was needed when you have 1000m cable, and you can fit 64 bytes on the 1000m cable. So always turning of CD might be appropriate. Andrew
As you assume when PLCA is disabled the phy runs in CSMA/CD mode. I'll do some tests with both PLCA and CD off/disabled. My thinking is that a adequate test bench would look like * 3-4 nodes (depending on how many usb ports and dongles I have) * run iperf with long cables and CSMA/CD * run iperf with long cables and CMSA/No CD I'll report back the results. Anything you'd like to add/focus on with evaluation? Ramón