Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3231547ybi; Mon, 10 Jun 2019 06:51:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxapP8WBUjpoyaXYtJ1+N8Aw2HagnlcCy3dtBeL1FbBumilYaPPrXU+f5qysGemF8S7vex6 X-Received: by 2002:a63:7e43:: with SMTP id o3mr16105681pgn.450.1560174667033; Mon, 10 Jun 2019 06:51:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560174667; cv=none; d=google.com; s=arc-20160816; b=0JVyKmJSGA8qpYwQFQwPmHlGmv4yDbs/nKwdON3W9XmPionWCsO0am+ltzAdN3mj2I F4AAQw3BM7/cmfMbdO77sB0t7bhARUCwsgrASNy1ZQSJNfBnCr146ux3wv418SN5pIf2 N3Q119p1sXd+tkKDLHPTi2WUBuph7HJLqqc732E2MvC4Lu/dLQmGKEWA+XaxhsJ2v5BY KKLZ49Mo4tUkObS+/DI2VyLe1lUc6NwbWXSUeIP4R+645o/dJ/LiaPBXoqqyDsPfiLlQ zS8H87JeQO2piOrlzNGsK9XOWZx+Zdwv7/Rz+dCd4MlXKj0219MYbVgEDtTWveRKfdzp BJow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=MDN92bjLFHHuhHLUdiMrCbofALLh56GNVrCAE2SwLuQ=; b=0PYI7iqKY+LJ+Ih3JIGVIrfCYHRT264WiPRGdvFPyGuggcCBEIBrhbgnxeLFvj2wLg 9w+ZeQRpj8uYSsurF3NFqFQsigy2WwXi3nzelgrAwHZfDQSuV6J003xpAHtXrMx/KLNd VhpEyxKSblRghduMzQt3BXVXVCR0bQ9RLDoNGxrW1ZMsGNg4QR6Z7d9ynxEyGgl3LtN4 BA1o1EqUpy9SHuxPAQWlVt5FzbHoJU6Toc2El0mSddEY8afvrJy+NqVhsgpJIOIkWBqc 6MFYyl4PVHsY7sH05AWZvH1A9oESEP+YRe6nyxI+MMRZzpRHJYPVhXIdYA+oZqE+MEJ1 wd0Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f62si9893146plf.88.2019.06.10.06.50.52; Mon, 10 Jun 2019 06:51:07 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390513AbfFJNuh (ORCPT + 99 others); Mon, 10 Jun 2019 09:50:37 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:48157 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390324AbfFJNug (ORCPT ); Mon, 10 Jun 2019 09:50:36 -0400 X-Originating-IP: 90.88.159.246 Received: from mc-bl-xps13.lan (aaubervilliers-681-1-40-246.w90-88.abo.wanadoo.fr [90.88.159.246]) (Authenticated sender: maxime.chevallier@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id E8BB6E0005; Mon, 10 Jun 2019 13:50:29 +0000 (UTC) From: Maxime Chevallier To: davem@davemloft.net Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Antoine Tenart , thomas.petazzoni@bootlin.com, gregory.clement@bootlin.com, miquel.raynal@bootlin.com, nadavh@marvell.com, stefanc@marvell.com, mw@semihalf.com, Yuri Chipchev Subject: [PATCH net 2/2] net: mvpp2: prs: Use the correct helpers when removing all VID filters Date: Mon, 10 Jun 2019 15:50:08 +0200 Message-Id: <20190610135008.8077-2-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190610135008.8077-1-maxime.chevallier@bootlin.com> References: <20190610135008.8077-1-maxime.chevallier@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When removing all VID filters, the mvpp2_prs_vid_entry_remove would be called with the TCAM id incorrectly used as a VID, causing the wrong TCAM entries to be invalidated. Fix this by directly invalidating entries in the VID range. Fixes: 56beda3db602 ("net: mvpp2: Add hardware offloading for VLAN filtering") Suggested-by: Yuri Chipchev Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c index e0da4db3bf56..ae2240074d8e 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c @@ -2025,8 +2025,10 @@ void mvpp2_prs_vid_remove_all(struct mvpp2_port *port) for (tid = MVPP2_PRS_VID_PORT_FIRST(port->id); tid <= MVPP2_PRS_VID_PORT_LAST(port->id); tid++) { - if (priv->prs_shadow[tid].valid) - mvpp2_prs_vid_entry_remove(port, tid); + if (priv->prs_shadow[tid].valid) { + mvpp2_prs_hw_inv(priv, tid); + priv->prs_shadow[tid].valid = false; + } } } -- 2.20.1