From: Simon Horman <horms@kernel.org>
To: Vineeth Karumanchi <vineeth.karumanchi@amd.com>
Cc: nicolas.ferre@microchip.com, claudiu.beznea@tuxon.dev,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, git@amd.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 6/6] net: macb: Add MACB_CAPS_QBV capability flag for IEEE 802.1Qbv support
Date: Wed, 23 Jul 2025 20:05:00 +0100 [thread overview]
Message-ID: <20250723190500.GM1036606@horms.kernel.org> (raw)
In-Reply-To: <20250722154111.1871292-7-vineeth.karumanchi@amd.com>
On Tue, Jul 22, 2025 at 09:11:11PM +0530, Vineeth Karumanchi wrote:
> The "exclude_qbv" bit in designcfg_debug1 register varies between MACB/GEM
> IP revisions, making direct register probing unreliable for
> feature detection. A capability-based approach provides consistent
> QBV support identification across the IP family
>
> Platform support:
> - Enable MACB_CAPS_QBV for Xilinx Versal platform configuration
> - Foundation for QBV feature detection in TAPRIO implementation
>
> Signed-off-by: Vineeth Karumanchi <vineeth.karumanchi@amd.com>
...
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index cc33491930e3..98e56697661c 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -4601,6 +4601,10 @@ static int macb_init(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)
> + dev->hw_features |= NETIF_F_HW_TC;
> +
> dev->features = dev->hw_features;
>
> /* Check RX Flow Filters support.
> @@ -5345,7 +5349,7 @@ static const struct macb_config sama7g5_emac_config = {
> 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_QUEUE_DISABLE, MACB_CAPS_QBV,
Hi Vineeth,
TL;DR: I think you mean
MACB_CAPS_QUEUE_DISABLE | MACB_CAPS_QBV,
^^^
I assume that the intention here is to set the MACB_CAPS_QBV bit of .caps.
However, because there is a comma rather than a pipe between
it and MACB_CAPS_QUEUE_DISABLE the effect is to leave .caps as
it was before, and set .dma_burst_length to MACB_CAPS_QBV.
.dma_burst_length is then overwritten on the following line.
Flagged by W=1 builds with Clang 20.1.8 and 15.1.0.
Please build your patches with W=1 and try to avoid adding warnings
it flags.
Also, while we are here, it would be nice to fix up the line wrapping so
the adjacent code is 80 columns wide or less, as is still preferred in
Networking code.
.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,
> .dma_burst_length = 16,
> .clk_init = macb_clk_init,
> .init = init_reset_optional,
> --
> 2.34.1
>
>
next prev parent reply other threads:[~2025-07-23 19:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-22 15:41 [PATCH net-next 0/6] net: macb: Add TAPRIO traffic scheduling support Vineeth Karumanchi
2025-07-22 15:41 ` [PATCH net-next 1/6] net: macb: Define ENST hardware registers for time-aware scheduling Vineeth Karumanchi
2025-07-26 12:23 ` claudiu beznea (tuxon)
2025-07-22 15:41 ` [PATCH net-next 2/6] net: macb: Integrate ENST timing parameters and hardware unit conversion Vineeth Karumanchi
2025-07-26 12:24 ` claudiu beznea (tuxon)
2025-07-22 15:41 ` [PATCH net-next 3/6] net: macb: Add IEEE 802.1Qbv TAPRIO REPLACE command offload support Vineeth Karumanchi
2025-07-23 10:02 ` kernel test robot
2025-07-26 12:25 ` claudiu beznea (tuxon)
2025-07-26 15:32 ` Andrew Lunn
2025-07-29 8:59 ` Karumanchi, Vineeth
2025-07-31 9:07 ` Claudiu Beznea
2025-07-22 15:41 ` [PATCH net-next 4/6] net: macb: Implement TAPRIO DESTROY command offload for gate cleanup Vineeth Karumanchi
2025-07-26 12:26 ` claudiu beznea (tuxon)
2025-07-22 15:41 ` [PATCH net-next 5/6] net: macb: Implement TAPRIO TC offload command interface Vineeth Karumanchi
2025-07-26 12:29 ` claudiu beznea (tuxon)
2025-07-29 9:38 ` Karumanchi, Vineeth
2025-07-31 9:07 ` Claudiu Beznea
2025-07-28 16:31 ` kernel test robot
2025-07-22 15:41 ` [PATCH net-next 6/6] net: macb: Add MACB_CAPS_QBV capability flag for IEEE 802.1Qbv support Vineeth Karumanchi
2025-07-23 19:05 ` Simon Horman [this message]
2025-07-29 9:42 ` Karumanchi, Vineeth
2025-07-24 0:46 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250723190500.GM1036606@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=claudiu.beznea@tuxon.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=git@amd.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=pabeni@redhat.com \
--cc=vineeth.karumanchi@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).