ref: 608b648f64d54375da8700e82d217b7c3e2e3d03
parent: ed11c46f4bd8bf0b20e4a997d8f1162789aee6ae
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Nov 24 12:18:59 EST 2024
nusbrc: add Prolific and CP2102 serial uart also reorganize the switches: match vid/did first, then generic device class.
--- a/rc/bin/nusbrc
+++ b/rc/bin/nusbrc
@@ -10,30 +10,28 @@
id=$1
if(~ $#* 5 && ! test -e /env/nousbhname)
id=$1:$5
- switch($4){
- case *01
- nusb/audio $id
- case ff0202
- # RNDIS; handled by /sys/src/9/boot/nusbrc
- case *02
- # serial and ethernet
+ switch($2$3){
+ case 12d11003 1a867523 10c4ea60 0403* 1a867523 # HUAWEI, Prolific, CP2102, FTDI, pine64
nusb/serial $id
- # handled /sys/src/9/boot/nusbrc
- # nusb/ether $id
- case *03
- # handled /sys/src/9/boot/nusbrc
- # nusb/kb $id
- case *08
- # handled /sys/src/9/boot/nusbrc
- # nusb/disk $id
- case 010106
- nusb/ptp $id
+ case 59862113
+ nusb/cam $id
case *
- switch($2$3){
- case 12d11003 0403* 1a867523 # HUAWEI, FTDI, pine64
+ switch($4){
+ case *01
+ nusb/audio $id
+ case ff0202
+ # RNDIS; handled by /sys/src/9/boot/nusbrc
+ case *02
+ # serial and ethernet
nusb/serial $id
- case 59862113
- nusb/cam $id
+ case *03
+ # handled /sys/src/9/boot/nusbrc
+ # nusb/kb $id
+ case *08
+ # handled /sys/src/9/boot/nusbrc
+ # nusb/disk $id
+ case 010106
+ nusb/ptp $id
}
}
}
--
⑨