From: Sascha Wildner Date: Sat, 8 Nov 2014 00:10:28 +0000 (+0100) Subject: usb4bsd: Port aue(4), cue(4), ipheth(4) and kue(4) USB ethernet drivers. X-Git-Tag: v4.2.0rc~1533 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/79be21c50ccfda571219a61d1430ee7a533344d7 usb4bsd: Port aue(4), cue(4), ipheth(4) and kue(4) USB ethernet drivers. Also sync them with FreeBSD's current code. aue(4), cue(4) and kue(4) were available with oldusb. ipheth(4) is a new driver. This commit adds support for 105 devices. Still missing from our net/ category are cdce(4), rue(4), uhso(4) and usie(4). Taken-from-and-thanks-to: FreeBSD --- diff --git a/Makefile_upgrade.inc b/Makefile_upgrade.inc index f391e94116..eec67ee79c 100644 --- a/Makefile_upgrade.inc +++ b/Makefile_upgrade.inc @@ -2727,9 +2727,6 @@ TO_REMOVE+=/usr/share/man/man4/ural.4.gz # Clean up old USB stuff when the new stack is requested # and vice versa .if !defined(WANT_OLDUSB) -TO_REMOVE+=/boot/kernel/if_aue.ko -TO_REMOVE+=/boot/kernel/if_cue.ko -TO_REMOVE+=/boot/kernel/if_kue.ko TO_REMOVE+=/boot/kernel/if_lgue.ko TO_REMOVE+=/boot/kernel/if_rue.ko TO_REMOVE+=/boot/kernel/moscom.ko @@ -2769,6 +2766,7 @@ TO_REMOVE+=/usr/share/man/man5/usbd.conf.5.gz TO_REMOVE+=/usr/share/man/man8/usbd.8.gz TO_REMOVE+=/usr/share/man/man8/usbdevs.8.gz .else +TO_REMOVE+=/boot/kernel/if_ipheth.ko TO_REMOVE+=/boot/kernel/if_mos.ko TO_REMOVE+=/boot/kernel/if_rum.ko TO_REMOVE+=/boot/kernel/if_run.ko @@ -3031,12 +3029,14 @@ TO_REMOVE+=/usr/share/man/cat3/usb_set_altinterface.3.gz TO_REMOVE+=/usr/share/man/cat3/usb_set_configuration.3.gz TO_REMOVE+=/usr/share/man/cat3/usb_set_debug.3.gz TO_REMOVE+=/usr/share/man/cat3/usb_strerror.3.gz +TO_REMOVE+=/usr/share/man/cat4/if_ipheth.4.gz TO_REMOVE+=/usr/share/man/cat4/if_mos.4.gz TO_REMOVE+=/usr/share/man/cat4/if_rum.4.gz TO_REMOVE+=/usr/share/man/cat4/if_run.4.gz TO_REMOVE+=/usr/share/man/cat4/if_udav.4.gz TO_REMOVE+=/usr/share/man/cat4/if_urndis.4.gz TO_REMOVE+=/usr/share/man/cat4/if_urtwn.4.gz +TO_REMOVE+=/usr/share/man/cat4/ipheth.4.gz TO_REMOVE+=/usr/share/man/cat4/mos.4.gz TO_REMOVE+=/usr/share/man/cat4/rum.4.gz TO_REMOVE+=/usr/share/man/cat4/run.4.gz @@ -3246,12 +3246,14 @@ TO_REMOVE+=/usr/share/man/man3/usb_set_altinterface.3.gz TO_REMOVE+=/usr/share/man/man3/usb_set_configuration.3.gz TO_REMOVE+=/usr/share/man/man3/usb_set_debug.3.gz TO_REMOVE+=/usr/share/man/man3/usb_strerror.3.gz +TO_REMOVE+=/usr/share/man/man4/if_ipheth.4.gz TO_REMOVE+=/usr/share/man/man4/if_mos.4.gz TO_REMOVE+=/usr/share/man/man4/if_rum.4.gz TO_REMOVE+=/usr/share/man/man4/if_run.4.gz TO_REMOVE+=/usr/share/man/man4/if_udav.4.gz TO_REMOVE+=/usr/share/man/man4/if_urndis.4.gz TO_REMOVE+=/usr/share/man/man4/if_urtwn.4.gz +TO_REMOVE+=/usr/share/man/man4/ipheth.4.gz TO_REMOVE+=/usr/share/man/man4/mos.4.gz TO_REMOVE+=/usr/share/man/man4/rum.4.gz TO_REMOVE+=/usr/share/man/man4/run.4.gz diff --git a/etc/devd/usb.conf b/etc/devd/usb.conf index 50b0397fc0..bad52da8c1 100644 --- a/etc/devd/usb.conf +++ b/etc/devd/usb.conf @@ -19,6 +19,14 @@ nomatch 32 { action "kldload -n uep"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x03e8"; + match "product" "0x0008"; + action "kldload -n if_kue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -75,6 +83,14 @@ nomatch 32 { action "kldload -n uipaq"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x03f0"; + match "product" "0x811c"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -107,6 +123,14 @@ nomatch 32 { action "kldload -n uipaq"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0411"; + match "product" "(0x0001|0x0005|0x0009)"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -179,6 +203,14 @@ nomatch 32 { action "kldload -n uplcom"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0423"; + match "product" "(0x000a|0x000c)"; + action "kldload -n if_cue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -203,6 +235,14 @@ nomatch 32 { action "kldload -n uplcom"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x045e"; + match "product" "0x007a"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -307,6 +347,22 @@ nomatch 32 { action "kldload -n uplcom"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x04bb"; + match "product" "0x0901"; + action "kldload -n if_kue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x04bb"; + match "product" "(0x0904|0x0913)"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -443,6 +499,22 @@ nomatch 32 { action "kldload -n uipaq"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0506"; + match "product" "(0x03e8|0x11f8)"; + action "kldload -n if_kue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0506"; + match "product" "0x4601"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -459,6 +531,14 @@ nomatch 32 { action "kldload -n umct"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x050d"; + match "product" "0x0121"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -587,6 +667,22 @@ nomatch 32 { action "kldload -n uplcom"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0557"; + match "product" "0x2002"; + action "kldload -n if_kue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0557"; + match "product" "0x2007"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -603,6 +699,14 @@ nomatch 32 { action "kldload -n if_axe"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0557"; + match "product" "0x4000"; + action "kldload -n if_kue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -619,6 +723,14 @@ nomatch 32 { action "kldload -n ubsa"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0565"; + match "product" "(0x0002|0x0003|0x0005)"; + action "kldload -n if_kue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -627,6 +739,14 @@ nomatch 32 { action "kldload -n ubsa"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x056e"; + match "product" "(0x200c|0x4002|0x4005|0x400b|0x4010)"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -635,6 +755,14 @@ nomatch 32 { action "kldload -n uplcom"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x056e"; + match "product" "0xabc1"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -715,6 +843,14 @@ nomatch 32 { action "kldload -n u3g"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x05cc"; + match "product" "0x3000"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -731,6 +867,38 @@ nomatch 32 { action "kldload -n uipaq"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x05e9"; + match "product" "(0x0008|0x0009)"; + action "kldload -n if_kue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x066b"; + match "product" "(0x200c|0x2202)"; + action "kldload -n if_aue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x066b"; + match "product" "0x2202"; + action "kldload -n if_kue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x066b"; + match "product" "(0x2203|0x2204|0x2206|0x400b)"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -739,6 +907,14 @@ nomatch 32 { action "kldload -n uplcom"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x067c"; + match "product" "0x1001"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -747,6 +923,14 @@ nomatch 32 { action "kldload -n uipaq"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x06e1"; + match "product" "(0x0008|0x0009)"; + action "kldload -n if_kue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -771,6 +955,22 @@ nomatch 32 { action "kldload -n if_urtwn"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0707"; + match "product" "0x0100"; + action "kldload -n if_kue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0707"; + match "product" "(0x0200|0x0201)"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -851,6 +1051,30 @@ nomatch 32 { action "kldload -n uplcom"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x07a6"; + match "product" "(0x07c2|0x0986|0x8511|0x8513|0x8515)"; + action "kldload -n if_aue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x07aa"; + match "product" "0x0001"; + action "kldload -n if_kue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x07aa"; + match "product" "(0x0004|0x000d)"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -899,6 +1123,14 @@ nomatch 32 { action "kldload -n if_udav"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x07b8"; + match "product" "(0x110c|0x200c)"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -907,6 +1139,22 @@ nomatch 32 { action "kldload -n if_run"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x07b8"; + match "product" "0x4000"; + action "kldload -n if_kue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x07b8"; + match "product" "(0x4002|0x4003|0x4004|0x4007|0x400b|0x400c|0x4102|0x4104)"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -923,6 +1171,14 @@ nomatch 32 { action "kldload -n if_urtwn"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x07b8"; + match "product" "0xabc1"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -931,6 +1187,14 @@ nomatch 32 { action "kldload -n if_rum"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x07c9"; + match "product" "0xb100"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -987,6 +1251,14 @@ nomatch 32 { action "kldload -n uplcom"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x083a"; + match "product" "(0x1046|0x5046)"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -995,6 +1267,22 @@ nomatch 32 { action "kldload -n if_run"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0846"; + match "product" "(0x1001|0x1002)"; + action "kldload -n if_kue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0846"; + match "product" "0x1020"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -1019,6 +1307,14 @@ nomatch 32 { action "kldload -n uftdi"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x085a"; + match "product" "(0x0008|0x0009)"; + action "kldload -n if_kue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -1027,6 +1323,38 @@ nomatch 32 { action "kldload -n if_axe"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x087d"; + match "product" "0x5704"; + action "kldload -n if_kue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x08d1"; + match "product" "0x0001"; + action "kldload -n if_cue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x08d1"; + match "product" "0x0003"; + action "kldload -n if_aue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x08dd"; + match "product" "(0x0986|0x0987|0x0988|0x8511)"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -1107,6 +1435,30 @@ nomatch 32 { action "kldload -n uipaq"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0951"; + match "product" "0x0008"; + action "kldload -n if_kue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0951"; + match "product" "0x000a"; + action "kldload -n if_aue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x095a"; + match "product" "0x3003"; + action "kldload -n if_kue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -1203,6 +1555,14 @@ nomatch 32 { action "kldload -n uipaq"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0b39"; + match "product" "0x0109"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -1363,6 +1723,14 @@ nomatch 32 { action "kldload -n if_rum"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0db7"; + match "product" "0x0002"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -1451,6 +1819,14 @@ nomatch 32 { action "kldload -n if_urtwn"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0e66"; + match "product" "0x400c"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -1595,6 +1971,14 @@ nomatch 32 { action "kldload -n if_urtwn"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x1044"; + match "product" "0x8002"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -1659,6 +2043,14 @@ nomatch 32 { action "kldload -n uslcom"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x10bd"; + match "product" "0x1427"; + action "kldload -n if_kue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -1835,6 +2227,14 @@ nomatch 32 { action "kldload -n uvisor"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x1342"; + match "product" "0x0204"; + action "kldload -n if_kue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -1875,6 +2275,14 @@ nomatch 32 { action "kldload -n if_run"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x13d2"; + match "product" "0x0400"; + action "kldload -n if_kue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -1931,6 +2339,14 @@ nomatch 32 { action "kldload -n if_run"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x1485"; + match "product" "(0x0001|0x0002)"; + action "kldload -n if_kue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -2043,6 +2459,14 @@ nomatch 32 { action "kldload -n if_run"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x15e8"; + match "product" "(0x9100|0x9110)"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -2067,6 +2491,14 @@ nomatch 32 { action "kldload -n if_rum"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x1645"; + match "product" "(0x0005|0x0008|0x8005)"; + action "kldload -n if_kue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -2419,6 +2851,14 @@ nomatch 32 { action "kldload -n if_axe"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x2001"; + match "product" "0x200c"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -2443,6 +2883,22 @@ nomatch 32 { action "kldload -n if_run"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x2001"; + match "product" "0x4000"; + action "kldload -n if_kue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x2001"; + match "product" "(0x4001|0x4002|0x4003|0x400b|0x4102|0xabc1)"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -2547,6 +3003,14 @@ nomatch 32 { action "kldload -n uplcom"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x3334"; + match "product" "0x1701"; + action "kldload -n if_aue"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -2771,6 +3235,16 @@ nomatch 32 { action "kldload -n uslcom"; }; +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x05ac"; + match "intclass" "0xff"; + match "intsubclass" "0xfd"; + match "intprotocol" "0x01"; + action "kldload -n if_ipheth"; +}; + nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; @@ -2909,5 +3383,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 1426 USB entries processed +# 1531 USB entries processed diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index c27aa4f7f9..621aecb239 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -533,6 +533,7 @@ MLINKS+=xl.4 if_xl.4 .if !defined(WANT_OLDUSB) MAN+= \ + ipheth.4 \ mos.4 \ rum.4 \ run.4 \ @@ -553,6 +554,7 @@ MAN+= \ usfs.4 \ u3g.4 \ xhci.4 +MLINKS+=ipheth.4 if_ipheth.4 MLINKS+=mos.4 if_mos.4 MLINKS+=rum.4 if_rum.4 MLINKS+=run.4 if_run.4 diff --git a/share/man/man4/aue.4 b/share/man/man4/aue.4 index 13e806a2d6..cabce63de3 100644 --- a/share/man/man4/aue.4 +++ b/share/man/man4/aue.4 @@ -28,34 +28,44 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/aue.4,v 1.7.2.7 2003/02/17 21:20:39 trhodes Exp $ +.\" $FreeBSD: head/share/man/man4/aue.4 267938 2014-06-26 21:46:14Z bapt $ .\" -.Dd December 25, 1999 +.Dd November 10, 2014 .Dt AUE 4 .Os .Sh NAME .Nm aue .Nd ADMtek AN986 Pegasus USB Ethernet driver .Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent .Cd "device uhci" .Cd "device ohci" -.Cd "device oldusb" +.Cd "device usb" .Cd "device miibus" .Cd "device aue" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_aue_load="YES" +.Ed .Sh DESCRIPTION The .Nm -driver provides support for USB ethernet adapters based on the ADMtek -AN986 Pegasus chipset, including the LinkSys USB100TX, the Billionton -Systems USB100, the Melco Inc. LU-ATX, the D-Link DSB-650TX, the -SMC 2202USB, and those LinkSys USB10T adapters that contain the +driver provides support for USB Ethernet adapters based on the ADMtek AN986 Pegasus chipset. +.Pp The LinkSys USB10T adapters that contain the AN986 Pegasus chipset will operate at 100Base-TX and full-duplex. .Pp The Pegasus contains a 10/100 -ethernet MAC with MII interface and is designed to work with both -ethernet and HomePNA transceivers. +Ethernet MAC with MII interface and is designed to work with both +Ethernet and HomePNA transceivers. Although designed to interface with 100Mbps peripherals, the existing USB standard specifies a maximum transfer speed of 12Mbps. @@ -90,7 +100,7 @@ implies .Ar half-duplex mode. .It 100baseTX -Set 100Mbps (fast ethernet) operation. +Set 100Mbps (Fast Ethernet) operation. The .Ar mediaopt option can also be used to enable @@ -115,6 +125,54 @@ half duplex mode if this media option is not specified. .Pp For more information on configuring this device, see .Xr ifconfig 8 . +.Sh HARDWARE +Adapters supported by the +.Nm +driver include: +.Pp +.Bl -bullet -compact +.It +Abocom UFE1000, DSB650TX_NA +.It +Accton USB320-EC, SpeedStream +.It +ADMtek AN986, AN8511 +.It +Billionton USB100, USB100LP, USB100EL, USBE100 +.It +Corega Ether FEther USB-T, FEther USB-TX, FEther USB-TXS +.It +D-Link DSB-650, DSB-650TX, DSB-650TX-PNA +.It +Elecom LD-USBL/TX +.It +Elsa Microlink USB2Ethernet +.It +HP hn210e +.It +I-O Data USB ETTX +.It +Kingston KNU101TX +.It +LinkSys USB10T adapters that contain the AN986 Pegasus chipset, +USB10TA, USB10TX, USB100TX, USB100H1 +.It +MELCO LUA-TX, LUA2-TX +.It +Netgear FA101 +.It +Planex UE-200TX +.It +Sandberg USB to Network Link (model number 133-06) +.It +Siemens Speedstream +.It +SmartBridges smartNIC +.It +SMC 2202USB +.It +SOHOware NUB100 +.El .Sh DIAGNOSTICS .Bl -diag .It "aue%d: watchdog timeout" @@ -125,6 +183,7 @@ before a timeout expired. The driver failed to allocate an mbuf for the receiver ring. .El .Sh SEE ALSO +.Xr altq 4 , .Xr arp 4 , .Xr ifmedia 4 , .Xr miibus 4 , diff --git a/share/man/man4/cue.4 b/share/man/man4/cue.4 index 627b74ae6f..61ca3549c0 100644 --- a/share/man/man4/cue.4 +++ b/share/man/man4/cue.4 @@ -28,39 +28,65 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/cue.4,v 1.7.2.10 2004/03/01 09:23:45 brueffer Exp $ +.\" $FreeBSD: head/share/man/man4/cue.4 267938 2014-06-26 21:46:14Z bapt $ .\" -.Dd January 13, 2000 +.Dd November 10, 2014 .Dt CUE 4 .Os .Sh NAME .Nm cue -.Nd CATC USB-EL1210A USB Ethernet driver +.Nd "CATC USB-EL1210A USB Ethernet driver" .Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent .Cd "device uhci" .Cd "device ohci" -.Cd "device oldusb" +.Cd "device usb" .Cd "device cue" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_cue_load="YES" +.Ed .Sh DESCRIPTION The .Nm -driver provides support for USB ethernet adapters based on the Computer -Access Technology Corporation's USB-EL1210A chipset, including the -CATC Netmate and Netmate II, the Belkin F5U011/F5U111, and the -SmartBridges SmartLink. +driver provides support for USB Ethernet adapters based on the Computer +Access Technology Corporation's USB-EL1210A chipset. .Pp The USB-EL1210A supports a 512-bit multicast hash filter, single perfect filter entry for the station address and promiscuous mode. Packets are received and transmitted over separate USB bulk transfer endpoints. .Pp -The CATC adapter supports only 10mbps half-duplex mode, hence there +The CATC chipset supports only 10Mbps half-duplex mode, hence there are no .Xr ifmedia 4 modes to select. .Pp For more information on configuring this device, see .Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports CATC USB-EL1210A based USB Ethernet +adapters including: +.Pp +.Bl -bullet -compact +.It +Belkin F5U011/F5U111 +.It +CATC Netmate +.It +CATC Netmate II +.It +SmartBridges SmartLink +.El .Sh DIAGNOSTICS .Bl -diag .It "cue%d: watchdog timeout" @@ -72,6 +98,7 @@ The driver failed to allocate an mbuf for the receiver ring. .El .Sh SEE ALSO .Xr arp 4 , +.Xr ifmedia 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr ifconfig 8 diff --git a/share/man/man4/ipheth.4 b/share/man/man4/ipheth.4 new file mode 100644 index 0000000000..fc50a09f5e --- /dev/null +++ b/share/man/man4/ipheth.4 @@ -0,0 +1,106 @@ +.\" Copyright (c) 2014 Gavin Atkinson +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" +.\" - Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" - Redistributions in binary form must reproduce the above +.\" copyright notice, this list of conditions and the following +.\" disclaimer in the documentation and/or other materials provided +.\" with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD: head/share/man/man4/ipheth.4 272294 2014-09-30 05:36:16Z gavin $ +.\" +.Dd November 10, 2014 +.Dt IPHETH 4 +.Os +.Sh NAME +.Nm ipheth +.Nd "USB Apple iPhone/iPad tethered Ethernet driver" +.Sh SYNOPSIS +To load the driver as a module at boot time, place the +following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ipheth_load="YES" +.Ed +.Pp +Alternatively, to compile this driver into the kernel, place the +following lines in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device uhci" +.Cd "device ohci" +.Cd "device usb" +.Cd "device ipheth" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for network access through Apple +iPhone and iPad devices, often referred to as USB tethering. +.Pp +.Nm +should work with any Apple iPhone or iPad device. +In most cases this must be explicitly enabled on the device first. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +The device does not support different media types or options. +.Sh HARDWARE +The following devices are supported by the +.Nm +driver: +.Pp +.Bl -bullet -compact +.It +Apple iPhone tethering (all models) +.It +Apple iPad tethering (all models) +.El +.Sh SEE ALSO +.Xr arp 4 , +.\".Xr cdce 4 , +.Xr intro 4 , +.Xr netintro 4 , +.Xr urndis 4 , +.Xr usb 4 , +.Xr ifconfig 8 +.Xr usbconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 8.2 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Hans Petter Selasky Aq Mt hselasky@FreeBSD.org . +.Sh BUGS +Some devices may need to be manually configured to use an alternative +configuration with the +.Xr usbconfig 8 +utility. +A command similar to +.Dl usbconfig -u 1 -a 2 set_config 3 +may be required if the device is not recognised automatically by +.Nm +after it is connected. + diff --git a/share/man/man4/kue.4 b/share/man/man4/kue.4 index 8407eed353..0bbb5533f0 100644 --- a/share/man/man4/kue.4 +++ b/share/man/man4/kue.4 @@ -28,40 +28,89 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/kue.4,v 1.7.2.7 2003/02/17 21:20:39 trhodes Exp $ +.\" $FreeBSD: head/share/man/man4/kue.4 267938 2014-06-26 21:46:14Z bapt $ .\" -.Dd January 4, 2000 +.Dd November 10, 2014 .Dt KUE 4 .Os .Sh NAME .Nm kue -.Nd Kawasaki LSI KL5KUSB101B USB Ethernet driver +.Nd "Kawasaki LSI KL5KUSB101B USB Ethernet driver" .Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent .Cd "device uhci" .Cd "device ohci" -.Cd "device oldusb" +.Cd "device usb" .Cd "device kue" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_kue_load="YES" +.Ed .Sh DESCRIPTION The .Nm -driver provides support for USB ethernet adapters based on the Kawasaki -LSI KL5KLUSB101B chipset, including the LinkSys USB10T, the 3Com 3c19250, -the ADS Technologies USB-10BT, the Peracom USB Ethernet Adapter, the -Entrega NET-USB-E45 and NET-HUB-3U1E, the ATen UC10T, the Netgear EA101, -the D-Link DSB-650, Corega USB-T and the SMC 2102USB and 2104USB. +driver provides support for USB Ethernet adapters based on the Kawasaki +LSI KL5KLUSB101B chipset. .Pp The KL5KLUSB101B supports a 128-entry multicast filter, single perfect filter entry for the station address and promiscuous mode. Packets are received and transmitted over separate USB bulk transfer endpoints. .Pp -The Kawasaki adapter supports only 10mbps half-duplex mode, hence there +The Kawasaki chipset supports only 10Mbps half-duplex mode, hence there are no .Xr ifmedia 4 modes to select. .Pp For more information on configuring this device, see .Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports Kawasaki LSI KL5KLUSB101B based USB Ethernet +adapters including: +.Pp +.Bl -bullet -compact +.It +3Com 3c19250 +.It +3Com 3c460 HomeConnect Ethernet USB Adapter +.It +ADS Technologies USB-10BT +.It +AOX USB101 +.It +ATen UC10T +.It +Abocom URE 450 +.It +Corega USB-T +.It +D-Link DSB-650C +.It +Entrega NET-USB-E45, NET-HUB-3U1E +.It +I/O Data USB ETT +.It +Kawasaki DU-H3E +.It +LinkSys USB10T +.It +Netgear EA101 +.It +Peracom USB Ethernet Adapter +.It +Psion Gold Port USB Ethernet adapter +.It +SMC 2102USB, 2104USB +.El .Sh DIAGNOSTICS .Bl -diag .It "kue%d: watchdog timeout" @@ -73,6 +122,7 @@ The driver failed to allocate an mbuf for the receiver ring. .El .Sh SEE ALSO .Xr arp 4 , +.Xr ifmedia 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr ifconfig 8 @@ -89,5 +139,5 @@ driver was written by .Sh BUGS The .Nm -driver does not accumulate ethernet collisions statistics because the +driver does not accumulate Ethernet collisions statistics because the Kawasaki firmware does not appear to maintain any internal statistics. diff --git a/share/man/man4/usb.4 b/share/man/man4/usb.4 index d3cbdd7e7e..1667bb017e 100644 --- a/share/man/man4/usb.4 +++ b/share/man/man4/usb.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD: head/share/man/man4/usb.4 258618 2013-11-26 07:52:40Z lwhsu $ .\" -.Dd November 3, 2014 +.Dd November 10, 2014 .Dt USB 4 .Os .Sh NAME @@ -94,14 +94,16 @@ Mass storage driver for device-side mode .El .Ss Wired network interfaces .Bl -tag -width ".Xr snd_uaudio 4" -offset indent -compact -.\".It Xr aue 4 -.\"ADMtek AN986 Pegasus Ethernet driver +.It Xr aue 4 +ADMtek AN986 Pegasus Ethernet driver .It Xr axe 4 ASIX Electronics AX88x7x/760 USB Ethernet driver -.\".It Xr cue 4 -.\"CATC USB-EL1210A Ethernet driver -.\".It Xr kue 4 -.\"Kawasaki LSI KL5KUSB101B Ethernet driver +.It Xr cue 4 +CATC USB-EL1210A Ethernet driver +.It Xr ipheth 4 +USB Apple iPhone/iPad tethered Ethernet driver +.It Xr kue 4 +Kawasaki LSI KL5KUSB101B Ethernet driver .\".It Xr lgue 4 .\"USB CDC (communication device class) driver for the LG P-500 smartphone .It Xr mos 4 @@ -267,12 +269,13 @@ specifications can be found at: .D1 Pa http://www.usb.org/developers/docs/ .Pp .Xr libusb 3 , -.\".Xr aue 4 , +.Xr aue 4 , .Xr axe 4 , .\".Xr axge 4 , -.\".Xr cue 4 , +.Xr cue 4 , .Xr ehci 4 , -.\".Xr kue 4 , +.Xr ipheth 4 , +.Xr kue 4 , .Xr mos 4 , .Xr ndis 4 , .Xr ohci 4 , diff --git a/sys/bus/u4b/net/Makefile b/sys/bus/u4b/net/Makefile index 078a7665bf..f013f08d3b 100644 --- a/sys/bus/u4b/net/Makefile +++ b/sys/bus/u4b/net/Makefile @@ -1,3 +1,6 @@ -SUBDIR= axe mos udav uether urndis +# +# XXX MISSING: cdce rue uhso usie + +SUBDIR= aue axe cue ipheth kue mos udav uether urndis .include diff --git a/sys/bus/u4b/net/aue/Makefile b/sys/bus/u4b/net/aue/Makefile new file mode 100644 index 0000000000..9f12fe8edf --- /dev/null +++ b/sys/bus/u4b/net/aue/Makefile @@ -0,0 +1,35 @@ +# +# $FreeBSD: head/sys/modules/usb/aue/Makefile 188943 2009-02-23 18:32:59Z thompsa $ +# +# Copyright (c) 2008 Hans Petter Selasky. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +.PATH: ${.CURDIR}/.. + +KMOD= if_aue +SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h usbdevs.h \ + miibus_if.h opt_inet.h \ + if_aue.c + +.include diff --git a/sys/bus/u4b/net/cue/Makefile b/sys/bus/u4b/net/cue/Makefile new file mode 100644 index 0000000000..2ea964133f --- /dev/null +++ b/sys/bus/u4b/net/cue/Makefile @@ -0,0 +1,35 @@ +# +# $FreeBSD: head/sys/modules/usb/cue/Makefile 188943 2009-02-23 18:32:59Z thompsa $ +# +# Copyright (c) 2008 Hans Petter Selasky. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +.PATH: ${.CURDIR}/.. + +KMOD= if_cue +SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h usbdevs.h \ + miibus_if.h opt_inet.h \ + if_cue.c + +.include diff --git a/sys/bus/u4b/net/if_aue.c b/sys/bus/u4b/net/if_aue.c index 91d6afd90c..4199c40d44 100644 --- a/sys/bus/u4b/net/if_aue.c +++ b/sys/bus/u4b/net/if_aue.c @@ -31,11 +31,10 @@ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD: head/sys/dev/usb/net/if_aue.c 271832 2014-09-18 21:09:22Z glebius $ */ -#include -__FBSDID("$FreeBSD$"); - /* * ADMtek AN986 Pegasus and AN8511 Pegasus II USB to ethernet driver. * Datasheet is available from http://www.admtek.com.tw. @@ -69,35 +68,37 @@ __FBSDID("$FreeBSD$"); */ #include -#include #include #include #include #include +#include #include #include #include #include -#include #include #include -#include #include #include #include #include -#include -#include -#include +#include +#include +#include + +#include +#include +#include #include "usbdevs.h" #define USB_DEBUG_VAR aue_debug -#include -#include +#include +#include -#include -#include +#include +#include #ifdef USB_DEBUG static int aue_debug = 0; @@ -208,9 +209,7 @@ static uint8_t aue_csr_read_1(struct aue_softc *, uint16_t); static uint16_t aue_csr_read_2(struct aue_softc *, uint16_t); static void aue_csr_write_1(struct aue_softc *, uint16_t, uint8_t); static void aue_csr_write_2(struct aue_softc *, uint16_t, uint16_t); -static void aue_eeprom_getword(struct aue_softc *, int, uint16_t *); -static void aue_read_eeprom(struct aue_softc *, uint8_t *, uint16_t, - uint16_t); +static uint16_t aue_eeprom_getword(struct aue_softc *, int); static void aue_reset(struct aue_softc *); static void aue_reset_pegasus_II(struct aue_softc *); @@ -372,11 +371,10 @@ aue_csr_write_2(struct aue_softc *sc, uint16_t reg, uint16_t val) /* * Read a word of data stored in the EEPROM at address 'addr.' */ -static void -aue_eeprom_getword(struct aue_softc *sc, int addr, uint16_t *dest) +static uint16_t +aue_eeprom_getword(struct aue_softc *sc, int addr) { int i; - uint16_t word = 0; aue_csr_write_1(sc, AUE_EE_REG, addr); aue_csr_write_1(sc, AUE_EE_CTL, AUE_EECTL_READ); @@ -391,22 +389,23 @@ aue_eeprom_getword(struct aue_softc *sc, int addr, uint16_t *dest) if (i == AUE_TIMEOUT) device_printf(sc->sc_ue.ue_dev, "EEPROM read timed out\n"); - word = aue_csr_read_2(sc, AUE_EE_DATA); - *dest = word; + return (aue_csr_read_2(sc, AUE_EE_DATA)); } /* - * Read a sequence of words from the EEPROM. + * Read station address(offset 0) from the EEPROM. */ static void -aue_read_eeprom(struct aue_softc *sc, uint8_t *dest, - uint16_t off, uint16_t len) +aue_read_mac(struct aue_softc *sc, uint8_t *eaddr) { - uint16_t *ptr = (uint16_t *)dest; - int i; + int i, offset; + uint16_t word; - for (i = 0; i != len; i++, ptr++) - aue_eeprom_getword(sc, off + i, ptr); + for (i = 0, offset = 0; i < ETHER_ADDR_LEN / 2; i++) { + word = aue_eeprom_getword(sc, offset + i); + eaddr[i * 2] = (uint8_t)word; + eaddr[i * 2 + 1] = (uint8_t)(word >> 8); + } } static int @@ -416,7 +415,7 @@ aue_miibus_readreg(device_t dev, int phy, int reg) int i, locked; uint16_t val = 0; - locked = mtx_owned(&sc->sc_mtx); + locked = lockowned(&sc->sc_lock); if (!locked) AUE_LOCK(sc); @@ -466,7 +465,7 @@ aue_miibus_writereg(device_t dev, int phy, int reg, int data) if (phy == 3) return (0); - locked = mtx_owned(&sc->sc_mtx); + locked = lockowned(&sc->sc_lock); if (!locked) AUE_LOCK(sc); @@ -496,7 +495,7 @@ aue_miibus_statchg(device_t dev) struct mii_data *mii = GET_MII(sc); int locked; - locked = mtx_owned(&sc->sc_mtx); + locked = lockowned(&sc->sc_lock); if (!locked) AUE_LOCK(sc); @@ -539,7 +538,7 @@ aue_setmulti(struct usb_ether *ue) uint32_t i; uint8_t hashtbl[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - AUE_LOCK_ASSERT(sc, MA_OWNED); + AUE_LOCK_ASSERT(sc); if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { AUE_SETBIT(sc, AUE_CTL0, AUE_CTL0_ALLMULTI); @@ -549,7 +548,6 @@ aue_setmulti(struct usb_ether *ue) AUE_CLRBIT(sc, AUE_CTL0, AUE_CTL0_ALLMULTI); /* now program new ones */ - if_maddr_rlock(ifp); TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; @@ -557,7 +555,6 @@ aue_setmulti(struct usb_ether *ue) ifma->ifma_addr), ETHER_ADDR_LEN) & ((1 << AUE_BITS) - 1); hashtbl[(h >> 3)] |= 1 << (h & 0x7); } - if_maddr_runlock(ifp); /* write the hashtable */ for (i = 0; i != 8; i++) @@ -632,7 +629,7 @@ aue_attach_post(struct usb_ether *ue) aue_reset(sc); /* get station address from the EEPROM */ - aue_read_eeprom(sc, ue->ue_eaddr, 0, 3); + aue_read_mac(sc, ue->ue_eaddr); } /* @@ -683,12 +680,12 @@ aue_attach(device_t dev) } device_set_usb_desc(dev); - mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF); + lockinit(&sc->sc_lock, device_get_nameunit(dev), 0, LK_CANRECURSE); iface_index = AUE_IFACE_IDX; error = usbd_transfer_setup(uaa->device, &iface_index, sc->sc_xfer, aue_config, AUE_N_TRANSFER, - sc, &sc->sc_mtx); + sc, &sc->sc_lock); if (error) { device_printf(dev, "allocating USB transfers failed\n"); goto detach; @@ -697,7 +694,7 @@ aue_attach(device_t dev) ue->ue_sc = sc; ue->ue_dev = dev; ue->ue_udev = uaa->device; - ue->ue_mtx = &sc->sc_mtx; + ue->ue_lock = &sc->sc_lock; ue->ue_methods = &aue_ue_methods; error = uether_ifattach(ue); @@ -720,7 +717,7 @@ aue_detach(device_t dev) usbd_transfer_unsetup(sc->sc_xfer, AUE_N_TRANSFER); uether_ifdetach(ue); - mtx_destroy(&sc->sc_mtx); + lockuninit(&sc->sc_lock); return (0); } @@ -739,17 +736,17 @@ aue_intr_callback(struct usb_xfer *xfer, usb_error_t error) switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) && - actlen >= sizeof(pkt)) { + if ((ifp->if_flags & IFF_RUNNING) && + actlen >= (int)sizeof(pkt)) { pc = usbd_xfer_get_frame(xfer, 0); usbd_copy_out(pc, 0, &pkt, sizeof(pkt)); if (pkt.aue_txstat0) - ifp->if_oerrors++; - if (pkt.aue_txstat0 & (AUE_TXSTAT0_LATECOLL & + IFNET_STAT_INC(ifp, oerrors, 1); + if (pkt.aue_txstat0 & (AUE_TXSTAT0_LATECOLL | AUE_TXSTAT0_EXCESSCOLL)) - ifp->if_collisions++; + IFNET_STAT_INC(ifp, collisions, 1); } /* FALLTHROUGH */ case USB_ST_SETUP: @@ -788,13 +785,13 @@ aue_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) if (sc->sc_flags & AUE_FLAG_VER_2) { if (actlen == 0) { - ifp->if_ierrors++; + IFNET_STAT_INC(ifp, ierrors, 1); goto tr_setup; } } else { - if (actlen <= sizeof(stat) + ETHER_CRC_LEN) { - ifp->if_ierrors++; + if (actlen <= (int)(sizeof(stat) + ETHER_CRC_LEN)) { + IFNET_STAT_INC(ifp, ierrors, 1); goto tr_setup; } usbd_copy_out(pc, actlen - sizeof(stat), &stat, @@ -806,7 +803,7 @@ aue_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) */ stat.aue_rxstat &= AUE_RXSTAT_MASK; if (stat.aue_rxstat) { - ifp->if_ierrors++; + IFNET_STAT_INC(ifp, ierrors, 1); goto tr_setup; } /* No errors; receive the packet. */ @@ -851,7 +848,7 @@ aue_bulk_write_callback(struct usb_xfer *xfer, usb_error_t error) switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: DPRINTFN(11, "transfer of %d bytes complete\n", actlen); - ifp->if_opackets++; + IFNET_STAT_INC(ifp, opackets, 1); /* FALLTHROUGH */ case USB_ST_SETUP: @@ -862,7 +859,7 @@ tr_setup: */ return; } - IFQ_DRV_DEQUEUE(&ifp->if_snd, m); + m = ifq_dequeue(&ifp->if_snd); if (m == NULL) return; @@ -908,7 +905,7 @@ tr_setup: DPRINTFN(11, "transfer error, %s\n", usbd_errstr(error)); - ifp->if_oerrors++; + IFNET_STAT_INC(ifp, oerrors, 1); if (error != USB_ERR_CANCELLED) { /* try to clear stall first */ @@ -925,7 +922,7 @@ aue_tick(struct usb_ether *ue) struct aue_softc *sc = uether_getsc(ue); struct mii_data *mii = GET_MII(sc); - AUE_LOCK_ASSERT(sc, MA_OWNED); + AUE_LOCK_ASSERT(sc); mii_tick(mii); if ((sc->sc_flags & AUE_FLAG_LINK) == 0 @@ -956,7 +953,7 @@ aue_init(struct usb_ether *ue) struct ifnet *ifp = uether_getifp(ue); int i; - AUE_LOCK_ASSERT(sc, MA_OWNED); + AUE_LOCK_ASSERT(sc); /* * Cancel pending I/O @@ -980,7 +977,7 @@ aue_init(struct usb_ether *ue) usbd_xfer_set_stall(sc->sc_xfer[AUE_BULK_DT_WR]); - ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_flags |= IFF_RUNNING; aue_start(ue); } @@ -990,7 +987,7 @@ aue_setpromisc(struct usb_ether *ue) struct aue_softc *sc = uether_getsc(ue); struct ifnet *ifp = uether_getifp(ue); - AUE_LOCK_ASSERT(sc, MA_OWNED); + AUE_LOCK_ASSERT(sc); /* if we want promiscuous mode, set the allframes bit: */ if (ifp->if_flags & IFF_PROMISC) @@ -1008,14 +1005,15 @@ aue_ifmedia_upd(struct ifnet *ifp) struct aue_softc *sc = ifp->if_softc; struct mii_data *mii = GET_MII(sc); struct mii_softc *miisc; + int error; - AUE_LOCK_ASSERT(sc, MA_OWNED); + AUE_LOCK_ASSERT(sc); sc->sc_flags &= ~AUE_FLAG_LINK; LIST_FOREACH(miisc, &mii->mii_phys, mii_list) - PHY_RESET(miisc); - mii_mediachg(mii); - return (0); + mii_phy_reset(miisc); + error = mii_mediachg(mii); + return (error); } /* @@ -1044,9 +1042,9 @@ aue_stop(struct usb_ether *ue) struct aue_softc *sc = uether_getsc(ue); struct ifnet *ifp = uether_getifp(ue); - AUE_LOCK_ASSERT(sc, MA_OWNED); + AUE_LOCK_ASSERT(sc); - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + ifp->if_flags &= ~IFF_RUNNING; sc->sc_flags &= ~AUE_FLAG_LINK; /* diff --git a/sys/bus/u4b/net/if_auereg.h b/sys/bus/u4b/net/if_auereg.h index 4d0843eb8b..140e29cc8b 100644 --- a/sys/bus/u4b/net/if_auereg.h +++ b/sys/bus/u4b/net/if_auereg.h @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: head/sys/dev/usb/net/if_auereg.h 196219 2009-08-14 20:03:53Z jhb $ */ /* @@ -203,7 +203,7 @@ struct aue_rxpkt { struct aue_softc { struct usb_ether sc_ue; - struct mtx sc_mtx; + struct lock sc_lock; struct usb_xfer *sc_xfer[AUE_N_TRANSFER]; int sc_flags; @@ -215,6 +215,6 @@ struct aue_softc { #define AUE_FLAG_DUAL_PHY 0x0400 /* chip has two transcivers */ }; -#define AUE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define AUE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define AUE_LOCK_ASSERT(_sc, t) mtx_assert(&(_sc)->sc_mtx, t) +#define AUE_LOCK(_sc) lockmgr(&(_sc)->sc_lock, LK_EXCLUSIVE) +#define AUE_UNLOCK(_sc) lockmgr(&(_sc)->sc_lock, LK_RELEASE) +#define AUE_LOCK_ASSERT(_sc) KKASSERT(lockowned(&(_sc)->sc_lock)) diff --git a/sys/bus/u4b/net/if_cue.c b/sys/bus/u4b/net/if_cue.c index 7ddeb06da4..d481404d4d 100644 --- a/sys/bus/u4b/net/if_cue.c +++ b/sys/bus/u4b/net/if_cue.c @@ -28,11 +28,10 @@ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD: head/sys/dev/usb/net/if_cue.c 271832 2014-09-18 21:09:22Z glebius $ */ -#include -__FBSDID("$FreeBSD$"); - /* * CATC USB-EL1210A USB to ethernet driver. Used in the CATC Netmate * adapters and others. @@ -52,35 +51,37 @@ __FBSDID("$FreeBSD$"); */ #include -#include #include #include #include #include +#include #include #include #include #include -#include #include #include -#include #include #include #include #include -#include -#include -#include +#include +#include +#include + +#include +#include +#include #include "usbdevs.h" #define USB_DEBUG_VAR cue_debug -#include -#include +#include +#include -#include -#include +#include +#include /* * Various supported device vendors/products. @@ -288,7 +289,7 @@ cue_setpromisc(struct usb_ether *ue) struct cue_softc *sc = uether_getsc(ue); struct ifnet *ifp = uether_getifp(ue); - CUE_LOCK_ASSERT(sc, MA_OWNED); + CUE_LOCK_ASSERT(sc); /* if we want promiscuous mode, set the allframes bit */ if (ifp->if_flags & IFF_PROMISC) @@ -309,7 +310,7 @@ cue_setmulti(struct usb_ether *ue) uint32_t h = 0, i; uint8_t hashtbl[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - CUE_LOCK_ASSERT(sc, MA_OWNED); + CUE_LOCK_ASSERT(sc); if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { for (i = 0; i < 8; i++) @@ -320,7 +321,6 @@ cue_setmulti(struct usb_ether *ue) } /* now program new ones */ - if_maddr_rlock(ifp); TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) @@ -328,7 +328,6 @@ cue_setmulti(struct usb_ether *ue) h = cue_mchash(LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); hashtbl[h >> 3] |= 1 << (h & 0x7); } - if_maddr_runlock(ifp); /* * Also include the broadcast address in the filter @@ -400,11 +399,11 @@ cue_attach(device_t dev) int error; device_set_usb_desc(dev); - mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF); + lockinit(&sc->sc_lock, device_get_nameunit(dev), 0, LK_CANRECURSE); iface_index = CUE_IFACE_IDX; error = usbd_transfer_setup(uaa->device, &iface_index, - sc->sc_xfer, cue_config, CUE_N_TRANSFER, sc, &sc->sc_mtx); + sc->sc_xfer, cue_config, CUE_N_TRANSFER, sc, &sc->sc_lock); if (error) { device_printf(dev, "allocating USB transfers failed\n"); goto detach; @@ -413,7 +412,7 @@ cue_attach(device_t dev) ue->ue_sc = sc; ue->ue_dev = dev; ue->ue_udev = uaa->device; - ue->ue_mtx = &sc->sc_mtx; + ue->ue_lock = &sc->sc_lock; ue->ue_methods = &cue_ue_methods; error = uether_ifattach(ue); @@ -436,7 +435,7 @@ cue_detach(device_t dev) usbd_transfer_unsetup(sc->sc_xfer, CUE_N_TRANSFER); uether_ifdetach(ue); - mtx_destroy(&sc->sc_mtx); + lockuninit(&sc->sc_lock); return (0); } @@ -457,8 +456,8 @@ cue_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - if (actlen <= (2 + sizeof(struct ether_header))) { - ifp->if_ierrors++; + if (actlen <= (int)(2 + sizeof(struct ether_header))) { + IFNET_STAT_INC(ifp, ierrors, 1); goto tr_setup; } pc = usbd_xfer_get_frame(xfer, 0); @@ -502,12 +501,12 @@ cue_bulk_write_callback(struct usb_xfer *xfer, usb_error_t error) switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: DPRINTFN(11, "transfer complete\n"); - ifp->if_opackets++; + IFNET_STAT_INC(ifp, opackets, 1); /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: - IFQ_DRV_DEQUEUE(&ifp->if_snd, m); + m = ifq_dequeue(&ifp->if_snd); if (m == NULL) return; @@ -540,7 +539,7 @@ tr_setup: DPRINTFN(11, "transfer error, %s\n", usbd_errstr(error)); - ifp->if_oerrors++; + IFNET_STAT_INC(ifp, oerrors, 1); if (error != USB_ERR_CANCELLED) { /* try to clear stall first */ @@ -557,14 +556,14 @@ cue_tick(struct usb_ether *ue) struct cue_softc *sc = uether_getsc(ue); struct ifnet *ifp = uether_getifp(ue); - CUE_LOCK_ASSERT(sc, MA_OWNED); + CUE_LOCK_ASSERT(sc); - ifp->if_collisions += cue_csr_read_2(sc, CUE_TX_SINGLECOLL); - ifp->if_collisions += cue_csr_read_2(sc, CUE_TX_MULTICOLL); - ifp->if_collisions += cue_csr_read_2(sc, CUE_TX_EXCESSCOLL); + IFNET_STAT_INC(ifp, collisions, cue_csr_read_2(sc, CUE_TX_SINGLECOLL)); + IFNET_STAT_INC(ifp, collisions, cue_csr_read_2(sc, CUE_TX_MULTICOLL)); + IFNET_STAT_INC(ifp, collisions, cue_csr_read_2(sc, CUE_TX_EXCESSCOLL)); if (cue_csr_read_2(sc, CUE_RX_FRAMEERR)) - ifp->if_ierrors++; + IFNET_STAT_INC(ifp, ierrors, 1); } static void @@ -586,7 +585,7 @@ cue_init(struct usb_ether *ue) struct ifnet *ifp = uether_getifp(ue); int i; - CUE_LOCK_ASSERT(sc, MA_OWNED); + CUE_LOCK_ASSERT(sc); /* * Cancel pending I/O and free all RX/TX buffers. @@ -621,7 +620,7 @@ cue_init(struct usb_ether *ue) usbd_xfer_set_stall(sc->sc_xfer[CUE_BULK_DT_WR]); - ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_flags |= IFF_RUNNING; cue_start(ue); } @@ -635,9 +634,9 @@ cue_stop(struct usb_ether *ue) struct cue_softc *sc = uether_getsc(ue); struct ifnet *ifp = uether_getifp(ue); - CUE_LOCK_ASSERT(sc, MA_OWNED); + CUE_LOCK_ASSERT(sc); - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + ifp->if_flags &= ~IFF_RUNNING; /* * stop all the transfers, if not already stopped: diff --git a/sys/bus/u4b/net/if_cuereg.h b/sys/bus/u4b/net/if_cuereg.h index 1782c2167f..054744e800 100644 --- a/sys/bus/u4b/net/if_cuereg.h +++ b/sys/bus/u4b/net/if_cuereg.h @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: head/sys/dev/usb/net/if_cuereg.h 251674 2013-06-13 01:33:01Z kevlo $ */ /* @@ -111,7 +111,7 @@ #define CUE_CONFIG_IDX 0 /* config number 1 */ #define CUE_IFACE_IDX 0 -/* The interrupt endpoint is currently unused by the KLSI part. */ +/* The interrupt endpoint is currently unused by the CATC part. */ enum { CUE_BULK_DT_WR, CUE_BULK_DT_RD, @@ -120,13 +120,13 @@ enum { struct cue_softc { struct usb_ether sc_ue; - struct mtx sc_mtx; + struct lock sc_lock; struct usb_xfer *sc_xfer[CUE_N_TRANSFER]; int sc_flags; #define CUE_FLAG_LINK 0x0001 /* got a link */ }; -#define CUE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define CUE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define CUE_LOCK_ASSERT(_sc, t) mtx_assert(&(_sc)->sc_mtx, t) +#define CUE_LOCK(_sc) lockmgr(&(_sc)->sc_lock, LK_EXCLUSIVE) +#define CUE_UNLOCK(_sc) lockmgr(&(_sc)->sc_lock, LK_RELEASE) +#define CUE_LOCK_ASSERT(_sc) KKASSERT(lockowned(&(_sc)->sc_lock)) diff --git a/sys/bus/u4b/net/if_ipheth.c b/sys/bus/u4b/net/if_ipheth.c index 0504103999..a6731a2d27 100644 --- a/sys/bus/u4b/net/if_ipheth.c +++ b/sys/bus/u4b/net/if_ipheth.c @@ -22,6 +22,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD: head/sys/dev/usb/net/if_ipheth.c 271832 2014-09-18 21:09:22Z glebius $ */ /* @@ -29,11 +31,7 @@ * the Apple iPhone Ethernet driver. */ -#include -__FBSDID("$FreeBSD$"); - #include -#include #include #include #include @@ -42,26 +40,29 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include +#include #include -#include #include #include #include #include -#include -#include -#include +#include +#include +#include + +#include +#include +#include #include "usbdevs.h" #define USB_DEBUG_VAR ipheth_debug -#include -#include +#include +#include -#include -#include +#include +#include static device_probe_t ipheth_probe; static device_attach_t ipheth_attach; @@ -149,6 +150,7 @@ static const struct usb_ether_methods ipheth_ue_methods = { USB_IFACE_PROTOCOL(pt) static const STRUCT_USB_HOST_ID ipheth_devs[] = { +#if 0 {IPHETH_ID(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE, IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, IPHETH_USBINTF_PROTO)}, @@ -161,6 +163,19 @@ static const STRUCT_USB_HOST_ID ipheth_devs[] = { {IPHETH_ID(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_4, IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, IPHETH_USBINTF_PROTO)}, + {IPHETH_ID(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_4S, + IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, + IPHETH_USBINTF_PROTO)}, + {IPHETH_ID(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_5, + IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS, + IPHETH_USBINTF_PROTO)}, +#else + /* product agnostic interface match */ + {USB_VENDOR(USB_VENDOR_APPLE), + USB_IFACE_CLASS(IPHETH_USBINTF_CLASS), + USB_IFACE_SUBCLASS(IPHETH_USBINTF_SUBCLASS), + USB_IFACE_PROTOCOL(IPHETH_USBINTF_PROTO)}, +#endif }; static int @@ -211,7 +226,7 @@ ipheth_attach(device_t dev) device_set_usb_desc(dev); - mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF); + lockinit(&sc->sc_lock, device_get_nameunit(dev), 0, LK_CANRECURSE); error = usbd_set_alt_interface_index(uaa->device, uaa->info.bIfaceIndex, IPHETH_ALT_INTFNUM); @@ -220,7 +235,7 @@ ipheth_attach(device_t dev) goto detach; } error = usbd_transfer_setup(uaa->device, &sc->sc_iface_no, - sc->sc_xfer, ipheth_config, IPHETH_N_TRANSFER, sc, &sc->sc_mtx); + sc->sc_xfer, ipheth_config, IPHETH_N_TRANSFER, sc, &sc->sc_lock); if (error) { device_printf(dev, "Cannot setup USB transfers\n"); goto detach; @@ -228,7 +243,7 @@ ipheth_attach(device_t dev) ue->ue_sc = sc; ue->ue_dev = dev; ue->ue_udev = uaa->device; - ue->ue_mtx = &sc->sc_mtx; + ue->ue_lock = &sc->sc_lock; ue->ue_methods = &ipheth_ue_methods; error = ipheth_get_mac_addr(sc); @@ -260,7 +275,7 @@ ipheth_detach(device_t dev) uether_ifdetach(ue); - mtx_destroy(&sc->sc_mtx); + lockuninit(&sc->sc_lock); return (0); } @@ -326,9 +341,9 @@ ipheth_init(struct usb_ether *ue) struct ipheth_softc *sc = uether_getsc(ue); struct ifnet *ifp = uether_getifp(ue); - IPHETH_LOCK_ASSERT(sc, MA_OWNED); + IPHETH_LOCK_ASSERT(sc); - ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_flags |= IFF_RUNNING; /* stall data write direction, which depends on USB mode */ usbd_xfer_set_stall(sc->sc_xfer[IPHETH_BULK_TX]); @@ -382,7 +397,7 @@ ipheth_bulk_write_callback(struct usb_xfer *xfer, usb_error_t error) DPRINTFN(11, "transfer complete: %u bytes in %u frames\n", actlen, aframes); - ifp->if_opackets++; + IFNET_STAT_INC(ifp, opackets, 1); /* free all previous TX buffers */ ipheth_free_queue(sc->sc_tx_buf, IPHETH_TX_FRAMES_MAX); @@ -392,7 +407,7 @@ ipheth_bulk_write_callback(struct usb_xfer *xfer, usb_error_t error) tr_setup: for (x = 0; x != IPHETH_TX_FRAMES_MAX; x++) { - IFQ_DRV_DEQUEUE(&ifp->if_snd, m); + m = ifq_dequeue(&ifp->if_snd); if (m == NULL) break; @@ -437,7 +452,7 @@ tr_setup: ipheth_free_queue(sc->sc_tx_buf, IPHETH_TX_FRAMES_MAX); /* count output errors */ - ifp->if_oerrors++; + IFNET_STAT_INC(ifp, oerrors, 1); if (error != USB_ERR_CANCELLED) { /* try to clear stall first */ diff --git a/sys/bus/u4b/net/if_iphethvar.h b/sys/bus/u4b/net/if_iphethvar.h index 65b0c940c6..6cda4da5ae 100644 --- a/sys/bus/u4b/net/if_iphethvar.h +++ b/sys/bus/u4b/net/if_iphethvar.h @@ -1,4 +1,4 @@ -/* $FreeBSD$ */ +/* $FreeBSD: head/sys/dev/usb/net/if_iphethvar.h 213805 2010-10-13 21:36:42Z hselasky $ */ /*- * Copyright (c) 2010 Hans Petter Selasky. All rights reserved. * Copyright (c) 2009 Diego Giagio. All rights reserved. @@ -66,7 +66,7 @@ enum { struct ipheth_softc { struct usb_ether sc_ue; - struct mtx sc_mtx; + struct lock sc_lock; struct usb_xfer *sc_xfer[IPHETH_N_TRANSFER]; struct mbuf *sc_rx_buf[IPHETH_RX_FRAMES_MAX]; @@ -77,8 +77,8 @@ struct ipheth_softc { uint8_t sc_carrier_on; }; -#define IPHETH_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define IPHETH_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define IPHETH_LOCK_ASSERT(_sc, t) mtx_assert(&(_sc)->sc_mtx, t) +#define IPHETH_LOCK(_sc) lockmgr(&(_sc)->sc_lock, LK_EXCLUSIVE) +#define IPHETH_UNLOCK(_sc) lockmgr(&(_sc)->sc_lock, LK_RELEASE) +#define IPHETH_LOCK_ASSERT(_sc) KKASSERT(lockowned(&(_sc)->sc_lock)) #endif /* _IF_IPHETHVAR_H_ */ diff --git a/sys/bus/u4b/net/if_kue.c b/sys/bus/u4b/net/if_kue.c index 594f0071d0..0c3829b44e 100644 --- a/sys/bus/u4b/net/if_kue.c +++ b/sys/bus/u4b/net/if_kue.c @@ -28,11 +28,10 @@ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD: head/sys/dev/usb/net/if_kue.c 271832 2014-09-18 21:09:22Z glebius $ */ -#include -__FBSDID("$FreeBSD$"); - /* * Kawasaki LSI KL5KUSB101B USB to ethernet adapter driver. * @@ -66,36 +65,38 @@ __FBSDID("$FreeBSD$"); */ #include -#include #include #include #include #include +#include #include #include #include #include -#include #include #include -#include #include #include #include #include -#include -#include -#include +#include +#include +#include + +#include +#include +#include #include "usbdevs.h" #define USB_DEBUG_VAR kue_debug -#include -#include +#include +#include -#include -#include -#include +#include +#include +#include /* * Various supported device vendors/products. @@ -340,7 +341,7 @@ kue_setpromisc(struct usb_ether *ue) struct kue_softc *sc = uether_getsc(ue); struct ifnet *ifp = uether_getifp(ue); - KUE_LOCK_ASSERT(sc, MA_OWNED); + KUE_LOCK_ASSERT(sc); if (ifp->if_flags & IFF_PROMISC) sc->sc_rxfilt |= KUE_RXFILT_PROMISC; @@ -358,7 +359,7 @@ kue_setmulti(struct usb_ether *ue) struct ifmultiaddr *ifma; int i = 0; - KUE_LOCK_ASSERT(sc, MA_OWNED); + KUE_LOCK_ASSERT(sc); if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { sc->sc_rxfilt |= KUE_RXFILT_ALLMULTI; @@ -369,7 +370,6 @@ kue_setmulti(struct usb_ether *ue) sc->sc_rxfilt &= ~KUE_RXFILT_ALLMULTI; - if_maddr_rlock(ifp); TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) @@ -385,7 +385,6 @@ kue_setmulti(struct usb_ether *ue) ETHER_ADDR_LEN); i++; } - if_maddr_runlock(ifp); if (i == KUE_MCFILTCNT(sc)) sc->sc_rxfilt |= KUE_RXFILT_ALLMULTI; @@ -411,7 +410,7 @@ kue_reset(struct kue_softc *sc) cd = usbd_get_config_descriptor(sc->sc_ue.ue_udev); - err = usbd_req_set_config(sc->sc_ue.ue_udev, &sc->sc_mtx, + err = usbd_req_set_config(sc->sc_ue.ue_udev, &sc->sc_lock, cd->bConfigurationValue); if (err) DPRINTF("reset failed (ignored)\n"); @@ -476,17 +475,17 @@ kue_attach(device_t dev) int error; device_set_usb_desc(dev); - mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF); + lockinit(&sc->sc_lock, device_get_nameunit(dev), 0, LK_CANRECURSE); iface_index = KUE_IFACE_IDX; error = usbd_transfer_setup(uaa->device, &iface_index, - sc->sc_xfer, kue_config, KUE_N_TRANSFER, sc, &sc->sc_mtx); + sc->sc_xfer, kue_config, KUE_N_TRANSFER, sc, &sc->sc_lock); if (error) { device_printf(dev, "allocating USB transfers failed\n"); goto detach; } - sc->sc_mcfilters = malloc(KUE_MCFILTCNT(sc) * ETHER_ADDR_LEN, + sc->sc_mcfilters = kmalloc(KUE_MCFILTCNT(sc) * ETHER_ADDR_LEN, M_USBDEV, M_WAITOK); if (sc->sc_mcfilters == NULL) { device_printf(dev, "failed allocating USB memory\n"); @@ -496,7 +495,7 @@ kue_attach(device_t dev) ue->ue_sc = sc; ue->ue_dev = dev; ue->ue_udev = uaa->device; - ue->ue_mtx = &sc->sc_mtx; + ue->ue_lock = &sc->sc_lock; ue->ue_methods = &kue_ue_methods; error = uether_ifattach(ue); @@ -519,8 +518,8 @@ kue_detach(device_t dev) usbd_transfer_unsetup(sc->sc_xfer, KUE_N_TRANSFER); uether_ifdetach(ue); - mtx_destroy(&sc->sc_mtx); - free(sc->sc_mcfilters, M_USBDEV); + lockuninit(&sc->sc_lock); + kfree(sc->sc_mcfilters, M_USBDEV); return (0); } @@ -545,8 +544,8 @@ kue_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - if (actlen <= (2 + sizeof(struct ether_header))) { - ifp->if_ierrors++; + if (actlen <= (int)(2 + sizeof(struct ether_header))) { + IFNET_STAT_INC(ifp, ierrors, 1); goto tr_setup; } pc = usbd_xfer_get_frame(xfer, 0); @@ -592,12 +591,12 @@ kue_bulk_write_callback(struct usb_xfer *xfer, usb_error_t error) switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: DPRINTFN(11, "transfer complete\n"); - ifp->if_opackets++; + IFNET_STAT_INC(ifp, opackets, 1); /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: - IFQ_DRV_DEQUEUE(&ifp->if_snd, m); + m = ifq_dequeue(&ifp->if_snd); if (m == NULL) return; @@ -634,7 +633,7 @@ tr_setup: DPRINTFN(11, "transfer error, %s\n", usbd_errstr(error)); - ifp->if_oerrors++; + IFNET_STAT_INC(ifp, oerrors, 1); if (error != USB_ERR_CANCELLED) { /* try to clear stall first */ @@ -664,7 +663,7 @@ kue_init(struct usb_ether *ue) struct kue_softc *sc = uether_getsc(ue); struct ifnet *ifp = uether_getifp(ue); - KUE_LOCK_ASSERT(sc, MA_OWNED); + KUE_LOCK_ASSERT(sc); /* set MAC address */ kue_ctl(sc, KUE_CTL_WRITE, KUE_CMD_SET_MAC, @@ -685,7 +684,7 @@ kue_init(struct usb_ether *ue) usbd_xfer_set_stall(sc->sc_xfer[KUE_BULK_DT_WR]); - ifp->if_drv_flags |= IFF_DRV_RUNNING; + ifp->if_flags |= IFF_RUNNING; kue_start(ue); } @@ -695,9 +694,9 @@ kue_stop(struct usb_ether *ue) struct kue_softc *sc = uether_getsc(ue); struct ifnet *ifp = uether_getifp(ue); - KUE_LOCK_ASSERT(sc, MA_OWNED); + KUE_LOCK_ASSERT(sc); - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + ifp->if_flags &= ~IFF_RUNNING; /* * stop all the transfers, if not already stopped: diff --git a/sys/bus/u4b/net/if_kuefw.h b/sys/bus/u4b/net/if_kuefw.h index 2b055a92ed..a029911730 100644 --- a/sys/bus/u4b/net/if_kuefw.h +++ b/sys/bus/u4b/net/if_kuefw.h @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: head/sys/dev/usb/net/if_kuefw.h 196219 2009-08-14 20:03:53Z jhb $ */ /* diff --git a/sys/bus/u4b/net/if_kuereg.h b/sys/bus/u4b/net/if_kuereg.h index 16ad044d07..0eb7b39d7e 100644 --- a/sys/bus/u4b/net/if_kuereg.h +++ b/sys/bus/u4b/net/if_kuereg.h @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: head/sys/dev/usb/net/if_kuereg.h 196219 2009-08-14 20:03:53Z jhb $ */ /* @@ -125,7 +125,7 @@ enum { struct kue_softc { struct usb_ether sc_ue; - struct mtx sc_mtx; + struct lock sc_lock; struct kue_ether_desc sc_desc; struct usb_xfer *sc_xfer[KUE_N_TRANSFER]; uint8_t *sc_mcfilters; @@ -136,6 +136,6 @@ struct kue_softc { uint16_t sc_rxfilt; }; -#define KUE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define KUE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define KUE_LOCK_ASSERT(_sc, t) mtx_assert(&(_sc)->sc_mtx, t) +#define KUE_LOCK(_sc) lockmgr(&(_sc)->sc_lock, LK_EXCLUSIVE) +#define KUE_UNLOCK(_sc) lockmgr(&(_sc)->sc_lock, LK_RELEASE) +#define KUE_LOCK_ASSERT(_sc) KKASSERT(lockowned(&(_sc)->sc_lock)) diff --git a/sys/bus/u4b/net/ipheth/Makefile b/sys/bus/u4b/net/ipheth/Makefile new file mode 100644 index 0000000000..f6bfbac728 --- /dev/null +++ b/sys/bus/u4b/net/ipheth/Makefile @@ -0,0 +1,35 @@ +# +# $FreeBSD: head/sys/modules/usb/ipheth/Makefile 213805 2010-10-13 21:36:42Z hselasky $ +# +# Copyright (c) 2010 Hans Petter Selasky. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +.PATH: ${.CURDIR}/.. + +KMOD= if_ipheth +SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h usbdevs.h \ + miibus_if.h opt_inet.h \ + if_ipheth.c + +.include diff --git a/sys/bus/u4b/net/kue/Makefile b/sys/bus/u4b/net/kue/Makefile new file mode 100644 index 0000000000..6c43a81e44 --- /dev/null +++ b/sys/bus/u4b/net/kue/Makefile @@ -0,0 +1,35 @@ +# +# $FreeBSD: head/sys/modules/usb/kue/Makefile 188943 2009-02-23 18:32:59Z thompsa $ +# +# Copyright (c) 2008 Hans Petter Selasky. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +.PATH: ${.CURDIR}/.. + +KMOD= if_kue +SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h usbdevs.h \ + miibus_if.h opt_inet.h \ + if_kue.c + +.include diff --git a/sys/conf/files b/sys/conf/files index 7a0af10595..44b2ac814d 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -2313,7 +2313,11 @@ bus/u4b/storage/ustorage_fs.c optional usfs usb # USB network drivers # bus/u4b/net/usb_ethernet.c optional uether usb +bus/u4b/net/if_aue.c optional aue uether usb bus/u4b/net/if_axe.c optional axe uether usb +bus/u4b/net/if_cue.c optional cue uether usb +bus/u4b/net/if_ipheth.c optional ipheth uether usb +bus/u4b/net/if_kue.c optional kue uether usb bus/u4b/net/if_mos.c optional mos uether usb bus/u4b/net/if_udav.c optional udav uether usb bus/u4b/net/if_urndis.c optional urndis uether usb diff --git a/sys/config/GENERIC b/sys/config/GENERIC index 797b381e03..4def3495b0 100644 --- a/sys/config/GENERIC +++ b/sys/config/GENERIC @@ -348,9 +348,9 @@ pseudo-device cryptodev #device ugen # Generic (oldusb) #device uscanner # Scanners (oldusb) #device urio # Diamond Rio MP3 Player (oldusb) -#device aue # ADMtek USB ethernet (oldusb) -#device cue # CATC USB ethernet (oldusb) -#device kue # Kawasaki LSI USB ethernet (oldusb) +device aue # ADMtek USB ethernet +device cue # CATC USB ethernet +device kue # Kawasaki LSI USB ethernet #device rue # RealTek 8150 based USB ethernet (oldusb) device usb # USB Bus (required) diff --git a/sys/config/LINT b/sys/config/LINT index 4d2f479b21..37f49c4368 100644 --- a/sys/config/LINT +++ b/sys/config/LINT @@ -2109,26 +2109,6 @@ device mly #device moscom #device uticom # -# ADMtek USB ethernet (oldusb) -# Supports the LinkSys USB100TX, -# the Billionton USB100, the Melco LU-ATX, the D-Link DSB-650TX -# and the SMC 2202USB. Also works with the ADMtek AN986 Pegasus -# eval board. -#device aue -# -# CATC USB-EL1201A USB ethernet (oldusb) -# Supports the CATC Netmate -# and Netmate II, and the Belkin F5U111. -#device cue -# -# Kawasaki LSI ethernet (oldusb) -# Supports the LinkSys USB10T, -# Entrega USB-NET-E45, Peracom Ethernet Adapter, the -# 3Com 3c19250, the ADS Technologies USB-10BT, the ATen UC10T, -# the Netgear EA101, the D-Link DSB-650, the SMC 2102USB -# and 2104USB, and the Corega USB-T. -#device kue -# # USB CDC ethernet (oldusb) #Supports the LG P-500 smartphone. #device lgue @@ -2195,10 +2175,30 @@ device uvscom # USB ethernet support device uether # +# ADMtek USB ethernet. Supports the LinkSys USB100TX, +# the Billionton USB100, the Melco LU-ATX, the D-Link DSB-650TX +# and the SMC 2202USB. Also works with the ADMtek AN986 Pegasus +# eval board. +device aue +# # ASIX Electronics AX88172 USB 2.0 ethernet driver. Used in the # LinkSys USB200M and various other adapters. device axe # +# CATC USB-EL1201A USB ethernet. Supports the CATC Netmate +# and Netmate II, and the Belkin F5U111. +device cue +# +# USB Apple iPhone/iPad tethered Ethernet driver +device ipheth +# +# Kawasaki LSI ethernet. Supports the LinkSys USB10T, +# Entrega USB-NET-E45, Peracom Ethernet Adapter, the +# 3Com 3c19250, the ADS Technologies USB-10BT, the ATen UC10T, +# the Netgear EA101, the D-Link DSB-650, the SMC 2102USB +# and 2104USB, and the Corega USB-T. +device kue +# # Moschip MCS7730/MCS7840 USB to fast ethernet. Supports the Sitecom LN030. device mos # diff --git a/sys/config/LINT64 b/sys/config/LINT64 index 499e3aca8a..237f7bec3c 100644 --- a/sys/config/LINT64 +++ b/sys/config/LINT64 @@ -1940,26 +1940,6 @@ device mly #device moscom #device uticom # -# ADMtek USB ethernet (oldusb) -# Supports the LinkSys USB100TX, -# the Billionton USB100, the Melco LU-ATX, the D-Link DSB-650TX -# and the SMC 2202USB. Also works with the ADMtek AN986 Pegasus -# eval board. -#device aue -# -# CATC USB-EL1201A USB ethernet (oldusb) -# Supports the CATC Netmate -# and Netmate II, and the Belkin F5U111. -#device cue -# -# Kawasaki LSI ethernet (oldusb) -# Supports the LinkSys USB10T, -# Entrega USB-NET-E45, Peracom Ethernet Adapter, the -# 3Com 3c19250, the ADS Technologies USB-10BT, the ATen UC10T, -# the Netgear EA101, the D-Link DSB-650, the SMC 2102USB -# and 2104USB, and the Corega USB-T. -#device kue -# # USB CDC ethernet (oldusb) #Supports the LG P-500 smartphone. #device lgue @@ -2026,10 +2006,30 @@ device uvscom # USB ethernet support device uether # +# ADMtek USB ethernet. Supports the LinkSys USB100TX, +# the Billionton USB100, the Melco LU-ATX, the D-Link DSB-650TX +# and the SMC 2202USB. Also works with the ADMtek AN986 Pegasus +# eval board. +device aue +# # ASIX Electronics AX88172 USB 2.0 ethernet driver. Used in the # LinkSys USB200M and various other adapters. device axe # +# CATC USB-EL1201A USB ethernet. Supports the CATC Netmate +# and Netmate II, and the Belkin F5U111. +device cue +# +# USB Apple iPhone/iPad tethered Ethernet driver +device ipheth +# +# Kawasaki LSI ethernet. Supports the LinkSys USB10T, +# Entrega USB-NET-E45, Peracom Ethernet Adapter, the +# 3Com 3c19250, the ADS Technologies USB-10BT, the ATen UC10T, +# the Netgear EA101, the D-Link DSB-650, the SMC 2102USB +# and 2104USB, and the Corega USB-T. +device kue +# # Moschip MCS7730/MCS7840 USB to fast ethernet. Supports the Sitecom LN030. device mos # diff --git a/sys/config/SOEKRIS b/sys/config/SOEKRIS index 257830202b..1232e62de8 100644 --- a/sys/config/SOEKRIS +++ b/sys/config/SOEKRIS @@ -180,7 +180,7 @@ pseudo-device cryptodev #device ugen # Generic (oldusb) #device uscanner # Scanners (oldusb) #device urio # Diamond Rio MP3 Player (oldusb) -#device aue # ADMtek USB ethernet (oldusb) +device aue # ADMtek USB ethernet #device rue # RealTek 8150 based USB ethernet (oldusb) device usb # USB Bus (required) diff --git a/sys/config/X86_64_GENERIC b/sys/config/X86_64_GENERIC index 1190e541b5..effc1363e6 100644 --- a/sys/config/X86_64_GENERIC +++ b/sys/config/X86_64_GENERIC @@ -322,9 +322,9 @@ pseudo-device crypto # core crypto support, used by wlan #device ugen # Generic (oldusb) #device uscanner # Scanners (oldusb) #device urio # Diamond Rio MP3 Player (oldusb) -#device aue # ADMtek USB ethernet (oldusb) -#device cue # CATC USB ethernet (oldusb) -#device kue # Kawasaki LSI USB ethernet (oldusb) +device aue # ADMtek USB ethernet +device cue # CATC USB ethernet +device kue # Kawasaki LSI USB ethernet #device rue # RealTek 8150 based USB ethernet (oldusb) device usb # USB Bus (required)