Re: [PATCH] usb: xhci: xhci_setup_port_arrays: early -ENODEV if maxports is 0.

From: Michał Pecio
Date: Fri Oct 04 2024 - 06:58:02 EST


Hi,

> If the controller reports HCSPARAMS1.maxports==0 then we can skip the
> whole function: it would fail later after doing a bunch of unnecessary
> stuff. It can occur on a buggy hardware (the value is driven by external
> signals).

This function runs once during HC initialization, so what's the benefit
of bypassing it? Does it take unusually long time? Does it panic?

It seems to alreday be written to handle such abnormal cases gracefully.

Regards,
Michal