From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 D00951FFC59 for ; Tue, 16 Jun 2026 12:37:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781613476; cv=none; b=uqjYS7pPOcLaPoMcI5L05COz6iL0JUAeDI2THmC7P2Zk0fUr/AchE0tf3ywN8wrYw30c1SQoOWTX5xwNn8gNakYIMLxPiK3VgaNGtmvD41/T029qqCnauKKC/UxNnb2K4V8eRGFrVWAJJjAO/WIqI/45604w6dU6ZMzFA6SbrAk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781613476; c=relaxed/simple; bh=Kw6izY/k8F6Vki03UJpa0dp0Zb4oydVWokZik8wIm0U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hzZPL++AH84/l+EZH2p9d2/+gCexC2fiCk2URHTFcW0d3PXbXj2PTJmVoq3ZLcJWfTrLPs2sV1WyxUOZkH03yHRS8FjKmg6E+SRChzCM93AgERtFgJL65tuGAR2GOPtIFZZhcfXQYou698rrUFzWgkWOxXRPy8lqCSDU4c/sxJk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QelHVbWC; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QelHVbWC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF36D1F000E9; Tue, 16 Jun 2026 12:37:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781613475; bh=5Oy424Sj0LX7AKqPFqDzgHyunoDhCO/BF75OQEB7OE0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=QelHVbWCr3gEApPJyMPVPZfr1zOnxFa2AJ38+NGqlCgR2V2XcPtb6cuYKEIa26PCc YPtodlNOGuV0fWlOQrBtV7KZEpWwBX9LNHqsXWxIvpjOqQaU6fkQ/GXfV9yVpB6eYo ozX7XbOHntXIMQC/AEpMU0TTbVt4uRnmyeaZLayUwT4MIlIApH5DoO5lZ8L0WODEyU qEPyHopNUm2cXxCVkDX4m1/SBG6fYLIgSCb4VA+rLWE3S61MBlRXkB9iT5MnYD6VH/ 6nObY1y9JseWsEMB834jDL6D7Cg4pFGrIRnDVhBRwWGDtN/7FCgBoEjyDSSoQfouF6 3WkngWTFRTD/w== Date: Tue, 16 Jun 2026 14:37:53 +0200 From: Lorenzo Bianconi To: Wayen Yan Cc: netdev@vger.kernel.org, horms@kernel.org, pabeni@redhat.com, kuba@kernel.org, edumazet@google.com, andrew+netdev@lunn.ch, angelogioacchino.delregno@collabora.com, matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH v2] [net] net: airoha: Stop TX queues on error path in airoha_dev_open Message-ID: References: <178161146875.2165143.7400860261990016053@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KjNXxW/DJwe/iA3u" Content-Disposition: inline In-Reply-To: <178161146875.2165143.7400860261990016053@gmail.com> --KjNXxW/DJwe/iA3u Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > In airoha_dev_open(), if airoha_set_vip_for_gdm_port() fails after > netif_tx_start_all_queues() has been called, the TX queues remain > started while the device configuration is incomplete. This leaves > the device in an inconsistent state where packets could be > transmitted before the VIP/IFC port configuration is complete. >=20 > Add netif_tx_stop_all_queues() call on the error path to properly > roll back the TX queue state. >=20 > Fixes: 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 = SoC") > Signed-off-by: Wayen Yan > --- > drivers/net/ethernet/airoha/airoha_eth.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ether= net/airoha/airoha_eth.c > index 31cdb11cd7..cf9c366907 100644 > --- a/drivers/net/ethernet/airoha/airoha_eth.c > +++ b/drivers/net/ethernet/airoha/airoha_eth.c > @@ -1715,8 +1715,10 @@ static int airoha_dev_open(struct net_device *dev) > =20 > netif_tx_start_all_queues(dev); > err =3D airoha_set_vip_for_gdm_port(port, true); > - if (err) > + if (err) { > + netif_tx_stop_all_queues(dev); I do not think this is necessary since if ndo_open() callback fails, the net_device is not marked as running. Regards, Lorenzo > return err; > + } > =20 > if (netdev_uses_dsa(dev)) > airoha_fe_set(qdma->eth, REG_GDM_INGRESS_CFG(port->id), > --=20 > 2.51.0 >=20 >=20 --KjNXxW/DJwe/iA3u Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCajFDoQAKCRA6cBh0uS2t rEAgAQDqk/81Cv2VNY0oTfDbvAQ5ag+hMIs4uuDX4yrwGwyhYQEApGYMF3uo83aZ 6wQByjRd9vAzTo8XFHg+hfIKjgRjggY= =c3L7 -----END PGP SIGNATURE----- --KjNXxW/DJwe/iA3u--