Skip to content
/ linux Public

Commit af834b0

Browse files
oleremgregkh
authored andcommitted
net: usb: lan78xx: skip LTM configuration for LAN7850
commit d9cc0e4 upstream. Do not configure Latency Tolerance Messaging (LTM) on USB 2.0 hardware. The LAN7850 is a High-Speed (USB 2.0) only device and does not support SuperSpeed features like LTM. Currently, the driver unconditionally attempts to configure LTM registers during initialization. On the LAN7850, these registers do not exist, resulting in writes to invalid or undocumented memory space. This issue was identified during a port to the regmap API with strict register validation enabled. While no functional issues or crashes have been observed from these invalid writes, bypassing LTM initialization on the LAN7850 ensures the driver strictly adheres to the hardware's valid register map. Fixes: 55d7de9 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Cc: stable@vger.kernel.org Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://patch.msgid.link/20260305143429.530909-4-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2aaf0a7 commit af834b0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/usb/lan78xx.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2672,6 +2672,10 @@ static void lan78xx_init_ltm(struct lan78xx_net *dev)
26722672
u32 buf;
26732673
u32 regs[6] = { 0 };
26742674

2675+
/* LAN7850 is USB 2.0 and does not support LTM */
2676+
if (dev->chipid == ID_REV_CHIP_ID_7850_)
2677+
return;
2678+
26752679
ret = lan78xx_read_reg(dev, USB_CFG1, &buf);
26762680
if (buf & USB_CFG1_LTM_ENABLE_) {
26772681
u8 temp[2];

0 commit comments

Comments
 (0)