nusb: handle sub hubs
This commit is contained in:
parent
e321b1b9d2
commit
9d49fcdb37
2 changed files with 12 additions and 0 deletions
|
@ -1,2 +1,3 @@
|
|||
int startdev(Port*);
|
||||
void work(void);
|
||||
Hub* newhub(char *, Dev *);
|
||||
|
|
|
@ -311,6 +311,17 @@ startdev(Port *p)
|
|||
fprint(2, "okay what?\n");
|
||||
return -1;
|
||||
}
|
||||
if(d->usb->class == Clhub){
|
||||
/*
|
||||
* Hubs are handled directly by this process avoiding
|
||||
* concurrent operation so that at most one device
|
||||
* has the config address in use.
|
||||
* We cancel kernel debug for these eps. too chatty.
|
||||
*/
|
||||
if((p->hub = newhub(d->dir, d)) == nil)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
close(d->dfd);
|
||||
d->dfd = -1;
|
||||
pushevent(formatdev(d));
|
||||
|
|
Loading…
Reference in a new issue