Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: xhci: simpilfy resume root hub code

Resume roothubs without checking 'retval' value, as it is always '0'.
Due to changes made in commit 79989bd4ab86 ("xhci: always resume roothubs
if xHC was reset during resume") the check is redundant.

Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://patch.msgid.link/20260402131342.2628648-23-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Niklas Neronin and committed by
Greg Kroah-Hartman
d81a5580 5dfc7f98

+16 -20
+16 -20
drivers/usb/host/xhci.c
··· 1245 1245 1246 1246 xhci_dbc_resume(xhci); 1247 1247 1248 - if (retval == 0) { 1249 - /* 1250 - * Resume roothubs only if there are pending events. 1251 - * USB 3 devices resend U3 LFPS wake after a 100ms delay if 1252 - * the first wake signalling failed, give it that chance if 1253 - * there are suspended USB 3 devices. 1254 - */ 1255 - if (xhci->usb3_rhub.bus_state.suspended_ports || 1256 - xhci->usb3_rhub.bus_state.bus_suspended) 1257 - suspended_usb3_devs = true; 1248 + /* 1249 + * Resume roothubs only if there are pending events. 1250 + * USB 3 devices resend U3 LFPS wake after a 100ms delay if 1251 + * the first wake signalling failed, give it that chance if 1252 + * there are suspended USB 3 devices. 1253 + */ 1254 + if (xhci->usb3_rhub.bus_state.suspended_ports || xhci->usb3_rhub.bus_state.bus_suspended) 1255 + suspended_usb3_devs = true; 1258 1256 1257 + pending_portevent = xhci_pending_portevent(xhci); 1258 + if (suspended_usb3_devs && !pending_portevent && is_auto_resume) { 1259 + msleep(120); 1259 1260 pending_portevent = xhci_pending_portevent(xhci); 1261 + } 1260 1262 1261 - if (suspended_usb3_devs && !pending_portevent && is_auto_resume) { 1262 - msleep(120); 1263 - pending_portevent = xhci_pending_portevent(xhci); 1264 - } 1265 - 1266 - if (pending_portevent) { 1267 - if (xhci->shared_hcd) 1268 - usb_hcd_resume_root_hub(xhci->shared_hcd); 1269 - usb_hcd_resume_root_hub(hcd); 1270 - } 1263 + if (pending_portevent) { 1264 + if (xhci->shared_hcd) 1265 + usb_hcd_resume_root_hub(xhci->shared_hcd); 1266 + usb_hcd_resume_root_hub(hcd); 1271 1267 } 1272 1268 1273 1269 /*