Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4444593ybg; Tue, 29 Oct 2019 07:16:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwl92blEmz5rUBkmTsRjv4+yyH4t+t2al0MHziHBdY0Kys2iH6zCP6eEaU+L7WUQO5NqwMS X-Received: by 2002:aa7:d658:: with SMTP id v24mr26032565edr.301.1572358610650; Tue, 29 Oct 2019 07:16:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572358610; cv=none; d=google.com; s=arc-20160816; b=I19rVJm3ccqZYxO21d0ggs6KRA1klXufhUkcVYD7KaEYVra+hEKE6zsGV0A8tAOZ+z wjdUw5IPBWdIb5nhxJHtRu52vkG6g/8pP2mxCBEUqUQwYcpCzKflqfWORqlBN2/D3W/v 9OtCWo+5l6L/ZS1nv6Hitmc5cDNcjHOs+cpTu8DV9eWo+Pd6hc/sl7xn3GNDI0fzITxa z7fzpWmkA5jTI9StFmQuj14kOSPnsCXQv9sd09Joh+cysshfg2Bk9wdJUm3/Bt1qioop 7bsQk+YMn2O/ovh3HapnC1Oq3fip2Bx4zheHUUvHPg/xVKnx13bHzb1VcYwhRQ8AWQv4 C7Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=D3LEIUQLfU3gxSvsGkKRKWILY/Se7XuvqcXyiBgmltk=; b=O/Yfrth+VwxY3k6TzTcQ0bmBQ89zgwIrkLZ2YzSCroWRlcDciF8XNxSEVsFdeujp6S jaFzSnLZx4yQNbZJjZbX+v70UcC1p+dlsEg9gswqqc1BBpuZHoFTxrxF7OVOErJrFi2l njxM3ReiXLtxHE0Aby3ESRsdtU3HN8B6Kswec2wZ4OKKTmD2Fm8GpenRXup6buUAo709 rJ/l1CUSFHRerf5trgPKxEU53H1UGuAJreWLS7Ou1U876ms4jGkrgMR2A7kuYucQ7xpF fOuuiMM3DqCASwyqjqoAU7uwSKESp/oeyv/XuC62I1Raq5/KpvVuk3d0V62Ijvz57Fu2 OVEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=O06JVMIh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u8si10118390edb.57.2019.10.29.07.16.25; Tue, 29 Oct 2019 07:16:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=O06JVMIh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389208AbfJ2OPU (ORCPT + 99 others); Tue, 29 Oct 2019 10:15:20 -0400 Received: from dc8-smtprelay2.synopsys.com ([198.182.47.102]:53332 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388988AbfJ2OPR (ORCPT ); Tue, 29 Oct 2019 10:15:17 -0400 Received: from mailhost.synopsys.com (mdc-mailhost2.synopsys.com [10.225.0.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 7D27FC0C3F; Tue, 29 Oct 2019 14:15:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1572358517; bh=sqeaRb0tZGvD7E7A9/5JfuhQALlctRTMEjpejmhQcb8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=O06JVMIhjb9OPQoasP74FxSvDbiGET/AOIwdvqbMYpsBMFoYkUckqKoaourMQgstj RGBakA9pyn+7W8RSDtxYh/8Wp3ETSIsDMJUd8jCtjRg+9Ui4iqu6Tl3Y/x7DwQMU/M 31cJncjuEtU9QHm84XEYJ8fmkx2WSKmvYOgf1TPbeL0sb5HEtAyldwjwH7um78o3Dh DMtu0uzuGKBkQENSYZPKIYfo/upznRZVKywgjLchSQTD61kW9uVGvltiaF1Q29heow XAZda1SfCRbpb1045105W9pux19MqMiLmrI4ztpPhpUAFNmdlF+A1I2O77egSqyD0Y k6Qa5e1sDvU2g== Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by mailhost.synopsys.com (Postfix) with ESMTP id 186C1A0079; Tue, 29 Oct 2019 14:15:15 +0000 (UTC) From: Jose Abreu To: netdev@vger.kernel.org Cc: Joao Pinto , Jose Abreu , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net 7/9] net: stmmac: xgmac: Fix AV Feature detection Date: Tue, 29 Oct 2019 15:14:51 +0100 Message-Id: <210c64859abaa41d4bd9fb68c4df3a2c8a9cf29c.1572355609.git.Jose.Abreu@synopsys.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix incorrect precedence of operators. For reference: AV implies AV Feature but RAV implies only RX side AV Feature. As we want full AV features we need to check RAV. Fixes: c2b69474d63b ("net: stmmac: xgmac: Correct RAVSEL field interpretation") Signed-off-by: Jose Abreu --- Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jose Abreu Cc: "David S. Miller" Cc: Maxime Coquelin Cc: netdev@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c index 7cc331996cd8..7bd1447f9f47 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c @@ -372,7 +372,7 @@ static void dwxgmac2_get_hw_feature(void __iomem *ioaddr, dma_cap->eee = (hw_cap & XGMAC_HWFEAT_EEESEL) >> 13; dma_cap->atime_stamp = (hw_cap & XGMAC_HWFEAT_TSSEL) >> 12; dma_cap->av = (hw_cap & XGMAC_HWFEAT_AVSEL) >> 11; - dma_cap->av &= !(hw_cap & XGMAC_HWFEAT_RAVSEL) >> 10; + dma_cap->av &= !((hw_cap & XGMAC_HWFEAT_RAVSEL) >> 10); dma_cap->arpoffsel = (hw_cap & XGMAC_HWFEAT_ARPOFFSEL) >> 9; dma_cap->rmon = (hw_cap & XGMAC_HWFEAT_MMCSEL) >> 8; dma_cap->pmt_magic_frame = (hw_cap & XGMAC_HWFEAT_MGKSEL) >> 7; -- 2.7.4