netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: ti: am65-cpsw-qos: fix non-bql configs
@ 2024-02-28 14:03 Arnd Bergmann
  2024-02-28 14:44 ` Dave Taht
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Arnd Bergmann @ 2024-02-28 14:03 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Breno Leitao
  Cc: Arnd Bergmann, Roger Quadros, Siddharth Vadapalli,
	Grygorii Strashko, Dan Carpenter, netdev, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

It is now possible to disable BQL, but that causes cpsw to break:

drivers/net/ethernet/ti/am65-cpsw-nuss.c:297:28: error: no member named 'dql' in 'struct netdev_queue'
  297 |                    dql_avail(&netif_txq->dql),

Add an #ifdef check for CONFIG_BQL around this usage.

Fixes: ea7f3cfaa588 ("net: bql: allow the config to be disabled")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index 9d2f4ac783e4..3a3ec9959ee2 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -294,7 +294,11 @@ static void am65_cpsw_nuss_ndo_host_tx_timeout(struct net_device *ndev,
 		   txqueue,
 		   netif_tx_queue_stopped(netif_txq),
 		   jiffies_to_msecs(jiffies - trans_start),
+#ifdef CONFIG_BQL
 		   dql_avail(&netif_txq->dql),
+#else
+		   0,
+#endif
 		   k3_cppi_desc_pool_avail(tx_chn->desc_pool));
 
 	if (netif_tx_queue_stopped(netif_txq)) {
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-28 15:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-28 14:03 [PATCH] net: ethernet: ti: am65-cpsw-qos: fix non-bql configs Arnd Bergmann
2024-02-28 14:44 ` Dave Taht
2024-02-28 14:54   ` Arnd Bergmann
2024-02-28 14:56 ` Breno Leitao
2024-02-28 15:25 ` Jakub Kicinski

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).