Re: [PATCH net-next 1/4] net: macb: Rename MACB_CAPS_QBV to MACB_CAPS_TC

Conor Dooley <[email protected]>
Newsgroups gmane.linux.network,gmane.linux.kernel
Message-ID <20260807-juggle-porcupine-71281d2d9041@spud>
On Fri, Aug 07, 2026 at 03:20:09PM +0530, Vineeth Karumanchi wrote:
> The MACB_CAPS_QBV capability flag was originally introduced to
> gate TAPRIO/QBV support. However, GEM IP versions that support
> QBV also implement multiple TSN clauses.
> 
> Replace this with a generic capability flag that can be reused
> by other TSN features. Rename MACB_CAPS_QBV to MACB_CAPS_TC to
> better reflect its role as a general traffic-class offload capability.

I'm not convinced that this is broadly correct, whether or not there's
Qav support (which is what you're using the newly renamed flag for)
depends on an IP configuration time define that I think is independent
of whether or not there's Qbv support (gem_exclude_cbs).

That said, the only platform that supports Qbv that I have the exact
documentation for does not disable the CBS bits.

Cheers,
Conor.

> 
> The supported TSN clauses are handled through macb_setup_tc().
> 
> Signed-off-by: Vineeth Karumanchi <[email protected]>
> ---
>  drivers/net/ethernet/cadence/macb.h      | 2 +-
>  drivers/net/ethernet/cadence/macb_main.c | 6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h
> index a11052565436..f24df25923d7 100644
> --- a/drivers/net/ethernet/cadence/macb.h
> +++ b/drivers/net/ethernet/cadence/macb.h
> @@ -768,7 +768,7 @@
>  #define MACB_CAPS_MIIONRGMII			BIT(9)
>  #define MACB_CAPS_NEED_TSUCLK			BIT(10)
>  #define MACB_CAPS_QUEUE_DISABLE			BIT(11)
> -#define MACB_CAPS_QBV				BIT(12)
> +#define MACB_CAPS_TC				BIT(12)
>  #define MACB_CAPS_PCS				BIT(13)
>  #define MACB_CAPS_HIGH_SPEED			BIT(14)
>  #define MACB_CAPS_CLK_HW_CHG			BIT(15)
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index d394f1f43b68..29c93df1444c 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -4846,8 +4846,8 @@ static int macb_init_dflt(struct platform_device *pdev)
>  		dev->hw_features |= NETIF_F_HW_CSUM | NETIF_F_RXCSUM;
>  	if (bp->caps & MACB_CAPS_SG_DISABLED)
>  		dev->hw_features &= ~NETIF_F_SG;
> -	/* Enable HW_TC if hardware supports QBV */
> -	if (bp->caps & MACB_CAPS_QBV)
> +	/* Enable TC offload for TSN-capable hardware */
> +	if (bp->caps & MACB_CAPS_TC)
>  		dev->hw_features |= NETIF_F_HW_TC;
>  
>  	dev->features = dev->hw_features;
> @@ -5678,7 +5678,7 @@ static const struct macb_config versal_config = {
>  	.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_JUMBO |
>  		MACB_CAPS_GEM_HAS_PTP | MACB_CAPS_BD_RD_PREFETCH |
>  		MACB_CAPS_NEED_TSUCLK | MACB_CAPS_QUEUE_DISABLE |
> -		MACB_CAPS_QBV |
> +		MACB_CAPS_TC |
>  		MACB_CAPS_USRIO_HAS_MII,
>  	.dma_burst_length = 16,
>  	.init = init_reset_optional,
> -- 
> 2.44.4
>
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCanYRWQAKCRB4tDGHoIJi
0lepAQCL8DJHbLzfc/ciV6fdlv2aZwWZf7Qc5VROrZakl7wTrAEA9PoiQ0av6S6Z
dv6HdKeMfehglF89aDyPFj2QrXbfAA4=
=sVqu
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.