From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796131394; b=PA0lVhpHGmZZgpYlCemr9qMoyQtw0DIrYzrL4BsJAQEiQRaEIrKINZPRVT6Jh6OOHeOr 7C1G06cSXoJ3RtqJHX0h8Dpi5yG49O9df3Yo2478cN5DZmClP8fzQTfbYskBE3lRPGqKU zPmqq3seZgKleTk5VuB2l1gz0noELqQB9lvPfsNExveJ76D20JvDaY2UPMZa6TnMphVPI IkaFM/pn/LeEnR38C19YUmTIiwz+OZhIfvzUTvR+PjOE+VpMdn8Wk2COoYlEqlz5vitnX nsL43r8gLmrCwRTtCRZMLzTo3oI5QEeB2Y6Pg66kLKdE3Tl61P/q0Hiqxl+gFomL6Fw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796131394; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=YmQNMT1hOYM+0V607SR0LMzd+hc4/+eVAvEakMsAjcQ=; b=1Mmh+RAlZRpk9AYtLMi2nzNK0MhE37PYDu0NfV72z42gH/D3d7Jc0D2Oy01RSAKiVDUK 8F45EKgyQYpKmlvkBU3VAFEZ6j54vO9Q8YFO3uanGuYhXR7ru0JVzGZUz1JRFd6jY+QX2 0LdowB9gYRrzuyt6Wj12Entt9qbSyAFe1bM1/ATEUBSliUYyiOD7C4zSIwRKA2ZM9W8QX DFTnsJUAIT7M+xlhFDqpD2gyCOdVE6kji2lPiGlGupcZ8hRceC3ewMwTNdAm0nmjJjFAk 2NXiSROCuiU2cR3sw600su1oN2GBIb45PRiW2EEgXq7YoN2Fg7HCF0tT1IWuB/yioog== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Rdm8ZmQx; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1EF40606A31A for ; Tue, 1 Dec 2026 13:23:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Rdm8ZmQx Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F5091F00A02; Tue, 1 Dec 2026 13:23:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796131393; bh=YmQNMT1hOYM+0V607SR0LMzd+hc4/+eVAvEakMsAjcQ=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Rdm8ZmQxYWIdDNilgIFmFhTNj3NaENJNVCmSZA6h4yRbvQTE9AGFhNxRJ2xxYir5F RGK7IQTgF5yQY2JeJRmatCL5Zl4yBi6jhrjTLxk+2ULmOHjzs/SNplhecBWGBGPXvz YjIlGNJt3qckYQV1xes9xCtMIQCkcExRTd63j75EiRVyH3ZNZwOfkKRrm+lYCIIQsM 6mARvc0AW9KbR41NIML7fRlS1bb+NipZzaVXxWP6F/fnjFSPd12aflOY3WyU69aCW2 bIBODfvkLabjcK8gNieanjynRx8IfaFWaZoLqu3imuycKcRJyb6J7JU0RaSeUTroGE V1u/Mv8CqlnUw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 3/3] usb: gadget: fsl_udc: Register IRQ after allocating controller resources Reply-To: sashiko-reviews@lists.linux.dev To: "Wanhui Fu" Cc: linux-usb@vger.kernel.org In-Reply-To: <20261201131501.3418743-4-fuwh1120@163.com> References: <20261201131501.3418743-1-fuwh1120@163.com> <20261201131501.3418743-4-fuwh1120@163.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 13:23:13 +0000 X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found no new issues in this patch, but noticed 1 related pre-existing issue it does not introduce: - [High] usb: gadget: fsl-udc: uninitialized max_pipes in reset_queues() [1] -- commit 1498c3fab6f8a6458d770db0f7756b50a41cfe18 Author: Wanhui Fu usb: gadget: fsl_udc: Register IRQ after allocating controller resources This commit moves request_irq() in fsl_udc_probe() to run after struct_udc_setup() and dma_pool_create() so that resources are allocated before the interrupt handler is registered and cleaned up in reverse order on failure. > diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/u= dc/fsl_udc_core.c > index bf30c64e4983e..398a4c19e86de 100644 > --- a/drivers/usb/gadget/udc/fsl_udc_core.c > +++ b/drivers/usb/gadget/udc/fsl_udc_core.c > @@ -2451,22 +2451,14 @@ static int fsl_udc_probe(struct platform_device *= pdev) > } > udc_controller->irq =3D ret; > =20 > - ret =3D request_irq(udc_controller->irq, fsl_udc_irq, IRQF_SHARED, > - driver_name, udc_controller); > - if (ret !=3D 0) { > - dev_err(&pdev->dev, "cannot request irq %d err %d\n", > - udc_controller->irq, ret); > - goto err_exit; > - } > - > /* Initialize the udc structure including QH member and other member */ > if (struct_udc_setup(udc_controller, pdev)) { > dev_err(&pdev->dev, "Can't initialize udc data structure\n"); > ret =3D -ENOMEM; > - goto err_free_irq; > + goto err_exit; > } [Severity: High] This problem wasn't introduced by this patch, but fsl_udc_probe() only initializes udc_controller->max_ep and leaves udc_controller->max_pipes as 0 [1]. When a USB bus reset or disconnect calls reset_queues(), does the loop over udc->max_pipes exit without calling udc_reset_ep_queue()? drivers/usb/gadget/udc/fsl_udc_core.c:reset_queues() { for (pipe =3D 0; pipe < udc->max_pipes; pipe++) udc_reset_ep_queue(udc, pipe); } Because no endpoint queues are flushed, pending USB requests are leaked without completion callbacks and later re-enumerations run against unreset endpoint state. [1] https://sashiko.dev/#/bug/linux-83376ec3-eefe-439e-9525-12d77a7d272b --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201131501.3418= 743-1-fuwh1120@163.com?part=3D3