From patchwork Sun Dec 29 17:19:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182546 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp5452275ild; Sun, 29 Dec 2019 09:36:22 -0800 (PST) X-Google-Smtp-Source: APXvYqwWU8/2bMWipaaUldlnFpeE8DFW+T6eTlVbWI52vDjUxIg5q4KQzoQIOePho1CzlmQhp59F X-Received: by 2002:a9d:60c4:: with SMTP id b4mr46480793otk.166.1577640982646; Sun, 29 Dec 2019 09:36:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577640982; cv=none; d=google.com; s=arc-20160816; b=YSfLoJo7vcsz3CLmet7I8PMrxFNBl+aM2Kd83RLLrRhWRYt34K1o9Ke5JPuifdu8n7 LZqLUGlsP0YshAitZcIfF0MW6/bgeJbmKhuTDrSlAnUKM0SavULODlAklZzYNxM+T55S yS9+hMvdJY5eLkgJ0K3feqkrsw7mpJGhNpbQ8SScN52v+DkFpbdtydUL+QRl9lC1Uc9I oqyy/7PtT2ciw23Ki8wAjwGKrmvjv3UQf0TiUgGFRvahz+9i7r0+hJkOZHMb+3sOdqEa aj08gGuuDDihorIOXnGuSSd5nkivUbUduWlMVj8vCYRc1ZHIuu3lTlAI7QXoX+nTzWGn NKnQ== 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=aAzjYgjBHME2ADS+J8dawMO+OExYroQMjWa9IYyQKlY=; b=du/3yPZ3Cs/eYMJaEdMU3LvoJtQar+hER7mtscqvRE3o6Qrkk2Cx4hJoRx0R9V5yN8 qOlZM2MKh0C4mz+3S9qs0TsKixacRezVUVE/ijZCHwyL4N/DshPzaWdboBL0yKK0UEhT 8BQdMXdcCNmgFXXFA5Y3MEVIgG7xsa6jPqg6qa71EALSKdYicM8Y2V88VsNXrJHJZYbf 4rZZyYGD0K5i4XjXU9kRGJ4U7S++zX0U4W28Jc9c9jrKL94guyHCwPiE+o9rFOGodSMc iFXz5KulxPNoc2BgOsC3GX8ViN0Es4o6cUsGFKtg3gtupm8KEamB3aroCwfrwOi/BYIb Bnfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BwUx2adC; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 w9si22251099otl.138.2019.12.29.09.36.22; Sun, 29 Dec 2019 09:36:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=BwUx2adC; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729714AbfL2RgU (ORCPT + 14 others); Sun, 29 Dec 2019 12:36:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:41552 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729783AbfL2RgU (ORCPT ); Sun, 29 Dec 2019 12:36:20 -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 727B3206DB; Sun, 29 Dec 2019 17:36:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577640979; bh=eT8nQbw1fEvyijJbgQGTWYfh/0VMvBoz56DGwb4sp+4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BwUx2adCxuXe3QoXhq0IUo1qbemg05jg94VkFzkCC26lyBnRemjhW5KwIgAYRgYAb h7eVEoUX4hXsxlpFHclOjjHFbzbR5uNG8uOrJYrkcon/ChelgbLrN2oKf7w4HBfHjy dyHq/6eeQ7zgW5lmbr6+Hj80ov0cs6RjrFJr4Q5s= 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 4.19 179/219] net: ethernet: ti: ale: clean ale tbl on init and intf restart Date: Sun, 29 Dec 2019 18:19:41 +0100 Message-Id: <20191229162536.004120213@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191229162508.458551679@linuxfoundation.org> References: <20191229162508.458551679@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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(+) -- 2.20.1 diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c index 5766225a4ce1..c245629a38c7 100644 --- a/drivers/net/ethernet/ti/cpsw_ale.c +++ b/drivers/net/ethernet/ti/cpsw_ale.c @@ -793,6 +793,7 @@ EXPORT_SYMBOL_GPL(cpsw_ale_start); 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); } EXPORT_SYMBOL_GPL(cpsw_ale_stop); @@ -877,6 +878,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; } EXPORT_SYMBOL_GPL(cpsw_ale_create);