From patchwork Sat Nov 9 15:15: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: 179021 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp4307155ilf; Sat, 9 Nov 2019 07:15:49 -0800 (PST) X-Google-Smtp-Source: APXvYqwx652MzxKjw45PPPrsiqsIVF/kazzY0E+W3Dq+gLpb0S6L1PtZZYXEI6NLDZl6K5f00MJ2 X-Received: by 2002:a50:870c:: with SMTP id i12mr16302068edb.16.1573312549004; Sat, 09 Nov 2019 07:15:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573312549; cv=none; d=google.com; s=arc-20160816; b=YNUVBa2rfOGB57iayZ3CShTADVJownXkLjSpt2ZO7SOZHp6cm5GyWb/YX0fd5/PJBP Ky2HJQptdWJWon6eOAT6LYO569jmLrkm4WKalEL2qkY+RdXnxuKGuzs8M1dE1CRgeO1L eGXFybvcZ0DiArTT1Cvow1+4mUmNKnvY2Wc9EVDwlmvYEBZkxIeB2F0v9W/MwTannGjl 4jr4X7BvcTuzVuQjCMMWMYAlaTrKckI/nvnIaU+RaOtHGkEWLq55iCkN8guRahplS3XC xDxgv12pIDqcVN0LcnvZOY6TehbroaEu3KG8uquNl4KKeo086/WjSsnwPjQSHb9YWlJj Gx+Q== 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=KgJHSO4Jrc4UpZy6oWVX7P2Llp7kubnQWcf16eS3nqts/99k4dwSKOa1IVynhAvoYB HQEO+ZdBSiaiXFf7n+6Lq0UsjeaHVHZt1/fBLYkjvqO2O3HC+JsQecGTNYxeCdSAS7Di N7+dPjI95F+5SrqSd/BuSZlRr37VYYC5WFcYzeUDOg8So93l3EFx1U51DEVx4rB/2VsG Bko0IAdGUVH8lxmdMOiKXxnwo4e90fE27rA/w7pY7K8wNeHojGUguIb1jvJDq2cXUtAr kLjS2knUMahzh8KjLSN3+iyIpSn+MXPldMcS0MJM5VL0VeVjxU77powvJVYbl+XVoJ6K Jd5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="HD/bpT6c"; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-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 uz25si5948670ejb.43.2019.11.09.07.15.48; Sat, 09 Nov 2019 07:15:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-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="HD/bpT6c"; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-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 S1726289AbfKIPPr (ORCPT + 5 others); Sat, 9 Nov 2019 10:15:47 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:39440 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726597AbfKIPPo (ORCPT ); Sat, 9 Nov 2019 10:15:44 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id xA9FFbpo066989; Sat, 9 Nov 2019 09:15:37 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1573312537; bh=Adn9YCxB93/dkCBHMnDfzFbMC9kwY9M8O9KGdNuZYdY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=HD/bpT6cvZAyiVEDyvqfSlhxsh5QVsZUoso2P5Jg4IWQQ6kR2j4Qv+qT8VNdN54mZ hoPA0+CauaK9DOwXndpax0ZxYqOoFh2LnhVsWfpsTxqKXBVTzDaR9oSFNjOdrnJJzn oIQfWG+nv9Gd7W4UjrK2MHx04zOYv5WT4MeXktvA= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xA9FFbAn128742 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 9 Nov 2019 09:15:37 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Sat, 9 Nov 2019 09:15:37 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE102.ent.ti.com (157.170.170.32) 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; Sat, 9 Nov 2019 09:15:21 -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 xA9FFaH0024134; Sat, 9 Nov 2019 09:15:36 -0600 From: Grygorii Strashko To: Florian Fainelli , , Ilias Apalodimas , Andrew Lunn , "David S . Miller" , Ivan Khoronzhuk , Jiri Pirko CC: Sekhar Nori , , , Murali Karicheri , Ivan Vecera , Rob Herring , , Grygorii Strashko Subject: [PATCH v6 net-next 01/13] net: ethernet: ti: ale: clean ale tbl on init and intf restart Date: Sat, 9 Nov 2019 17:15:13 +0200 Message-ID: <20191109151525.18651-2-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191109151525.18651-1-grygorii.strashko@ti.com> References: <20191109151525.18651-1-grygorii.strashko@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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; }