diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-12-06 23:05:24 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-12-06 23:05:24 +0100 |
commit | 23239adf54d11628c1263df067b892130d67650b (patch) | |
tree | 1f2357ff3ae68cd0611f1ed78264a98006375971 /sys/src/9/boot | |
parent | 49c8aed2db34c876ff81da10043fd278256e26db (diff) |
nusb/ether: port drivers for asix and smsc ethernet
Diffstat (limited to 'sys/src/9/boot')
-rwxr-xr-x | sys/src/9/boot/nusbrc | 52 |
1 files changed, 29 insertions, 23 deletions
diff --git a/sys/src/9/boot/nusbrc b/sys/src/9/boot/nusbrc index 955520f66..9a9f70754 100755 --- a/sys/src/9/boot/nusbrc +++ b/sys/src/9/boot/nusbrc @@ -11,30 +11,36 @@ if(! nusb/usbd) @{ rfork ne fn attach { - switch($4){ - case *03 - nusb/kb $1 & - case *02 - nusb/ether $1 & - case *08 - @{ - rfork ne - nusb/disk $1 - cd '#σ/usb' - for(dev in sdU^$1.*) if(test -d $dev) { - diskparts $dev - for(part in $dev/dos* $dev/9fat) if(test -r $part) { - mkdir -m 0700 '#σc/'^$dev || exit - {dossrv -s -f $part &} <[0=1] | - echo 0 >'#σc/'^$dev/dos - exit - } - } - } & + switch($2$3){ + case 0b957720 0b95772a 0db0a877 13b10018 15577720 20013c05 07d13c05 05ac1402 + nusb/ether -t a88772 $etherargs $1 & + case 0b951780 14eaab11 17370039 0411006e 050d5055 + nusb/ether -t a88178 $etherargs $1 & case * - if(~ $2 0424 && ~ $3 ec00){ - # raspberry pi ethernet - nusb/ether $1 & + switch($4){ + case *03 + nusb/kb $1 & + case *02 + # CDC ethernet + nusb/ether $etherargs $1 & + case *08 + @{ + rfork ne + nusb/disk $1 + cd '#σ/usb' + for(dev in sdU^$1.*) if(test -d $dev) { + diskparts $dev + for(part in $dev/dos* $dev/9fat) if(test -r $part) { + mkdir -m 0700 '#σc/'^$dev || exit + {dossrv -s -f $part &} <[0=1] | + echo 0 >'#σc/'^$dev/dos + exit + } + } + } & + case * + if(~ $2 0424) + nusb/ether -t smsc $etherargs $1 & } } } |