Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp249599lqb; Tue, 28 May 2024 14:33:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUY9LAE+fzxYbdNwUqzJOo7sMlC3qBoOwTUcZe+j48/cefDwaPt+ry8qtMkg0cX2VNhA97Wmh+BFuJFqT8IX5VrJeOCW3kPW41+L291Lg== X-Google-Smtp-Source: AGHT+IEMirUIxioL5rVqOeAIVi0lkqxBvbBpTi6dZN4BvQ1/6q5XG5yt0Opbc4vswOB/jYezmCVH X-Received: by 2002:a17:90a:bc85:b0:2b9:c9d5:47d4 with SMTP id 98e67ed59e1d1-2bf5f204d6emr13991429a91.34.1716931985791; Tue, 28 May 2024 14:33:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716931985; cv=pass; d=google.com; s=arc-20160816; b=GzhoNO0esMG4b+CKBNOxfLGnT3zEZ8uV7rqRP4+7vXwnapUUQd/qe9snercRJSkdPw ChrK1q5qeekBmMSY4yqjg17EtuNC1s9Okuf2Pgy2xu8ai5xFWugtzzlvtB9/qOASCEGL s/gQBHXGQpOQxVcnhVhmoZAF28fC/32/rG1YCYW49/9zdDQn3Sk13PnbU6F0zhL4NyH9 18JCSjuPZlqTPdq0mDmyr1LecxOcmnG7liYobdYrqde/FmItqkitWe1Gctsw+uzDhJSi j/3cIgTAE91UbjCLjaQeZ22FwsiOwqxmw/nbldSFOtzMIGiV4eFU2iNN8ZIekjL4G9eY fWGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from:dkim-signature; bh=w+mzjb65q9qsiR245oKuLV7yuxGD3RY7c0z/CYMjwvI=; fh=cGRrRHfMJzgfDpBcpAP9imVgaa0LYdnnOHP6nh4bcsI=; b=XJ2UC1FFJvF3E8IQroEyGm9zSDil8/sJYObpT+AhZnbBUuGOfyzevRPXU2mUbOLgqL UpGfz1wl5G7zN877nEmwTI0n7mgKcfnsPzUXhunBWdgux4hVEXEK25nfnBtxMHe0iYJ5 WmEetLSW3sNdlYc/SDxKb0W7yG8gv/FQuOPBL5hYOvcX9vvnt1jkqINHxJKwyTFSQ0ci XfLbQzdEArEf1+rI1DPG2MkVBADs1OVTg0pqsARmuilPz855Ja2uZwrWK0vycFDr8WFY iMkgDtht79J8Xfwg1LlgW7py9AhJ5Lv9J7GTZa8g26NLn7NWyo11A4SFDU74yYCX+Scj iueg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=nDcJBBXz; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-193118-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193118-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2bf70dc4f9csi7869325a91.49.2024.05.28.14.33.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 14:33:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193118-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=nDcJBBXz; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-193118-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193118-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3AC58284E50 for ; Tue, 28 May 2024 21:33:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 88F2017BB16; Tue, 28 May 2024 21:32:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="nDcJBBXz" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C4AD17E8EB; Tue, 28 May 2024 21:32:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716931976; cv=none; b=L+EtK6Cb8YoUlm53Eumk+UTUYBZ2M5NWcBAfNO0pu9OBqNlO5Og2QM5sTuK1lt/YGeiAcBKWFPOPr20fw42gfja6cR24RuzarqfSf6f2Ud+lE8e0aUUVoxhOnfHHxlbH3x5UPFHua7SQ1tNAEgnGG19lLtViL92HeyFndiYP8K0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716931976; c=relaxed/simple; bh=RL/H/Q1tC4LaABceTiz3iOJPxQ9kUUPRC95anWM/vSc=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=JDl1p7TTnER0SWdIfOGJASiCaJtncqEPMdiV29+DJe6CuXgJH61KqC4xc79b9IDqei9sE0T3OQg08uInBPwb8iS+qdzdmV0mkxz1lqQX7fovWLIlN4AkdF+vVPEe1QyHaD72so9SJN4qHqtMGHzYkOpc03oWsLT+8GIn9ijmHNk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=nDcJBBXz; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1716931975; x=1748467975; h=from:to:cc:subject:date:message-id:mime-version; bh=RL/H/Q1tC4LaABceTiz3iOJPxQ9kUUPRC95anWM/vSc=; b=nDcJBBXzHgBe6DGPPO3sW5SLo5oSikQv3XXDy2UzpwQGqggOLdoEKCDA fEM4/5SlPIcnphAFQ8DEbDvkkb0egpsDQnDS39nWA7SyQgmxumchnVCGg f7ZjNVahc+UrNfDlNEDZlZiKvuclOUhIDB8PJYfzyh4EYSq+YEdglUydb JR04r+ZAzvdzv36+0CTH5HSfxZYuFp33UQ4jPv1/U4eQ62uhCHmKJURYP uc5ypWYX7kUOCiv5FpPfTvjHR7sf8vvtFO7rWE10bRW64IAKK+iEDdyGz ShuX9FCtJHBitIBLc8ZjsI3/WJMtLNJhPd0hLQEHRa2dTH8bSG/PES4cu g==; X-CSE-ConnectionGUID: S+VNDRXWTBKEljlE51EzHA== X-CSE-MsgGUID: W7LI/10jRveUlOb8Da9BJw== X-IronPort-AV: E=Sophos;i="6.08,196,1712646000"; d="scan'208";a="26629078" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 28 May 2024 14:32:54 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 28 May 2024 14:32:24 -0700 Received: from hat-linux.microchip.com (10.10.85.11) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Tue, 28 May 2024 14:32:23 -0700 From: To: Woojung Huh , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean CC: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , , , , Tristram Ha Subject: [PATCH net] net: dsa: microchip: fix initial port flush problem Date: Tue, 28 May 2024 14:35:45 -0700 Message-ID: <1716932145-3486-1-git-send-email-Tristram.Ha@microchip.com> X-Mailer: git-send-email 1.9.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain From: Tristram Ha The very first flush in any port will flush all learned addresses in all ports. This can be observed by unplugging a cable from one port while additional ports are connected and dumping the fdb entries. This problem is caused by the initially wrong value programmed to the register. After the first flush the value is reset back to the normal so the next port flush will not cause such problem again. Fixes: b987e98e50ab ("dsa: add DSA switch driver for Microchip KSZ9477") Signed-off-by: Tristram Ha --- drivers/net/dsa/microchip/ksz9477.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c index f8ad7833f5d9..7cc92b90ffea 100644 --- a/drivers/net/dsa/microchip/ksz9477.c +++ b/drivers/net/dsa/microchip/ksz9477.c @@ -356,8 +356,7 @@ int ksz9477_reset_switch(struct ksz_device *dev) /* default configuration */ ksz_read8(dev, REG_SW_LUE_CTRL_1, &data8); - data8 = SW_AGING_ENABLE | SW_LINK_AUTO_AGING | - SW_SRC_ADDR_FILTER | SW_FLUSH_STP_TABLE | SW_FLUSH_MSTP_TABLE; + data8 |= SW_AGING_ENABLE | SW_LINK_AUTO_AGING | SW_SRC_ADDR_FILTER; ksz_write8(dev, REG_SW_LUE_CTRL_1, data8); /* disable interrupts */ -- 2.34.1