From mboxrd@z Thu Jan 1 00:00:00 1970 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 042E013B7A1; Mon, 14 Oct 2024 14:29:08 +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=1728916149; cv=none; b=h8/qfs5wPkx6LFcQFE9WWXeLeL1E++bbC+IfEWj9upsGr9kFsLuBnbP5f1sKnO6CoRfT+JXUMa6NClAWYNzAJJF/Dvcf4dkL2EBdbIrihF0z2C3v3/TIVT7b6QAIO9UmAWESBkFTlhEg7uFZfbhBBnUK6od/io5TKzt8ERjo0Wk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728916149; c=relaxed/simple; bh=2He5T2YzNF2DG7xKxFD+d1zxG7PaRgky+o90XoG4lhg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SUy9+wTO9c6RV8TGZCZhvtyLgmMI1QT26J/tJBxz6KsgBizcI+XKAkEEqmq20pu/ICbQ+pJ007cJDYdhYixzzGuQGileM7Vkw49GXgnBv/Iwl/FXgVeleK9Z2oSFLuCfO/DblqDLOb+3+shuJeIEk++d0a1RR8XTKYSaohDLzmg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=l3Bxkvdj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="l3Bxkvdj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19937C4CECF; Mon, 14 Oct 2024 14:29:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1728916148; bh=2He5T2YzNF2DG7xKxFD+d1zxG7PaRgky+o90XoG4lhg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l3Bxkvdj56gunKbIoYkRgz7tUSBRrwv/8ps/uG1VhBxpR1iWgPfIJu89XsFez1UQ/ EonFfmZtZB9FznuOYSH3DZ/YsHV0kfsT40f/F79urJhaUMu2DHgbz2BPUCD6xnjyGA pwMLlVTGcVOZ54212geetucuP4NjneJZ3ERszcrU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Xu Yang , Peter Chen , Sasha Levin Subject: [PATCH 6.11 057/214] usb: chipidea: udc: enable suspend interrupt after usb reset Date: Mon, 14 Oct 2024 16:18:40 +0200 Message-ID: <20241014141047.214734341@linuxfoundation.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241014141044.974962104@linuxfoundation.org> References: <20241014141044.974962104@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.11-stable review patch. If anyone has any objections, please let me know. ------------------ From: Xu Yang [ Upstream commit e4fdcc10092fb244218013bfe8ff01c55d54e8e4 ] Currently, suspend interrupt is enabled before pullup enable operation. This will cause a suspend interrupt assert right after pullup DP. This suspend interrupt is meaningless, so this will ignore such interrupt by enable it after usb reset completed. Signed-off-by: Xu Yang Acked-by: Peter Chen Link: https://lore.kernel.org/r/20240823073832.1702135-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/chipidea/udc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 2d7f616270c17..69ef3cd8d4f83 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -86,7 +86,7 @@ static int hw_device_state(struct ci_hdrc *ci, u32 dma) hw_write(ci, OP_ENDPTLISTADDR, ~0, dma); /* interrupt, error, port change, reset, sleep/suspend */ hw_write(ci, OP_USBINTR, ~0, - USBi_UI|USBi_UEI|USBi_PCI|USBi_URI|USBi_SLI); + USBi_UI|USBi_UEI|USBi_PCI|USBi_URI); } else { hw_write(ci, OP_USBINTR, ~0, 0); } @@ -877,6 +877,7 @@ __releases(ci->lock) __acquires(ci->lock) { int retval; + u32 intr; spin_unlock(&ci->lock); if (ci->gadget.speed != USB_SPEED_UNKNOWN) @@ -890,6 +891,11 @@ __acquires(ci->lock) if (retval) goto done; + /* clear SLI */ + hw_write(ci, OP_USBSTS, USBi_SLI, USBi_SLI); + intr = hw_read(ci, OP_USBINTR, ~0); + hw_write(ci, OP_USBINTR, ~0, intr | USBi_SLI); + ci->status = usb_ep_alloc_request(&ci->ep0in->ep, GFP_ATOMIC); if (ci->status == NULL) retval = -ENOMEM; -- 2.43.0