Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4214735ybi; Tue, 11 Jun 2019 02:57:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqysU+aEa8c8BEs2XEMmDDFVnF0kn5qPBt5DiHjM5WXurGKxKwBOqRtqNY45Fy3QCtBgIVzJ X-Received: by 2002:a63:e953:: with SMTP id q19mr2869875pgj.313.1560247024832; Tue, 11 Jun 2019 02:57:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560247024; cv=none; d=google.com; s=arc-20160816; b=Gy6z/fjte6DzadRCbouWEi3E3RPFX61skI0XVwuS2hhpmQIX3X5HtRBJqjevqSQlrQ R9D2nry1i3bZ0Oys6lKS5VSj6yKXiaVEkjhPIecmdgrWdeyhkkm91g9A9Af+1Wgzr//H 6ju5IBJFiTnJPR8M9/FF+eof0WRTYjIgca8iUQLPp90cfW/1makdgssJkVxCRyeZll8k eh/+60mIa7JyREE9+NFUoCglfqxJPmncfdO5QyUSLBmqWIysXu7ycUIZ+G5NlMCRs3Pu eBrAatps4X3tadnUbbMNQwznpQvPFYvx5Q8FkWv89isobpvhNcp6H2xo1sZpCDKoFgEm 8Zng== 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=z/Sn61H7tzN0NHxpBDXy85S/VVpdvRSG6B5rGgN99p8g4PNQDCWyiZqH7FfmS/lIUF 65BSDhumykMwI9NiCPbWOAL3UkWprg+Jhh1GlcEj4H9EpPZv0cgNVjWqwvE9OYew/PRv qSCFX06Qg4xnMmhFaXrNhMUkJqgxXGQ7VzrU2KdIil3JFuoVoWJZjZmuiD46085Sxfj5 +XJWj7BrQ58Zr71HyXpD+UptX0WOnCqLKBrkGAsVGeUrs9Z5KlKJWBfKcNC1akdjSfxr Y+DY6VFg95NDNW4gCZxyhgJNaoJz66dLJEi9oM+FFgZXze9vUFrrZDBTlVgtoPi7gBdV s2IA== 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 l23si12465201pff.2.2019.06.11.02.56.49; Tue, 11 Jun 2019 02:57:04 -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 S2405087AbfFKJvu (ORCPT + 99 others); Tue, 11 Jun 2019 05:51:50 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:54185 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405067AbfFKJvt (ORCPT ); Tue, 11 Jun 2019 05:51:49 -0400 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 relay12.mail.gandi.net (Postfix) with ESMTPSA id BFC22200008; Tue, 11 Jun 2019 09:51:45 +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: Tue, 11 Jun 2019 11:51:43 +0200 Message-Id: <20190611095143.2810-3-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190611095143.2810-1-maxime.chevallier@bootlin.com> References: <20190611095143.2810-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