]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xhci: Set quirky xHC PCI hosts to D3 _after_ stopping and freeing them.
authorMathias Nyman <mathias.nyman@linux.intel.com>
Thu, 5 Sep 2024 14:32:59 +0000 (17:32 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:51 +0000 (16:29 +0200)
commite29a1f8b74a9ae9c4c70fc4c001b5fed60f7367c
tree5c021cafb21164c7e5bb7a59194eb8435dbd3d6e
parentf7ba350f4e7d5020ae1767d71705e61dae6700bc
xhci: Set quirky xHC PCI hosts to D3 _after_ stopping and freeing them.

commit f81dfa3b57c624c56f2bff171c431bc7f5b558f2 upstream.

PCI xHC host should be stopped and xhci driver memory freed before putting
host to PCI D3 state during PCI remove callback.

Hosts with XHCI_SPURIOUS_WAKEUP quirk did this the wrong way around
and set the host to D3 before calling usb_hcd_pci_remove(dev), which will
access the host to stop it, and then free xhci.

Fixes: f1f6d9a8b540 ("xhci: don't dereference a xhci member after removing xhci")
Cc: stable@vger.kernel.org
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20240905143300.1959279-12-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-pci.c