nusb/serial: fix nusb/serial hang with ftdi
have to create process, not a thread in ftdi code so main process can exit after posting fs service.
This commit is contained in:
parent
7a3f0998a0
commit
d1799f65ca
3 changed files with 7 additions and 4 deletions
|
@ -30,6 +30,9 @@ if(! bind -a '#u' /dev)
|
|||
# HUAWEI E220 modem
|
||||
if(~ $2$3 12d11003)
|
||||
nusb/serial $id
|
||||
# FTDI
|
||||
if(~ $2 0403)
|
||||
nusb/serial $id
|
||||
}
|
||||
}
|
||||
fn detach {
|
||||
|
|
|
@ -1470,7 +1470,7 @@ ftinit(Serialport *p)
|
|||
ftdiwrite(p, BMMPSSE|0x0b, 0, FTSETBITMODE);
|
||||
}
|
||||
incref(ser->dev);
|
||||
threadcreate(statusreader, p, 8*1024);
|
||||
proccreate(statusreader, p, 8*1024);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -747,10 +747,10 @@ threadmain(int argc, char* argv[])
|
|||
ser->nifcs = 1;
|
||||
|
||||
/* probe all the drivers */
|
||||
if(plprobe(ser)
|
||||
&& uconsprobe(ser)
|
||||
if(uconsprobe(ser)
|
||||
&& ftprobe(ser)
|
||||
&& slprobe(ser))
|
||||
&& slprobe(ser)
|
||||
&& plprobe(ser))
|
||||
sysfatal("no serial devices found");
|
||||
|
||||
for(i = 0; i < ser->nifcs; i++){
|
||||
|
|
Loading…
Reference in a new issue