]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[axge] Handle non-gigabit link speeds
authorMichael Brown <mcb30@ipxe.org>
Wed, 1 Jul 2020 19:40:09 +0000 (20:40 +0100)
committerMichael Brown <mcb30@ipxe.org>
Wed, 1 Jul 2020 19:51:32 +0000 (20:51 +0100)
commitd5874c9f2b9c62b2d87b6c1cfafd61ef3d8cc67a
tree240affe82c459e290eade6ad39f336d3dba84470
parent2ae5d4338661b65c63eb5cb1a96e5b803fe7d620
[axge] Handle non-gigabit link speeds

The ASIX USB NICs are capable of autodetecting the Ethernet link speed
and reporting it via PLSR but will not automatically update the
relevant GM and PS bits in MSR.  The result is that a non-gigabit link
will fail to send or receive any packets.

The interrupt endpoint used to report link state includes the values
of the PHY BMSR and LPA registers.  These are not sufficient to
differentiate between 100Mbps and 1000Mbps, since the LPA_NPAGE bit
does not necessarily indicate that the link partner is advertising
1000Mbps.

Extend axge_check_link() to write the MSR value based on the link
speed read from PLSR, and simplify the interrupt endpoint handler to
merely trigger a call to axge_check_link().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/axge.c
src/drivers/net/axge.h