mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
net: macb: add no LSO capability (MACB_CAPS_NO_LSO)
LSO is runtime-detected using the PBUF_LSO field inside register DCFG6. Allow disabling that feature if it is broken by using bp->caps coming from match data. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> Link: https://patch.msgid.link/20251023-macb-eyeq5-v3-3-af509422c204@bootlin.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
ae7a9585ea
commit
7a3d209145
|
|
@ -778,6 +778,7 @@
|
|||
#define MACB_CAPS_DMA_64B BIT(21)
|
||||
#define MACB_CAPS_DMA_PTP BIT(22)
|
||||
#define MACB_CAPS_RSC BIT(23)
|
||||
#define MACB_CAPS_NO_LSO BIT(24)
|
||||
|
||||
/* LSO settings */
|
||||
#define MACB_LSO_UFO_ENABLE 0x01
|
||||
|
|
|
|||
|
|
@ -4564,8 +4564,11 @@ static int macb_init(struct platform_device *pdev)
|
|||
/* Set features */
|
||||
dev->hw_features = NETIF_F_SG;
|
||||
|
||||
/* Check LSO capability */
|
||||
if (GEM_BFEXT(PBUF_LSO, gem_readl(bp, DCFG6)))
|
||||
/* Check LSO capability; runtime detection can be overridden by a cap
|
||||
* flag if the hardware is known to be buggy
|
||||
*/
|
||||
if (!(bp->caps & MACB_CAPS_NO_LSO) &&
|
||||
GEM_BFEXT(PBUF_LSO, gem_readl(bp, DCFG6)))
|
||||
dev->hw_features |= MACB_NETIF_LSO;
|
||||
|
||||
/* Checksum offload is only available on gem with packet buffer */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user