Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13475435ybl; Sun, 29 Dec 2019 12:48:40 -0800 (PST) X-Google-Smtp-Source: APXvYqwWFJd2vhNz/cVKk0yKrOqVWddp9jrii6ViixTfjB0ddMXfGdkIXUjyldmY4eOOkWwdqPbJ X-Received: by 2002:a9d:7586:: with SMTP id s6mr69754304otk.342.1577652519987; Sun, 29 Dec 2019 12:48:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577652519; cv=none; d=google.com; s=arc-20160816; b=hGPTFQKvjslOjrJVo9FFADegrWmbGn+jEOsJPpCbS/o53a7cDR8opWiv7H9d3cNpzI eqX9cDwl82vtNF0/Lql6XT3sDCXnigVx3qe6R3V3Kz8o6/DmRQvsfgzaw80SvvK4QsjC Vwtrxpv4Jfs4hH+AhNzoBsNGNZgJXvGQ5Ayu+EgEgMG50NyMWKlkXamdwHqRDl50D5pX bTN7864Qu9s0yucqAT6lztbyV+Cz5h8QfUllCki8Yj1GVBUNgVFLwxxyjmmpDJJSWQ+w 9FCT2rkkjTc80gdSaibRaVabC/jcuH30i3RoRdHSk8bjXy9X//3Z0bzkFXu+aB6edzy2 VeOw== 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=S/Ur4gEE+i/EOqRawyYBltLhd4evsvRzwjXNLBtdanU=; b=sGViZv4AEoZCocIy/i2T560twuAtwJv1HS4SUTOz0qauH9lHRlzvW5di1kCKNoO1vD 1go/0NBE/jsvq7xaXa7cLI21VKzvz3j6DuWGrymtmSu2lqMHLDzHyijSgVVBWttkLCyE L5ODT5KdEI+uGcJew4VwLpGbNYPDLiuIkowPfHp1EuvTEHom61Uk3wauuBZtmkoGTJ40 27IWVAalI0cxz6dB5R9me3xDW9A1y0ODq4qkIcgX6+4uiiHf0epZSdzDtWqn8O3qFKJF X5p7X3S623kFTT0HwVtf/IHNKkTB2NU5tDoej7gzPP9Mpf2NSC52caV1OXrWjZAkPrco VwFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="lS9qyxs/"; 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 j16si22007481otp.316.2019.12.29.12.48.28; Sun, 29 Dec 2019 12:48:39 -0800 (PST) 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="lS9qyxs/"; 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 S1732762AbfL2Ry5 (ORCPT + 99 others); Sun, 29 Dec 2019 12:54:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:43140 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732819AbfL2Ryy (ORCPT ); Sun, 29 Dec 2019 12:54:54 -0500 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 69566206A4; Sun, 29 Dec 2019 17:54:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577642093; bh=D5Qa4H1nSm2HtH/589Qc/UxvnnTvxuWd8D1wsrs9Is4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lS9qyxs/ZLjqQM+/DCVjefEipReCZjcQNMFrsaLyEVNhjNDzX8oeV5+MCnNcWxTUp 3/R0+/nzptm5WvFj1qajy4WkzOtvuRM9MxRKW3fML/wD1PmQD3cejUJKmtfE3Psx48 ck+MnuSxVutn+9/5HChwvY6k0B4DWuZQLrgCgu58= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Grygorii Strashko , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 340/434] net: ethernet: ti: ale: clean ale tbl on init and intf restart Date: Sun, 29 Dec 2019 18:26:33 +0100 Message-Id: <20191229172724.551875854@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229172702.393141737@linuxfoundation.org> References: <20191229172702.393141737@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: Grygorii Strashko [ Upstream commit 7fe579dfb90fcdf0c7722f33c772d5f0d1bc7cb6 ] Clean CPSW ALE on init and intf restart (up/down) to avoid reading obsolete or garbage entries from ALE table. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/ti/cpsw_ale.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c index 84025dcc78d5..e7c24396933e 100644 --- a/drivers/net/ethernet/ti/cpsw_ale.c +++ b/drivers/net/ethernet/ti/cpsw_ale.c @@ -779,6 +779,7 @@ void cpsw_ale_start(struct cpsw_ale *ale) void cpsw_ale_stop(struct cpsw_ale *ale) { del_timer_sync(&ale->timer); + cpsw_ale_control_set(ale, 0, ALE_CLEAR, 1); cpsw_ale_control_set(ale, 0, ALE_ENABLE, 0); } @@ -862,6 +863,7 @@ struct cpsw_ale *cpsw_ale_create(struct cpsw_ale_params *params) ALE_UNKNOWNVLAN_FORCE_UNTAG_EGRESS; } + cpsw_ale_control_set(ale, 0, ALE_CLEAR, 1); return ale; } -- 2.20.1