]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: usb: lan78xx: Extract flow control configuration to helper
authorOleksij Rempel <o.rempel@pengutronix.de>
Mon, 5 May 2025 08:43:41 +0000 (10:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 May 2025 11:57:06 +0000 (12:57 +0100)
commitef6a29e86785fe56e4af814509617183d7d8779c
tree23d01c52b39bf7ba9b67e9f72240222bc736833e
parentd746e0740b2805abbd7b56f1dd34a6b9a0f5728f
net: usb: lan78xx: Extract flow control configuration to helper

Move flow control register configuration from
lan78xx_update_flowcontrol() into a new helper function
lan78xx_configure_flowcontrol(). This separates hardware-specific
programming from policy logic and simplifies the upcoming phylink
integration.

The values used in this initial version of
lan78xx_configure_flowcontrol() are taken over as-is from the original
implementation to avoid functional changes. While they may not be
optimal for all USB and link speed combinations, they are known to work
reliably. Optimization of pause time and thresholds based on runtime
conditions can be done in a separate follow-up patch.

The forward declaration of lan78xx_configure_flowcontrol() will also be
removed later during the phylink conversion.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/lan78xx.c