lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 17 Jun 2021 19:28:38 +0800
From:   Chen Jiahao <chenjiahao16@...wei.com>
To:     <davem@...emloft.net>, <kuba@...nel.org>,
        <grygorii.strashko@...com>, <jesse.brandeburg@...el.com>,
        <vigneshr@...com>, <peter.ujfalusi@...com>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:     <chenjiahao16@...wei.com>, <heying24@...wei.com>
Subject: [PATCH] net: ethernet: ti: fix netdev_queue compiling error

There is a compiling error in am65-cpsw-nuss.c while not selecting
CONFIG_BQL:

drivers/net/ethernet/ti/am65-cpsw-nuss.c: In function
‘am65_cpsw_nuss_ndo_host_tx_timeout’:
drivers/net/ethernet/ti/am65-cpsw-nuss.c:353:26: error:
‘struct netdev_queue’ has no member named ‘dql’
  353 |      dql_avail(&netif_txq->dql),
      |                          ^~

This problem is solved by adding the #ifdef CONFIG_BQL directive
where struct dql is used.

Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
Signed-off-by: Chen Jiahao <chenjiahao16@...wei.com>
---
 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index 6a67b026df0b..a0b30bb763ea 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -346,12 +346,20 @@ static void am65_cpsw_nuss_ndo_host_tx_timeout(struct net_device *ndev,
 	tx_chn = &common->tx_chns[txqueue];
 	trans_start = netif_txq->trans_start;
 
+#ifdef CONFIG_BQL
 	netdev_err(ndev, "txq:%d DRV_XOFF:%d tmo:%u dql_avail:%d free_desc:%zu\n",
 		   txqueue,
 		   netif_tx_queue_stopped(netif_txq),
 		   jiffies_to_msecs(jiffies - trans_start),
 		   dql_avail(&netif_txq->dql),
 		   k3_cppi_desc_pool_avail(tx_chn->desc_pool));
+#else
+	netdev_err(ndev, "txq:%d DRV_XOFF:%d tmo:%u free_desc:%zu\n",
+		   txqueue,
+		   netif_tx_queue_stopped(netif_txq),
+		   jiffies_to_msecs(jiffies - trans_start),
+		   k3_cppi_desc_pool_avail(tx_chn->desc_pool));
+#endif
 
 	if (netif_tx_queue_stopped(netif_txq)) {
 		/* try recover if stopped by us */
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ