Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2234584ybi; Thu, 20 Jun 2019 11:19:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5oHSxosBqqsKT57cUVOm3EDcswaECUnfyEk6eXf3W82uBvtUuG243F/x1NpACFQLhLZ7h X-Received: by 2002:a62:4e01:: with SMTP id c1mr32965069pfb.70.1561054792755; Thu, 20 Jun 2019 11:19:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561054792; cv=none; d=google.com; s=arc-20160816; b=clB4xShql6TJW9sfEIubkF1XRH5l5RUQXtN6HH57JQsMrP3PAb4EtaAekZVatMArgh CHREb5Y9yKQgFhUZjQv9UYxlADZU3CRJQ2IMAr+ysDr3eQ9SG+CNDrtPgfpndABfKMjI Zm/jPf4VfbIapus50O1JfwNI3cA9AUVsDcL1klwlymexgBnwCeCshiC5vPImMPzBSBPI tFXJ86fLhzeha383mVdxCIe+Omw9ou/sBXz5d0mxR2f4kH6X+rFYIjqfYblaJ+5QevUO jp1HOIBsenv5HcU87gikujIgT4tWpBZD+XcMOdzwDIHy+coEEOg9rdyIzJDPEoLs0Nfz zfuw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wQYTEnLNdfpAwR1PLf/gLJILUp5sC5LSfF4ZY/gk2rM=; b=en1y8E8+/15evxQt++Gc1eMhBu1jCDx6ZBlrXFlFVPnCL3Av3nzVwgJAZQnD2Is3Za VS13RxvSQaHtGwditpLXl2Wb0klC5SqZKWz1hMOLHSsEv8pv+wTHWG1KIXzp2y29Xm1q tDx1bsjT5R+Jdmxb4gtY0/6ygUk4rfQxEByoGgFCewd+rxF1LV2UsGErupJFGg/iVd3r Z7/ZTxzCt+RKjF1PykUzkAwwhLQK3M88qy/EgMEx5h/4inArQbiQVop0UqLwahK0CUxN PbO3gyQtU4RyYwysHhVwXzHVn4whZAbVd2eJvDsmFhiwdDGa7GWdrqWmfbc5hy/4/ELg CSNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=l1jZs8Hx; 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 q10si412868pjq.46.2019.06.20.11.19.37; Thu, 20 Jun 2019 11:19:52 -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=@kernel.org header.s=default header.b=l1jZs8Hx; 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 S1729528AbfFTSPB (ORCPT + 99 others); Thu, 20 Jun 2019 14:15:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:43520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726276AbfFTSPA (ORCPT ); Thu, 20 Jun 2019 14:15:00 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 916AE2082C; Thu, 20 Jun 2019 18:14:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561054499; bh=nUY6ILTxX+DakTlISDVeWnorLgfPe9zH17lpV8hhCvs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l1jZs8HxyMb1n1ODBDsvx19cZW9GkiGiRPa4Qeb1E0boSjtNZUu26uCg6RgPsO5pM 47Bh90FldCYYxXnfX5hmF5rF3I7jUerJgB2V8Z/CNJIFv5oarmX6vZPslr4QNJw89b DzGWKPn2/JRQDzrClBv3tYFde+ByrvwrX/nwTko4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yuri Chipchev , Maxime Chevallier , "David S. Miller" Subject: [PATCH 5.1 20/98] net: mvpp2: prs: Use the correct helpers when removing all VID filters Date: Thu, 20 Jun 2019 19:56:47 +0200 Message-Id: <20190620174350.152141876@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190620174349.443386789@linuxfoundation.org> References: <20190620174349.443386789@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maxime Chevallier [ Upstream commit 6b7a3430c163455cf8a514d636bda52b04654972 ] 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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- 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 mvp 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; + } } }