Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1126629lqo; Sat, 11 May 2024 08:23:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUn6Mn9vvYGuEQj8UDogKJl54xT8MUfYDO1S/Lw0iJDG13M+wl0KSZ8oiHhtv9NE1QvL//21KYPpiwa9eUL/H3PfyDd2z8VQC+Zn2SQuw== X-Google-Smtp-Source: AGHT+IG0YNjGEDFZStTYY0E8g8kr61HTp3JKcndrkY2q5Woksfpe0nnNpIc9Bz4RWqpwZimd1icl X-Received: by 2002:a50:d718:0:b0:572:9fea:95b6 with SMTP id 4fb4d7f45d1cf-5734d5cecc0mr4096986a12.24.1715441021066; Sat, 11 May 2024 08:23:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715441021; cv=pass; d=google.com; s=arc-20160816; b=iTISBhZzZpJLStT+wh3B7iBgpyzjd7cgKfh7zASIu8TnBX9AbsxeS93aJ+KmdYuMpd zxlHuSAqIGZRPfET2A7YJCym2FJdKESJAFjXILlxa+alBnSL8GYsSdhjTwsPsch7sZsO jYqCYyFBc3FRaGsnboOWdbn5L9eCBKe1il5ZaQ+/wYMk8TFJ+pyu56c6hmcqWJcIR/dm Cpxa2aRrqnEtlYlgDxwuMfDO8VAcgRQYJeFOzkTGIVsYogWYoz9TG3PegtBU+u/b/1d5 5l315JY4+iOOZkraHnB2Y8hxBRGXjoxm0e/uFVCsKOT7Hw+Y2JoYML2Ob6chD4avwLyB SDQA== 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=najLAbtnUVSqhvAYdKDDnqJquONdDIXKQa1Ig8KLSkU=; fh=75L9aQL18qItJBPmCdlohruOquz4V28taa9gmsBMOHo=; b=A5J6Z9eoJI6zUFuXm8qdj4c6Azc3/N4SZUkKmcfXA/pP1KOAdFnAmXuatD6p6pkKhx 9xD+CTQC08XQ9KmbEusJCcC9497Iu5G8G3rvSSU6W70Fx5IOqDmi1DjhpmA3AXVSOoh/ oLQ/FCq3pt/cIpUnfnP2ftA2FuRDmBLPkTwXhlSNYfG2AdhWp5B80BdfGPOeTHkXFHav dGmbH/6D/Lj0lbyhJTyJB//gXgIt8Bn9N9rcSPg0tzFLLH9IqfUqlq4muz0s5yJ5dRSe ccaBbJpQ21sMI7g8Go3wTm2D0Pp+T53G7S5xd0Z+JH8sULLPfmxBcxeIkER51xNeFgVm Cnbg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pNBmlTGI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176602-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176602-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c36e5e7si3080621a12.561.2024.05.11.08.23.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 08:23:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176602-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pNBmlTGI; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176602-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176602-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 am.mirrors.kernel.org (Postfix) with ESMTPS id C43541F218AB for ; Sat, 11 May 2024 15:23:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C596A57314; Sat, 11 May 2024 15:23:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pNBmlTGI" 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 DEE7D5336F; Sat, 11 May 2024 15:23:16 +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=1715440997; cv=none; b=rM90s/eh5fWxgseRuAz2CpIHpeC9SrPt2kTq9TIY0hqsOYQEyF1RzxNN5gmhjCLKOGK30uNbhX+9km3IQn66JItE8jrx77z7BwaGOWqSmSntEzDcfxsV/kZFqOTPRuKcEfai4UGNY4JYDf3fk2f1ihPzTBcGp712/9F1P1sxyM0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715440997; c=relaxed/simple; bh=Vk5ReHWzVVjJeH+buVnWLB+fuULLDSItvRQbW8AbVtw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HggaPb+qJfAhwPhgK87wzw7LLnO6bVkDhgU4Wo+QXJ0HZc/duCj0D2h6OLb4wPg0L766B/suKYxD+d1/x7LVLYTIDa+/mPyt6elGvqg/3WtZvgORGem3KPbD6k5XzWb+dAf9rOfyWbfW4p7AOFPE08wrnBvl62Y7ka/fggiF3HM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pNBmlTGI; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9767BC2BD11; Sat, 11 May 2024 15:23:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715440996; bh=Vk5ReHWzVVjJeH+buVnWLB+fuULLDSItvRQbW8AbVtw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pNBmlTGIn6daiLU288vVV/TlWwLKKGfuE2Bg9yFPEEohed4IRu9FS5OYjh97pxLq9 FYzbpPJVPC1lb2iQKMJaBQtEJRaZZtiuggmTELgk5HLTpq0PAoLGgmCoUlBwHa18in NV54gAJWFRWQaJCHLF/1oxYz2jwd2mEsKB37iqQ72ABQRjBKYkU7HQXYk5729X4M5B C3dddWbsAc20i54UX8k95whjMYp77fq0lZwq2o/6TUXme6P4OslMPy+FGNgOLXJLvQ m9dWFso7541iv5/Hwp9bYhwmHSsHphVhTzn8V3Wqs06YX+4GGsSSHAx6+rpDMJaWKv gvgmCksRbVxRg== Date: Sat, 11 May 2024 16:23:10 +0100 From: Simon Horman To: Jose Ignacio Tornos Martinez Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Isaac Ganoung , Yongqin Liu Subject: Re: [PATCH] net: usb: ax88179_178a: fix link status when link is set to down/up Message-ID: <20240511152310.GL2347895@kernel.org> References: <20240510090846.328201-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: <20240510090846.328201-1-jtornosm@redhat.com> On Fri, May 10, 2024 at 11:08:28AM +0200, Jose Ignacio Tornos Martinez wrote: > The idea was to keep only one reset at initialization stage in order to > reduce the total delay, or the reset from usbnet_probe or the reset from > usbnet_open. > > I have seen that restarting from usbnet_probe is necessary to avoid doing > too complex things. But when the link is set to down/up (for example to > configure a different mac address) the link is not correctly recovered > unless a reset is commanded from usbnet_open. > > So, detect the initialization stage (first call) to not reset from > usbnet_open after the reset from usbnet_probe and after this stage, always > reset from usbnet_open too (when the link needs to be rechecked). > > Apply to all the possible devices, the behavior now is going to be the same. > > cc: stable@vger.kernel.org # 6.6+ > Fixes: 56f78615bcb1 ("net: usb: ax88179_178a: avoid writing the mac address before first reading") > Reported-by: Isaac Ganoung > Reported-by: Yongqin Liu > Signed-off-by: Jose Ignacio Tornos Martinez Reviewed-by: Simon Horman