Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp454207pxj; Thu, 17 Jun 2021 06:37:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRaEffHNablIrQT54zQhFq2cj7YWsb7OBa9/nHbIolPgA7H+05osG6ndc/hiMN4jfu6tP0 X-Received: by 2002:aa7:db95:: with SMTP id u21mr6518688edt.152.1623937020188; Thu, 17 Jun 2021 06:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623937020; cv=none; d=google.com; s=arc-20160816; b=w8QNB3GOb0tx6+7zvRvNCBJjHR40xMyw1HBYBK89OW8ksjvlfkYsZO515tKPdKAyYn U0VFcgMJMOy3rk+LF3uGtNjImfMU/6EgeZdihXEz0vANATJ6jipIRlDP078xECIeuYhf kKOleOQ9XdWngfa3JyqkNdqLul58qUWAqUi2s3ViyvYiyV4sClwxKTbg+4Zvkz8d61/R 5yUXaZ/Ap775Hhie6jJ7q9Kb1utieexVExMegbgBa8nNV7R45xSAjRiEPqXGIguPPEg7 VzS5WhsSHLmTpSsk9KThZ5Zu2uzmI5IJ9KNQEYpNvjtEzCk3RsfsDqoz5X3TS2M61hI2 DUBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=e07+3KeQUg0V04VMFOV2sVgKceIfsXkZkafsRePGjOQ=; b=zrJmRuA+h3GlTykv8OsP0PnXAYt6opKIiMnR6X16JtbRaw35+juiAEGgaRnz1k47SO nTma+6bsc71BRwUv8RgmBv/gND4fTthVdTlMyrwwehhFO033aZzmuoc0Ytn0T1wYiVoz YpTh4Li400xJC+rgCSPm1zXcHD73Jxc5776q4tqzAzUIflQESWz1Z9m7CxkaO5aildtt yh298K/IkzAR9nVRuk9E+vTiFEzI3qKnlD2pzi7tqg+ehV8hFFGe/zNz/g1+yHIOUgei FWxKrBPmVWUfH35Zicl1C1eugsj+DCiYljaDDNuf01Z88A41fYlQfz3gZTK7meaknVzu Y+XA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b13si5829101ede.243.2021.06.17.06.36.37; Thu, 17 Jun 2021 06:37:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232307AbhFQL34 (ORCPT + 99 others); Thu, 17 Jun 2021 07:29:56 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:5025 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229783AbhFQL34 (ORCPT ); Thu, 17 Jun 2021 07:29:56 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4G5KR80jC9zXgnq; Thu, 17 Jun 2021 19:22:44 +0800 (CST) Received: from dggpemm500016.china.huawei.com (7.185.36.25) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 17 Jun 2021 19:27:46 +0800 Received: from huawei.com (10.67.174.205) by dggpemm500016.china.huawei.com (7.185.36.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 17 Jun 2021 19:27:46 +0800 From: Chen Jiahao To: , , , , , , , CC: , Subject: [PATCH] net: ethernet: ti: fix netdev_queue compiling error Date: Thu, 17 Jun 2021 19:28:38 +0800 Message-ID: <20210617112838.143314-1-chenjiahao16@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.174.205] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500016.china.huawei.com (7.185.36.25) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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