Re: [PATCH v4 3/4] usb: xhci: Use update_device overrides for tunnel reporting

From: Thinh Nguyen

Date: Tue Oct 20 2026 - 21:41:42 EST


On Tue, Oct 13, 2026, Konrad Dybcio wrote:
> On 10/3/26 2:30 AM, Thinh Nguyen wrote:
> > On Tue, Sep 29, 2026, Konrad Dybcio wrote:
> >> From: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
> >>
> >> The Thunderbolt framework relies on USB core device links for tunneled
> >> ports, so it needs tunnel state when xHCI updates a device.
> >>
> >> Use the .update_device override for controller-specific tunnel
> >> reporting.
> >>
> >> Assisted-by: LLM
> >> Signed-off-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
> >> ---
>
> [...]
>
> >> #define XHCI_CFC_DELAY 10
> >> @@ -1981,15 +1982,18 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex,
> >> int xhci_hub_status_data(struct usb_hcd *hcd, char *buf);
> >> int xhci_find_raw_port_number(struct usb_hcd *hcd, int port1);
> >> struct xhci_hub *xhci_get_rhub(struct usb_hcd *hcd);
> >> -enum usb_link_tunnel_mode xhci_port_is_tunneled(struct xhci_hcd *xhci,
> >> - struct xhci_port *port);
> >> void xhci_hc_died(struct xhci_hcd *xhci);
> >>
> >> #ifdef CONFIG_PM
> >> +int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev);
> >
> > Why are we putting this inside this PM guard?
>
> It's like that in the original code, before moving xhci_update_device()
> out of its current place
>

Ok. But tunnel detection isn't really PM-specific. With this change
the vendor overrides run regardless of CONFIG_PM. This can be fixed
later in a separate patch.

Reviewed-by: Thinh Nguyen <Thinh.Nguyen@xxxxxxxxxxxx>

Thanks,
Thinh