The size of sc_status[] (the buffer for USB hub's interrupt pipe) will be determined by bNbrPorts in hub descriptor.
The size of sc_status[] (the buffer for USB hub's interrupt pipe) will be
determined by bNbrPorts in hub descriptor.

USB hub sends status packet to host, it contains status bits for each port
and hub itself. So, the packet size is ceil((port + 1) / 8) bytes.

If host requests smaller than that size, the hub behavior is undefined.
Some hub (Intel's RMH for example) sends whole status every time,
it makes babble of USB. This is the reason that uhub_intr() of old code
was suffered from USBD_IOERROR,

Okay deraadt@ and yuo@.

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars