From patchwork Fri Jun 23 10:08:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13290288 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E12CAC001B0 for ; Fri, 23 Jun 2023 10:09:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MPjBXH40SsWBpOllu9mpsAqV6POZ/j3eolTKZBZ3we4=; b=3LWszviKUTV/m4 bMMrbwQJlAYTaQOVyxaPFvFdWI3QFje4wxSULM0mUw5B521FAKaFhxwPVxDU/poUKuf/oLnsbTQ/q OrHlde7xPyPHwEimsSWlpwsNAOL3J9mDoIjWDy8b/wu9Egw5QfnmsN93Ff7dvUngsX2nJiFzw+2JO 8T1f2+b06kgKongZC2wxC2HwFP0JLP70xqbwXq01KHMb8y/0XJqpVJTBvZKS+Q1d5Mfma02JTysa3 D9B3RMTvdT5hxDgOyZ/Yi81KuBEy+w7sCTRJ3V+JQ9mG3b+5w8HdVfN4/Wzx/U2Kk/dd79jTPclV5 +F7DgZMf4OdJJLLW/mkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qCdj6-0037UY-1B; Fri, 23 Jun 2023 10:09:12 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qCdit-0037NC-2h for linux-arm-kernel@lists.infradead.org; Fri, 23 Jun 2023 10:09:01 +0000 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3113dabc549so691504f8f.1 for ; Fri, 23 Jun 2023 03:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1687514938; x=1690106938; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zYsPM0znkqN61dd+ZblYn0iKga8HXqcuyw6SkrjlQfc=; b=t7DoDBXh+qjcmsLYlF54Co4CxG2yA9retQMT5sBA82x+exLmrhSN5Npx0GPVjj3Gyi AgRR3V6GX4ilj/GxSz4DXW3/de0jb5HNsuxVHA2ROFIU6lBftCaGkWsgqwAMcIwr792b s2Yr9Zkz2B+Z5es4KxhF98suZ5PY0Sp04tAjXyIFCRcU9rqW+WzdW+IfblqIIszCVmxm YjDzR7cBCQe9UuqmNfGrK0w12bfwtpDntT0G9T2bTDqAHnBm9zHGrbRapnZnC5zWIC3z jXhOR6xzOkPxjw5xtRdP1AMWXcCJ2kP7JBc6Nn6GxBJV7Dem9yCFYqW1zjg3q8/F13al mFrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687514938; x=1690106938; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zYsPM0znkqN61dd+ZblYn0iKga8HXqcuyw6SkrjlQfc=; b=WholfMNlpiJjoSJLxQ60TPvgwhV830kGeSWAPii3OvQP9J+gYnhoEjHn4VMoWWEulo +sieBwdKjEaf6iXIwVY2Pz5bEEqG04uw2G1JToTMvoT7Crl/QaMLYU1OKSxR8/VEj7S0 UnMzaY8fFlY70dGXhEMYInHBJaHz+F4+sPAMsPwC2Z97XgV1ui33GQHJX5d2jIJNMUQ6 OeJ3zZJKBjXrAKpewk7zjgNQsJlNFYAnEoXRzcF7ytasYP0VvJ3zFviJP2KmvPqg+tAE uGnu+5xti2Kkdw4HPuO2WsJPPp0xKiDOUL6ZAnix4qyxIzu2ox4EojwRPi2IhCERu5LU oPHw== X-Gm-Message-State: AC+VfDyhT9wxJD0c2txmnuy52ID3tH87soAqBYmpp8mcqj1qCb7LGHpa bDQPFf2oxWZSP5RN3fQkf2KkQw== X-Google-Smtp-Source: ACHHUZ7vENHxVyZhytONW2EeAI/gfZIHdeb5dzA9Kq6kNveW/7Svnu2VZwESWi9KLZN/Vl2NIU/V8g== X-Received: by 2002:a5d:6452:0:b0:307:7ae6:fe98 with SMTP id d18-20020a5d6452000000b003077ae6fe98mr21132722wrw.22.1687514938545; Fri, 23 Jun 2023 03:08:58 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:ddc2:ce92:1ed6:27bd]) by smtp.gmail.com with ESMTPSA id k18-20020adfe8d2000000b0030ae3a6be4asm9278100wrn.72.2023.06.23.03.08.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jun 2023 03:08:57 -0700 (PDT) From: Bartosz Golaszewski To: Vinod Koul , Bhupesh Sharma , Andy Gross , Bjorn Andersson , Konrad Dybcio , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Andrew Halaney Cc: netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH net-next v2 07/12] net: stmmac: replace the vlan_fail_q_en field with a flag Date: Fri, 23 Jun 2023 12:08:40 +0200 Message-Id: <20230623100845.114085-8-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230623100845.114085-1-brgl@bgdev.pl> References: <20230623100845.114085-1-brgl@bgdev.pl> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230623_030859_879206_1A6289B2 X-CRM114-Status: GOOD ( 13.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Bartosz Golaszewski Drop the boolean field of the plat_stmmacenet_data structure in favor of a simple bitfield flag. Signed-off-by: Bartosz Golaszewski --- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++- include/linux/stmmac.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c index faa6f4ec6838..1f1bc99571a5 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c @@ -560,7 +560,7 @@ static int intel_mgbe_common_data(struct pci_dev *pdev, /* Set the maxmtu to a default of JUMBO_LEN */ plat->maxmtu = JUMBO_LEN; - plat->vlan_fail_q_en = true; + plat->flags |= STMMAC_FLAG_VLAN_FAIL_Q_EN; /* Use the last Rx queue */ plat->vlan_fail_q = plat->rx_queues_to_use - 1; diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index d444514db07e..c5763f60c6ef 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -6923,7 +6923,8 @@ static int stmmac_hw_init(struct stmmac_priv *priv) if (priv->dma_cap.tsoen) dev_info(priv->device, "TSO supported\n"); - priv->hw->vlan_fail_q_en = priv->plat->vlan_fail_q_en; + priv->hw->vlan_fail_q_en = + (priv->plat->flags & STMMAC_FLAG_VLAN_FAIL_Q_EN); priv->hw->vlan_fail_q = priv->plat->vlan_fail_q; /* Run HW quirks, if any */ diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index aeb3e75dc748..155cb11b1c8a 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -210,6 +210,7 @@ struct dwmac4_addrs { #define STMMAC_FLAG_HAS_SUN8I BIT(3) #define STMMAC_FLAG_TSO_EN BIT(4) #define STMMAC_FLAG_SERDES_UP_AFTER_PHY_LINKUP BIT(5) +#define STMMAC_FLAG_VLAN_FAIL_Q_EN BIT(6) struct plat_stmmacenet_data { int bus_id; @@ -278,7 +279,6 @@ struct plat_stmmacenet_data { bool en_tx_lpi_clockgating; bool rx_clk_runs_in_lpi; int has_xgmac; - bool vlan_fail_q_en; u8 vlan_fail_q; unsigned int eee_usecs_rate; struct pci_dev *pdev;