We have a product running Linux 4.9 and using the DP83867ERGZ as its Gigabit PHY. We have no problems with the PHY operation if a CAT5 cable is used with all pairs connected.
The problem that we have is if we connect the DP83867ERGZ to another Gigabit device, but use a cable with faulty wires in the C or D channel, we still get the link reported as UP with a 1000 Mbit speed. According to the Linux interface stats the interface is up and happily transmitting packets, but zero packets are received. Packets are not received at the other end, of course, due to the faulty C or D channel.
Our expectation was that the link would have adjusted automatically down to 100 Mbit, as that will operate correctly with just the A+B channels working.
The datasheet (SNLS504D) suggest that the devices supports "Speed Optimisation" which should adjust the link speed, but this only happens after a _failed_ auto-negotiation. In our scenario, the auto-negotiation always succeeds, even with both C and D channels faulty. Hence, the Speed Optimisation doesn't appear to start.
We have adjusted the Linux PHY driver to dump the registers and enable speed optimisation during startup as below, but we still get the problem with the PHY negotiating a 1G link and reporting success:
[ 5.900050] TI DP83867 87e005003880:536912433 reg dump
[ 5.905210] 0x00: 0x1140
[ 5.907933] 0x01: 0x7949
[ 5.910650] 0x02: 0x2000
[ 5.913370] 0x03: 0xa231
[ 5.916091] 0x04: 0x01e1
[ 5.918807] 0x05: 0x0000
[ 5.921528] 0x06: 0x0064
[ 5.924248] 0x07: 0x2001
[ 5.926964] 0x08: 0x0000
[ 5.929684] 0x09: 0x0300
[ 5.932404] 0x0a: 0x0000
[ 5.935121] 0x0b: 0x0000
[ 5.937841] 0x0c: 0x0000
[ 5.940561] 0x0d: 0x401f
[ 5.943277] 0x0e: 0x0077
[ 5.945998] 0x0f: 0x3000
[ 5.948718] 0x10: 0xd048
[ 5.951435] 0x11: 0x0002
[ 5.954155] 0x12: 0x0000
[ 5.956875] 0x13: 0x0000
[ 5.959592] 0x14: 0x29c7
[ 5.962312] 0x15: 0x0000
[ 5.965032] 0x16: 0x0000
[ 5.967754] 0x17: 0x0040
[ 5.970470] 0x18: 0xff5b
[ 5.973190] 0x19: 0x4444
[ 5.975911] 0x1a: 0x0002
[ 5.978627] 0x1b: 0x0000
[ 5.981347] 0x1c: 0x0000
[ 5.984068] 0x1d: 0x0000
[ 5.986784] 0x1e: 0x0002
[ 5.989504] 0x1f: 0x0000
[ 5.992204] Enabling DP83867 speed optimisation enhancement
[ 5.997810] 0x14: 0x2bc7
We have looked through the datasheet but can't see any flags or settings that we have missed that would resolve this issue.
What is the correct way to detect this fault condition and obtain a 100M link?
Thanks!