mirror of
https://github.com/ipxe/ipxe
synced 2025-12-30 22:08:48 +03:00
[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>
This commit is contained in:
@@ -49,6 +49,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
#define AXGE_MSR_RFC 0x0010 /**< RX flow control enable */
|
||||
#define AXGE_MSR_TFC 0x0020 /**< TX flow control enable */
|
||||
#define AXGE_MSR_RE 0x0100 /**< Receive enable */
|
||||
#define AXGE_MSR_PS 0x0200 /**< 100Mbps port speed */
|
||||
|
||||
/** Ethernet PHY Power and Reset Control Register */
|
||||
#define AXGE_EPPRCR 0x26
|
||||
@@ -144,6 +145,8 @@ struct axge_device {
|
||||
struct net_device *netdev;
|
||||
/** USB network device */
|
||||
struct usbnet_device usbnet;
|
||||
/** Link state has changed */
|
||||
int check_link;
|
||||
};
|
||||
|
||||
/** Interrupt maximum fill level
|
||||
|
||||
Reference in New Issue
Block a user