Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp65137lqp; Thu, 4 Apr 2024 07:15:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVyZDC9gxIs57xUSO3AR8C0r7QWQLsNzCjU9Nl6uQNTjyctuABy8ek+m4LdQCAfv/CjFn9CezQp9O9Dlyrdq2U0YFMF/GgZ9Wg23Tnj2w== X-Google-Smtp-Source: AGHT+IF7ywD2KfL6TlOoMxg1HHEahJ1PMwtXyXnoUZ0H6V9+cLFvwfCdkAWxo18E0ko1WCVLbVxk X-Received: by 2002:a05:6358:7250:b0:183:d2fa:ff5c with SMTP id i16-20020a056358725000b00183d2faff5cmr2845836rwa.12.1712240133941; Thu, 04 Apr 2024 07:15:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712240133; cv=pass; d=google.com; s=arc-20160816; b=iORctzLt0GN/gTFJ7oPWrRVpdQQgly+qxOGgC1lH+l+7Jq0FKNvbeVXgKtIUYEO3KN 4n4WLThvSlp5qkzDA434Apc6IJJBa6mCx4r8nlmEKGJKQyWqZyWXLZAS53vndRWoujuo uAr7eM62hwwZiIz54Xhw609ISaLfyBUuXjrpglffGpJmwDOURiBdm0TL0yOoxwyHwWlK RtdErbHXGrazNG4K/d7rlueDc9sCH4e87fqyDEJ5r9BI7TV3naTq/RstLpK78PsznPrn gMq7irb4KeSTjfNwFGhal+M2lU+DIsQ01Hf6xyTkWvDzYh3mC7noYyLq+rpAmuDN407f S5XA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/PG1uFB0tgR6V3IsTVfYsZzC2soeoAvu0JC5BJHQbvI=; fh=CeXLq+ETMK3CCbEj1aK20v0XNc8ixeSFLfX9f0X74CM=; b=ZRGlfv0emgocV9T5d9CWQP7EpJ8jkfQJDnnfp/v7qdiDGILpSLOu47JAB9hcb7517+ 4l+kzFhIMG0+ZDNXAlrD3XAZ/7eeIA0g8wkuwqyprseiVu5tJgdGTsO6hinT5SFqsgaP aUgMz3VCjEVMm/umNtLncTxpptSUqeKl/qnO/23ETufEJNqXvEOPyKTwaan8sVOYXCSC cL+Tc7iskF0ydlj3w5na/yEf2qGwZriW+YUWIBxDxu2iFWLAMIF1U2d7zNBr3i/0QOI5 PZ6HZuw3c69AAD9dHenurPf1IXTp6IOs+ujr6VgB4VHnCRbcvka0PCT7+DiLMcI1Vp7m h0gw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZMjKtPig; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-131540-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131540-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c35-20020a634e23000000b005e4f14d49c1si14445681pgb.195.2024.04.04.07.15.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 07:15:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131540-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZMjKtPig; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-131540-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131540-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 91881B297C2 for ; Thu, 4 Apr 2024 13:54:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C98DB1292EE; Thu, 4 Apr 2024 13:54:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZMjKtPig" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E32CF127B7E; Thu, 4 Apr 2024 13:54:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712238877; cv=none; b=NAQQLx0BYAE2osyzzHkdIk2npa1M0KI8JCv7ZTRQJjCShJnVkTXKwU63NBmElmVuf9A5kOvFInWPhmt+LW/FvvV+2T222Ctbrotzeoo8mWhDio3XjhydtgYjY2AQMApYQcI0EAP4j7qhU283sanDKwUUTgN0ZiHfbDNki8U8kkc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712238877; c=relaxed/simple; bh=rgcpub8PrWzAxQAh6zx9KkF/3iwVXcYaz/F02yMjsW8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N0Jz6IZXLkWROXiyadZxxO/ZvkIOuqSwMxAAVwpO7gmrSQuKA7owt6Q4KiEMcLtaRVsKIy4QzI6jXhNAKCGCnVDWTmNo1r3SaXWYQ3D7TCyqBsALEDIsIp1bI1qT49rXb9GPViU+Q4UvmyTFiAykGkhBTP8y8HvlT1hnAOiHhQk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZMjKtPig; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B531C433C7; Thu, 4 Apr 2024 13:54:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712238876; bh=rgcpub8PrWzAxQAh6zx9KkF/3iwVXcYaz/F02yMjsW8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZMjKtPigKuG4hf+rhQ4oXyN9pnE0r+2jKtlodRHqYpONHEZ+uLzOYutmvm7p2nRXF 71wmJMMjzNOV9lk7KppXm5F+oh4kzMH+6Pb1Sq/trgjknR2SFbUYhUJb82GunPwIfA hooQwIBOsxlNKvbg57lUdW0CNjTzDwG7TUW0BZkG/3Mi9XbTh3mQsZjfBbFoBwQZWe U2glc2kIM0B0uJe/k1RMKVITrOQRPUbCUc0JKS/34MRyLTap6MdO8I3epTANccciyu vV3FOKK5S6oYe3b3ZQcR1eyh+lWxOTWQvGc843R5M6pM1VSuaPHqYnNQsXU2+kks86 ffrgDNYZaDYfw== Date: Thu, 4 Apr 2024 14:54:32 +0100 From: Simon Horman To: Jose Ignacio Tornos Martinez Cc: kuba@kernel.org, dave.stevenson@raspberrypi.com, davem@davemloft.net, edumazet@google.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, stable@vger.kernel.org Subject: Re: [PATCH net v4] net: usb: ax88179_178a: avoid the interface always configured as random address Message-ID: <20240404135432.GR26556@kernel.org> References: <20240402183012.119f1511@kernel.org> <20240403132158.344838-1-jtornosm@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240403132158.344838-1-jtornosm@redhat.com> On Wed, Apr 03, 2024 at 03:21:58PM +0200, Jose Ignacio Tornos Martinez wrote: > After the commit d2689b6a86b9 ("net: usb: ax88179_178a: avoid two > consecutive device resets"), reset is not executed from bind operation and > mac address is not read from the device registers or the devicetree at that > moment. Since the check to configure if the assigned mac address is random > or not for the interface, happens after the bind operation from > usbnet_probe, the interface keeps configured as random address, although the > address is correctly read and set during open operation (the only reset > now). > > In order to keep only one reset for the device and to avoid the interface > always configured as random address, after reset, configure correctly the > suitable field from the driver, if the mac address is read successfully from > the device registers or the devicetree. Take into account if a locally > administered address (random) was previously stored. > > cc: stable@vger.kernel.org # 6.6+ > Fixes: d2689b6a86b9 ("net: usb: ax88179_178a: avoid two consecutive device resets") > Reported-by: Dave Stevenson > Signed-off-by: Jose Ignacio Tornos Martinez > --- > v4: > - Add locally administerd address check as Jakub Kicinski suggests Reviewed-by: Simon Horman