When plugging and unplugging an adapter continuously, it waits for a timeout
authorkevlo <kevlo@openbsd.org>
Fri, 20 Aug 2021 01:40:51 +0000 (01:40 +0000)
committerkevlo <kevlo@openbsd.org>
Fri, 20 Aug 2021 01:40:51 +0000 (01:40 +0000)
commit05787332bc8ef339be2fe15700ae52b48d4a382d
tree6d30eeaad0c6bdd6ed83d90c5ba8063a7aa31df1
parent1fc2e780d55571580dbdbbc0cb78eb3ca747ae24
When plugging and unplugging an adapter continuously, it waits for a timeout
over and over again.  The problem is that the device has been unplugged,
but the attach handler still issues USB requests via ure_ctl().

The easiest solution is to deactivate the device proactively in
ure_ctl() when we see that error there.

From Christian Ludwig
sys/dev/usb/if_ure.c