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 2E486335BA9; Mon, 18 Aug 2025 13:53:32 +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=1755525212; cv=none; b=ayk8z5y9QgGZXQpgaE415KNxskXNMClytOlgijk+zlRXM6qmGu2GAHRhWlVKw/LD2IwxzBvfvut5t4S30bOqfxXWWYltHseRqAmlsUrDfF676Srf/t/VifbJPwBgqCZLQFIhKMxGFUvnqJ23ZebP2Lcs5kNvFI8wn9DdJKA5NF4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755525212; c=relaxed/simple; bh=01NtwRO61eDq3ZYOWLVjQ8ZmfmS5j1/Pr/6ibXH1ZoM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TShKJlcrY0JIo9XhpFZo8YE3KgPxf1kHrsVdUBop/39bof/hrHtF+nvlckfJckH6xh0x9wd1QZD5Zcd9bTI5QPvZupaGktTfct4vZ4HIgYjUCCdDFC9oSNd3AoUDJmRZj/4JrrSSRPyVtmA8xufxd/wSRv6t12pP5oZR00N1FKc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KSDLXzcm; 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="KSDLXzcm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A422EC4CEEB; Mon, 18 Aug 2025 13:53:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755525212; bh=01NtwRO61eDq3ZYOWLVjQ8ZmfmS5j1/Pr/6ibXH1ZoM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KSDLXzcmOCZo3Mpl9W0ERnbi8lgnunB8HQTAZJ0fYRw4B6YqnuQbWDTXWWREcDQBL AYluwe87z855PVUmtTlJGs3Ftixz+JL2mQFMbWgivZ7+pYklL0HeOd9y0lp2HbaFJ6 MI7oGMNw74CbtpwjoAKiLFD/SDng5wZOhh3e1nzY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Radhey Shyam Pandey , Thinh Nguyen , Sasha Levin Subject: [PATCH 6.16 193/570] usb: dwc3: xilinx: add shutdown callback Date: Mon, 18 Aug 2025 14:43:00 +0200 Message-ID: <20250818124513.236204155@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250818124505.781598737@linuxfoundation.org> References: <20250818124505.781598737@linuxfoundation.org> User-Agent: quilt/0.68 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.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Radhey Shyam Pandey [ Upstream commit 70627bf82e36e61c40c3315e1206e4ea4c02e668 ] Adds a shutdown callback to ensure that the XHCI stack is properly shutdown in reboot/shutdown path. In kexec flow, kernel_restart_prepare() performs actions necessary to prepare the system for a restart and invokes device_shutdown. To ensure proper shutdown attach the dwc3 shutdown implementation which mirrors the remove method. $ kexec -e xhci-hcd xhci-hcd.0.auto: remove, state 1 usb usb1: USB disconnect, device number 1 usb 1-1: USB disconnect, device number 6 xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered kexec_core: Starting new kernel Signed-off-by: Radhey Shyam Pandey Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/1748977771-714153-1-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/dwc3/dwc3-xilinx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/dwc3-xilinx.c b/drivers/usb/dwc3/dwc3-xilinx.c index 4ca7f6240d07..09c3c5c226ab 100644 --- a/drivers/usb/dwc3/dwc3-xilinx.c +++ b/drivers/usb/dwc3/dwc3-xilinx.c @@ -422,6 +422,7 @@ static const struct dev_pm_ops dwc3_xlnx_dev_pm_ops = { static struct platform_driver dwc3_xlnx_driver = { .probe = dwc3_xlnx_probe, .remove = dwc3_xlnx_remove, + .shutdown = dwc3_xlnx_remove, .driver = { .name = "dwc3-xilinx", .of_match_table = dwc3_xlnx_of_match, -- 2.39.5