mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
nusb/lib: do not retry port status requests
We want the hub to detect a failed hub as soon as possible, to not delay device detaches.
This commit is contained in:
parent
ebf3e9067d
commit
bada582e18
1 changed files with 7 additions and 0 deletions
|
@ -449,6 +449,13 @@ usbcmd(Dev *d, int type, int req, int value, int index, uchar *data, int count)
|
|||
if(r == 0)
|
||||
werrstr("no data from device");
|
||||
}
|
||||
|
||||
/* don't retry GET_STATUS requests */
|
||||
if(type == (Rd2h|Rclass|Rother)
|
||||
&& req == Rgetstatus
|
||||
&& value == 0)
|
||||
break;
|
||||
|
||||
nerr++;
|
||||
if(*err == 0)
|
||||
rerrstr(err, sizeof(err));
|
||||
|
|
Loading…
Reference in a new issue