Received: by 2002:ab2:7407:0:b0:1f4:b336:87c4 with SMTP id e7csp189063lqn; Thu, 11 Apr 2024 19:52:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUJSOc5oxEFJJSjJrqx2cnxODisxC0wEs0DP6fFIlSIhrUiT+e3Xct+QTcUsUVbLphZaA/ouhlO7OL16JUXtMepEsY48ASpQEFRMixgsA== X-Google-Smtp-Source: AGHT+IGx0LW+69Yh58NV/4VLFOSlZ/np2zULuTrQwybjgTwpaTbI4XZXLOIXvnmFlVKhxhKZYPvf X-Received: by 2002:a05:620a:13ef:b0:78d:67aa:70d with SMTP id h15-20020a05620a13ef00b0078d67aa070dmr1477322qkl.37.1712890330205; Thu, 11 Apr 2024 19:52:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712890330; cv=pass; d=google.com; s=arc-20160816; b=d45soJbcL6aPjrW0vsxeg1piodPZD9XNf0PYv+VhW87pZ4DeRtSC7s5QGO58HpC07A gF/35IEN2FyPldBthYAqVv4Zj4SVSjtip4xAK/TfrZhpQkoRg8U5EjxWc+AkPDCFUJUf 2fL/PGkpnLdlO5dVzP7WNkaIZ7SVC0iZH4ECWb8YOnBd+2xpgdNJltk8DgIFI3QoYj++ 5h4kKwDFX6CdGLGYZ8DW1j8FCKeKxOui+aNslo2cAHwDcFiAHTQrJYNrH9TDdq2UQwct W/Veq/r9fbwYj6/8JqPwbIJoe+/hDJi+edSjE125NZQ7BRGtKzmqkZj/TT+Z7tegVY84 IW3Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=JLSsFNuTS/XXGmjbgOU7MixG+Yt1/H2zmieyO7GGxMM=; fh=B1Yzd4W/sJt1ny7jzSjybsdlo1HMbAH4BqhzBqDsoNg=; b=abGf6dsH2kYniKSrFWOKbsO0phfCxqoeYomJjupC1WdyAnUXDuMOkEXSngJkg6ygZZ 73WLD42VUybWqixlzwgwkyHLT/yzpWW3zga3Zpfae5N/3FgoeJSanZm6xwrAdcLa82Cv 3euyp9CUdqGbPltojB9CmKdq/WuyaTLquQwxV41HwFsbjLrzJUVUbuMaLasqdPKtoNve k2xAJdH/QYAgaMCOsB7mxMv7YzBFlFQT6gCRGjipA/iiC9PgH2SzzKCNL7qknm4PrD3B 3Q4yOJwgsIblmYV1dmks8Mcx3S1O+ZsB91r0hqLXkf/OFt9ARGX0SrHm/rt83lkInTW/ 8O+g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DR1JybLc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-141824-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141824-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id h7-20020a05620a10a700b0078d564fe5easi2814505qkk.753.2024.04.11.19.52.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 19:52:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-141824-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DR1JybLc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-141824-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-141824-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D1DEA1C23188 for ; Fri, 12 Apr 2024 02:51:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D6A6134CE; Fri, 12 Apr 2024 02:51:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DR1JybLc" 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 8660310A24; Fri, 12 Apr 2024 02:51:31 +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=1712890291; cv=none; b=cTdtLjies0HM1o7W065hzqwRNAroa9E8ighN8tL6rMw9r77tfdF4eON+fOLaWO1JyXdvpfm8ST9ccZwWjsr0EBVoB84pugvzT8npX/vwKFLf7eqjZ+BeWhYmK7GYcZ2h9s/D3lqXoHABJvNrxOQFfAJnR0uE4VmS3geQs2tIdyk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712890291; c=relaxed/simple; bh=JLSsFNuTS/XXGmjbgOU7MixG+Yt1/H2zmieyO7GGxMM=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Vba3NiOkNuzxsOrp1MRPPtGHfNeHdfEcjsQctn/gRV+jjcFdj/4Xme3jf3de7VC43TnHvLnVDGalG+CNU9u30M/2S4QPoDBppFOQKuRDC1gPwmwLsENoA3mdmmSWoFrtugc0jaiRlWXv8n7ALFslfDYSbJXtalVm8ZLuLNkOTVE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DR1JybLc; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CC69C072AA; Fri, 12 Apr 2024 02:51:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712890291; bh=JLSsFNuTS/XXGmjbgOU7MixG+Yt1/H2zmieyO7GGxMM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DR1JybLcJI6E78CFpFQm2BDyx0OIXKm6fZPwjr/Nyu6Md+FqcBBemwL02ZZXqNM8+ vgpDDW0pNaRRuMvuACSYt8A6NM+INoBUuZ3drApLMfJIY95lUdTzao7+ILFfmlA8IF dcLhGhwlkl4V9Cq6Cbya2+JdL0DaUQw7aL64oo24elKNDw43JvJC5a5fYz01EQpzut uouWdN0wfAYtRo8rUPxa8J420UVZFiaMeVn2hBZQ2HIybPqRsOH1WrvUhosiZ7oiXc cS69wqM+hR8W18Sm+FyH4irMAw+0I7ztNyXe/oC/ljPD45+/68E6LERrwJtyWnTiky gssoMX5k6Y5cw== Date: Thu, 11 Apr 2024 19:51:29 -0700 From: Jakub Kicinski To: Jose Ignacio Tornos Martinez Cc: davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Jarkko Palviainen Subject: Re: [PATCH] net: usb: ax88179_178a: avoid writing the mac address before first reading Message-ID: <20240411195129.69ff2bac@kernel.org> In-Reply-To: <20240410095603.502566-1-jtornosm@redhat.com> References: <20240410095603.502566-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-Transfer-Encoding: 7bit On Wed, 10 Apr 2024 11:55:49 +0200 Jose Ignacio Tornos Martinez wrote: > After the commit d2689b6a86b9 ("net: usb: ax88179_178a: avoid two > consecutive device resets"), reset operation, in which the default mac > address from the device is read, is not executed from bind operation and > the random address, that is pregenerated just in case, is direclty written > the first time in the device, so the default one from the device is not > even read. This writing is not dangerous because is volatile and the > default mac address is not missed. AFAICT the reset is synchronous to resume, right? I think you can use netif_device_detach() and netif_device_attach() to prevent getting called while suspended.