From patchwork Tue Nov 19 22:19:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 179789 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp1256328ilf; Tue, 19 Nov 2019 14:19:40 -0800 (PST) X-Google-Smtp-Source: APXvYqzP3wvegL3sW7uRK3ZNw3pMyVmDBykdln5R4e7nJ4dXKxkwzwZXWvdLPnBt0PbzkE60F9Ev X-Received: by 2002:a5d:6a83:: with SMTP id s3mr39013077wru.159.1574201980727; Tue, 19 Nov 2019 14:19:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574201980; cv=none; d=google.com; s=arc-20160816; b=VyLzg0lwYhU3TTm/2IaUAS2yRmFyE08SQ6VtHdxx4CsopLjOYFaUGUo/Uvq+KECj1u 4pWDCp5MysYhCQIXmPSMp4GMx1LRJ4oQTiSwFeewdktngmuHkALbh0nOESYozqApCI1q Y5Wfcvis60YesU06YDeS66i7AJTwhjq328TxrGX/0jhaw2XzM6YiCqZalEz+Y/yMYU0H yjs/PS+WI4cfUK6wjTEl5EsYipl7/41zvfPH/0+Q+sb2QKQYb7yoXTeoKKm0U6oVcVPV wmI9r/e0gvxWSU0z1cI7gCp2MN+CjUMzN/DaGT6sekH0lCNymWDwoxPiZpRz6EooQ4qQ UKHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Adn9YCxB93/dkCBHMnDfzFbMC9kwY9M8O9KGdNuZYdY=; b=r5cC4gXqc77tGLn4v8Rl7eJ9l8gveakQcisW+2tdzs+BBOSsarQER0dpzIvkUmNBXP TBWETh9RJ7yrLTDhmc7BKlxVtiPrgnf50KpSuRc5VbZJPQRXnOazMRaKKjc2Jh3ovrRJ ISVUQcy06NqVhaWtOWl4+BaFk4Jq2ZAHz9oTeXNxDT4EkFaMggAF+i/K+OaJC99scy32 nXtTuMWhoTNd3/5UGrNA4+eQpDCEB/uuEOwJ+iDoE4jjTpJ/yqEj/hgN/s1ynmaQsKj6 M2NOdrCVcCRu2/Eg/bGuQM/abbZN9OmBevr5L9fiztO4aLh1FyWiy/Nt7u+L6pQ58FyI Iwtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="W3C5/gZP"; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d10si19895145edn.266.2019.11.19.14.19.40; Tue, 19 Nov 2019 14:19:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=@ti.com header.s=ti-com-17Q1 header.b="W3C5/gZP"; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727446AbfKSWTj (ORCPT + 8 others); Tue, 19 Nov 2019 17:19:39 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:34568 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726948AbfKSWTj (ORCPT ); Tue, 19 Nov 2019 17:19:39 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAJMJVhh027118; Tue, 19 Nov 2019 16:19:31 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1574201971; bh=Adn9YCxB93/dkCBHMnDfzFbMC9kwY9M8O9KGdNuZYdY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=W3C5/gZPkdQs27LkzqpSpD8/vbiONyRyFNXUNGALv3K3+NoMEaArbViyk73vDwgCO U5Fnu9Kspnm9ZQcL3XPViS3eyf0W8itWkIz9QGqQq/SqCicWGuOV5ecERRy7g2S3Yk a0TFPvgqQa781qsYdaluXgcM8HfJZBwd1MlTTlw8= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xAJMJU3b043770 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 19 Nov 2019 16:19:31 -0600 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Tue, 19 Nov 2019 16:19:29 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Tue, 19 Nov 2019 16:19:29 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id xAJMJSXZ123688; Tue, 19 Nov 2019 16:19:29 -0600 From: Grygorii Strashko To: , Ilias Apalodimas , Andrew Lunn , "David S . Miller" , Ivan Khoronzhuk , Jiri Pirko CC: Florian Fainelli , Sekhar Nori , , , Murali Karicheri , Ivan Vecera , Rob Herring , , Grygorii Strashko Subject: [PATCH v7 net-next 01/13] net: ethernet: ti: ale: clean ale tbl on init and intf restart Date: Wed, 20 Nov 2019 00:19:13 +0200 Message-ID: <20191119221925.28426-2-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191119221925.28426-1-grygorii.strashko@ti.com> References: <20191119221925.28426-1-grygorii.strashko@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 --- drivers/net/ethernet/ti/cpsw_ale.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 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; }