答复: 答复: 答复: [PATCH] xhci: sideband: check vdev liveness before removing endpoints on unregister

From: 胡连勤

Date: Wed Oct 07 2026 - 23:25:13 EST


Hi Mathias,

> I'd probably still go with !virt_dev->sideband
>
> !udev->reset_resume && !udev->reset_in_progress will prevent recovery of 'address
> device' failure of ordinary, non-sideband usb devices that need to be reset at resume.
>

You're right, !reset_resume && !reset_in_progress is too broad — it
would also block recovery for non-sideband devices during resume.

We'll go with !virt_dev->sideband. We've tested it and confirmed it
covers both paths for sideband devices:
- usb_reset_device(): pre_reset() unregisters sideband first, so
!virt_dev->sideband is true and normal recovery proceeds (safe).
- finish_port_resume(): sideband still registered, so free_slot is
skipped, keeping vdev valid for xhci_sideband_unregister().

Thanks for the fix.

Regards,
Lianqin