Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6226FC433E0 for ; Wed, 10 Feb 2021 15:35:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 21C7E64E87 for ; Wed, 10 Feb 2021 15:35:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231425AbhBJPfE (ORCPT ); Wed, 10 Feb 2021 10:35:04 -0500 Received: from ares.krystal.co.uk ([77.72.0.130]:38982 "EHLO ares.krystal.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232058AbhBJPeg (ORCPT ); Wed, 10 Feb 2021 10:34:36 -0500 Received: from [51.148.178.73] (port=61110 helo=pbcllap7) by ares.krystal.co.uk with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1l9rUx-00EDVI-Pu; Wed, 10 Feb 2021 15:33:47 +0000 Reply-To: From: "John Efstathiades" To: "'Andrew Lunn'" Cc: , , , References: <20210204113121.29786-1-john.efstathiades@pebblebay.com> <20210204113121.29786-5-john.efstathiades@pebblebay.com> In-Reply-To: Subject: RE: [PATCH net-next 4/9] lan78xx: disable MAC address filter before updating entry Date: Wed, 10 Feb 2021 15:33:27 -0000 Organization: Pebble Bay Consulting Ltd Message-ID: <004c01d6ffc2$1fd9e400$5f8dac00$@pebblebay.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIpfIuWVWp4oXxuaZJopfPMH/GLnQGxgSEzAcpu6O2pkKoi4A== Content-Language: en-gb X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ares.krystal.co.uk X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - pebblebay.com X-Get-Message-Sender-Via: ares.krystal.co.uk: authenticated_id: john.efstathiades@pebblebay.com X-Authenticated-Sender: ares.krystal.co.uk: john.efstathiades@pebblebay.com Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > -----Original Message----- > From: Andrew Lunn > Sent: 04 February 2021 13:46 > > On Thu, Feb 04, 2021 at 11:31:16AM +0000, John Efstathiades wrote: > > Disable the station MAC address entry in the perfect address filter > > table before updating the table entry with a new MAC address. > > This seems like a real fix. Please base this on net, not net-next, and > add a Fixes: tag. Thanks, I'll do that. > > - /* Added to support MAC address changes */ > > - lan78xx_write_reg(dev, MAF_LO(0), addr_lo); > > - lan78xx_write_reg(dev, MAF_HI(0), addr_hi | MAF_HI_VALID_); > > + /* The station MAC address in the perfect address filter table > > + * must also be updated to ensure frames are received > > + */ > > + ret = lan78xx_write_reg(dev, MAF_HI(0), 0); > > + ret = lan78xx_write_reg(dev, MAF_LO(0), addr_lo); > > + ret = lan78xx_write_reg(dev, MAF_HI(0), addr_hi | MAF_HI_VALID_); > > Why bother with ret is you are going to 1) overwrite it, 2) ignore it! This is a side-effect of my rebase on the latest net-next tree and linked to patch 9/9 in this set, which you also commented on. I need to change the way I rebased my work on the latest driver code so this goes away. John