summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--release/sysinstall/devices.c1
-rw-r--r--release/texts/alpha/HARDWARE.TXT8
-rw-r--r--release/texts/alpha/RELNOTES.TXT5
-rw-r--r--release/texts/i386/HARDWARE.TXT8
-rw-r--r--release/texts/i386/RELNOTES.TXT13
-rw-r--r--share/man/man4/Makefile2
-rw-r--r--share/man/man4/kue.491
-rw-r--r--sys/alpha/conf/GENERIC1
-rw-r--r--sys/alpha/conf/NOTES1
-rw-r--r--sys/amd64/conf/GENERIC1
-rw-r--r--sys/boot/forth/loader.conf1
-rw-r--r--sys/conf/NOTES5
-rw-r--r--sys/conf/files1
-rw-r--r--sys/dev/usb/if_kue.c1083
-rw-r--r--sys/dev/usb/if_kuereg.h173
-rw-r--r--sys/dev/usb/kue_fw.h685
-rw-r--r--sys/dev/usb/usb_quirks.c13
-rw-r--r--sys/dev/usb/usbdevs15
-rw-r--r--sys/dev/usb/usbdevs.h17
-rw-r--r--sys/dev/usb/usbdevs_data.h48
-rw-r--r--sys/i386/conf/GENERIC1
-rw-r--r--sys/i386/conf/LINT5
-rw-r--r--sys/i386/conf/NEWCARD1
-rw-r--r--sys/i386/conf/NOTES5
-rw-r--r--sys/i386/conf/PCCARD1
-rw-r--r--sys/i386/i386/userconfig.c1
-rw-r--r--sys/modules/Makefile2
-rw-r--r--sys/modules/kue/Makefile10
-rw-r--r--sys/pc98/conf/GENERIC1
-rw-r--r--sys/pc98/conf/GENERIC981
-rw-r--r--usr.sbin/sade/devices.c1
-rw-r--r--usr.sbin/sysinstall/devices.c1
32 files changed, 2191 insertions, 11 deletions
diff --git a/release/sysinstall/devices.c b/release/sysinstall/devices.c
index dbe28e9..a7591b9 100644
--- a/release/sysinstall/devices.c
+++ b/release/sysinstall/devices.c
@@ -100,6 +100,7 @@ static struct _devname {
{ DEVICE_TYPE_NETWORK, "fe", "Fujitsu MB86960A/MB86965A ethernet card" },
{ DEVICE_TYPE_NETWORK, "ie", "AT&T StarLAN 10 and EN100; 3Com 3C507; NI5210" },
{ DEVICE_TYPE_NETWORK, "ix", "Intel Etherexpress ethernet card" },
+ { DEVICE_TYPE_NETWORK, "kue", "Kawasaki LSI USB ethernet adapter" },
{ DEVICE_TYPE_NETWORK, "le", "DEC EtherWorks 2 or 3 ethernet card" },
{ DEVICE_TYPE_NETWORK, "lnc", "Lance/PCnet (Isolan/Novell NE2100/NE32-VL) ethernet" },
{ DEVICE_TYPE_NETWORK, "rl", "RealTek 8129/8139 PCI ethernet card" },
diff --git a/release/texts/alpha/HARDWARE.TXT b/release/texts/alpha/HARDWARE.TXT
index 1732c67..1786f81 100644
--- a/release/texts/alpha/HARDWARE.TXT
+++ b/release/texts/alpha/HARDWARE.TXT
@@ -371,6 +371,14 @@ ADMtek Inc. AN986-based USB ethernet NICs including the following:
Billionton USB100
Melco Inc. LU-ATX
+Kawasaki LSI KU5KUSB101B-based USB ethernet NICs including
+the following:
+ LinkSys USB10T
+ Entrega NET-USB-E45
+ Peracom USB Ethernet Adapter
+ 3Com 3c19250
+ ADS Technologies USB-10BT
+
ASIX Electronics AX88140A PCI NICs, including the following:
Alfa Inc. GFC2204
CNet Pro110B
diff --git a/release/texts/alpha/RELNOTES.TXT b/release/texts/alpha/RELNOTES.TXT
index 81dbf1d..f5d6e87 100644
--- a/release/texts/alpha/RELNOTES.TXT
+++ b/release/texts/alpha/RELNOTES.TXT
@@ -135,6 +135,11 @@ PCI ethernet NIC. [MERGED]
Driver support has been added for USB ethernet adapters based on
the ADMtek AN986 Pegasus chip, including the LinkSys USB100TX.
+Driver support has been added for USB ethernet adapters based on
+the Kawasaki LSI KL5KUSB101B chip, including the LinkSys USB10T,
+the Peracom USB Ethernet Adapter, the 3Com 3c19250, the Entrega
+NET-USB-E45 and the ADS Technologies USB-10BT.
+
1.2. SECURITY FIXES
-------------------
diff --git a/release/texts/i386/HARDWARE.TXT b/release/texts/i386/HARDWARE.TXT
index 6b691caa..8c8e489 100644
--- a/release/texts/i386/HARDWARE.TXT
+++ b/release/texts/i386/HARDWARE.TXT
@@ -495,6 +495,14 @@ ADMtek Inc. AN986-based USB ethernet NICs including the following:
Billionton USB100
Melco Inc. LU-ATX
+Kawasaki LSI KU5KUSB101B-based USB ethernet NICs including
+the following:
+ LinkSys USB10T
+ Entrega NET-USB-E45
+ Peracom USB Ethernet Adapter
+ 3Com 3c19250
+ ADS Technologies USB-10BT
+
ASIX Electronics AX88140A PCI NICs, including the following:
Alfa Inc. GFC2204
CNet Pro110B
diff --git a/release/texts/i386/RELNOTES.TXT b/release/texts/i386/RELNOTES.TXT
index 08117cd..7596244 100644
--- a/release/texts/i386/RELNOTES.TXT
+++ b/release/texts/i386/RELNOTES.TXT
@@ -137,6 +137,11 @@ PCI ethernet NIC. [MERGED]
Driver support has been added for USB ethernet adapters based on
the ADMtek AN986 Pegasus chip, including the LinkSys USB100TX.
+Driver support has been added for USB ethernet adapters based on
+the Kawasaki LSI KL5KUSB101B chip, including the LinkSys USB10T,
+the Peracom USB Ethernet Adapter, the 3Com 3c19250, the Entrega
+NET-USB-E45 and the ADS Technologies USB-10BT.
+
1.2. SECURITY FIXES
-------------------
@@ -372,6 +377,14 @@ ADMtek Inc. AN986-based USB ethernet NICs including the following:
Billionton USB100
Melco Inc. LU-ATX
+Kawasaki LSI KU5KUSB101B-based USB ethernet NICs including
+the following:
+ LinkSys USB10T
+ Entrega NET-USB-E45
+ Peracom USB Ethernet Adapter
+ 3Com 3c19250
+ ADS Technologies USB-10BT
+
ASIX Electronics AX88140A PCI NICs, including the following:
Alfa Inc. GFC2204
CNet Pro110B
diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index 6c1d241..6fb71be 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -6,7 +6,7 @@ MAN4= ahc.4 alpm.4 amd.4 atkbd.4 atkbdc.4 aue.4 blackhole.4 bpf.4 \
divert.4 drum.4 dummynet.4 fd.4 fdc.4 fpa.4 fxp.4 \
icmp.4 ifmib.4 iic.4 iicbb.4 iicbus.4 iicsmb.4 \
inet.4 intpm.4 intro.4 ip.4 ipfirewall.4 keyboard.4 kld.4 \
- lo.4 lp.4 lpbb.4 lpt.4 mem.4 mouse.4 mtio.4 natm.4 ncr.4 \
+ kue.4 lo.4 lp.4 lpbb.4 lpt.4 mem.4 mouse.4 mtio.4 natm.4 ncr.4 \
netintro.4 null.4 ohci.4 pass.4 pci.4 pcm.4 pcvt.4 \
ppbus.4 ppi.4 ppp.4 psm.4 pt.4 pty.4 rl.4 \
route.4 sa.4 screen.4 scsi.4 \
diff --git a/share/man/man4/kue.4 b/share/man/man4/kue.4
new file mode 100644
index 0000000..8b10c1f
--- /dev/null
+++ b/share/man/man4/kue.4
@@ -0,0 +1,91 @@
+.\" Copyright (c) 1997, 1998, 1999, 2000
+.\" Bill Paul <wpaul@ee.columbia.edu>. 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.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Bill Paul.
+.\" 4. Neither the name of the author nor the names of any co-contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD
+.\" 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$
+.\"
+.Dd January 4, 1999
+.Dt KUE 4 i386
+.Os FreeBSD
+.Sh NAME
+.Nm kue
+.Nd
+Kawasaki LSI KL5KUSB101B USB Ethernet driver
+.Sh SYNOPSIS
+.Cd "controller uhci0"
+.Cd "controller ohci0"
+.Cd "controller usb0"
+.Cd "device kue0"
+.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 and the
+Entrega NET-USB-E45.
+.Pp
+The Pegasus 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
+are no
+.Xr ifmedia 4
+modes to select.
+.Pp
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "kue%d: watchdog timeout"
+A packet was queued for transmission and a transmit command was
+issued, however the device failed to acknowledge the transmission
+before a timeout expired.
+.It "kue%d: no memory for rx list"
+The driver failed to allocate an mbuf for the receiver ring.
+.El
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr ifconfig 8
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 4.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Bill Paul Aq wpaul@ee.columbia.edu .
+.Sh BUGS
+The
+.Nm
+driver does not accumulate ethernet collisions statistics because the
+Kawasaki firmware does not appear to maintain any internal statistics.
diff --git a/sys/alpha/conf/GENERIC b/sys/alpha/conf/GENERIC
index d1afe31..b00a9da 100644
--- a/sys/alpha/conf/GENERIC
+++ b/sys/alpha/conf/GENERIC
@@ -155,3 +155,4 @@ pseudo-device bpf #Berkeley packet filter
#controller umass0 # Disks/Mass storage - Requires scbus and da0
#device ums0 # Mouse
#device aue0 # ADMtek USB ethernet
+#device kue0 # Kawasaki LSI USB ethernet
diff --git a/sys/alpha/conf/NOTES b/sys/alpha/conf/NOTES
index d1afe31..b00a9da 100644
--- a/sys/alpha/conf/NOTES
+++ b/sys/alpha/conf/NOTES
@@ -155,3 +155,4 @@ pseudo-device bpf #Berkeley packet filter
#controller umass0 # Disks/Mass storage - Requires scbus and da0
#device ums0 # Mouse
#device aue0 # ADMtek USB ethernet
+#device kue0 # Kawasaki LSI USB ethernet
diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC
index b638840..7ffb9ff 100644
--- a/sys/amd64/conf/GENERIC
+++ b/sys/amd64/conf/GENERIC
@@ -216,3 +216,4 @@ pseudo-device bpf #Berkeley packet filter
#controller umass0 # Disks/Mass storage - Requires scbus and da0
#device ums0 # Mouse
#device aue0 # ADMtek USB ethernet
+#device kue0 # Kawasaki LSI USB ethernet
diff --git a/sys/boot/forth/loader.conf b/sys/boot/forth/loader.conf
index 4421df4..ef31231 100644
--- a/sys/boot/forth/loader.conf
+++ b/sys/boot/forth/loader.conf
@@ -167,6 +167,7 @@ ulpt_load="NO" # Printer
ums_load="NO" # Mouse
umass_load="NO" # Mass Storage Devices
if_aue_load="NO" # ADMtek USB ethernet
+if_kue_load="NO" # Kawasaki LSI USB ethernet
##############################################################
### Other modules ##########################################
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index 069aee5..66ede1e 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -2346,6 +2346,11 @@ device ums0
# the Billionton USB100 and the Melco LU-ATX NICs. Also
# works with the ADMtek AN986 Pegasus eval board.
device aue0
+#
+# Kawasaki LSI ethernet. Supports the LinkSys USB10T,
+# Entrega USB-NET-E45, Peracom Ethernet Adapter, and
+# the 3Com 3c19250.
+device kue0
# debugging options for the USB subsystem
#
diff --git a/sys/conf/files b/sys/conf/files
index 1df355a..9f029a8 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -880,6 +880,7 @@ dev/usb/ukbd.c optional ukbd
dev/usb/umass.c optional umass
dev/usb/uhub.c optional usb
dev/usb/if_aue.c optional aue
+dev/usb/if_kue.c optional kue
isa_if.o optional isa \
dependency "isa_if.c isa_if.h" \
compile-with "${NORMAL_C}" \
diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c
new file mode 100644
index 0000000..f26bc2c
--- /dev/null
+++ b/sys/dev/usb/if_kue.c
@@ -0,0 +1,1083 @@
+/*
+ * Copyright (c) 1997, 1998, 1999
+ * Bill Paul <wpaul@ee.columbia.edu>. 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.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Bill Paul.
+ * 4. Neither the name of the author nor the names of any co-contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD
+ * 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$
+ */
+
+/*
+ * Written by Bill Paul <wpaul@ee.columbia.edu>
+ * Electrical Engineering Department
+ * Columbia University, New York City
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/sockio.h>
+#include <sys/mbuf.h>
+#include <sys/malloc.h>
+#include <sys/kernel.h>
+#include <sys/socket.h>
+
+#include <net/if.h>
+#include <net/if_arp.h>
+#include <net/ethernet.h>
+#include <net/if_dl.h>
+#include <net/if_media.h>
+
+#include <net/bpf.h>
+
+#include <vm/vm.h> /* for vtophys */
+#include <vm/pmap.h> /* for vtophys */
+#include <machine/clock.h> /* for DELAY */
+#include <machine/bus_pio.h>
+#include <machine/bus_memio.h>
+#include <machine/bus.h>
+#include <machine/resource.h>
+#include <sys/bus.h>
+#include <sys/rman.h>
+
+#include <dev/usb/usb.h>
+#include <dev/usb/usbdi.h>
+#include <dev/usb/usbdi_util.h>
+#include <dev/usb/usbdivar.h>
+#include <dev/usb/usbdevs.h>
+
+#include <dev/usb/if_kuereg.h>
+#include <dev/usb/kue_fw.h>
+
+#ifndef lint
+static const char rcsid[] =
+ "$FreeBSD$";
+#endif
+
+/*
+ * Various supported device vendors/types and their names.
+ */
+static struct kue_type kue_devs[] = {
+ { USB_VENDOR_KLSI, USB_PRODUCT_KLSI_USB101,
+ "KLSI USB ethernet" },
+ { USB_VENDOR_ADS, USB_PRODUCT_ADS_ENET,
+ "KLSI USB ethernet" },
+ { USB_VENDOR_PERACOM, USB_PRODUCT_PERACOM_ENET,
+ "KLSI USB ethernet" },
+ { USB_VENDOR_PERACOM, USB_PRODUCT_PERACOM_ENET2,
+ "KLSI USB ethernet" },
+ { USB_VENDOR_ENTREGA, USB_PRODUCT_ENTREGA_E45,
+ "KLSI USB ethernet" },
+ { 0, 0, NULL }
+};
+
+static int kue_match __P((device_t));
+static int kue_attach __P((device_t));
+static int kue_detach __P((device_t));
+static void kue_shutdown __P((device_t));
+static int kue_tx_list_init __P((struct kue_softc *));
+static int kue_rx_list_init __P((struct kue_softc *));
+static int kue_newbuf __P((struct kue_softc *, struct kue_chain *,
+ struct mbuf *));
+static int kue_encap __P((struct kue_softc *, struct mbuf *, int));
+static void kue_rxeof __P((usbd_xfer_handle,
+ usbd_private_handle, usbd_status));
+static void kue_txeof __P((usbd_xfer_handle,
+ usbd_private_handle, usbd_status));
+static void kue_start __P((struct ifnet *));
+static int kue_ioctl __P((struct ifnet *, u_long, caddr_t));
+static void kue_init __P((void *));
+static void kue_stop __P((struct kue_softc *));
+static void kue_watchdog __P((struct ifnet *));
+
+static void kue_setmulti __P((struct kue_softc *));
+static void kue_reset __P((struct kue_softc *));
+
+static usbd_status kue_do_request
+ __P((usbd_device_handle,
+ usb_device_request_t *, void *));
+static usbd_status kue_ctl __P((struct kue_softc *, int, u_int8_t,
+ u_int16_t, char *, int));
+static usbd_status kue_setword __P((struct kue_softc *, u_int8_t, u_int16_t));
+static int kue_load_fw __P((struct kue_softc *));
+
+static device_method_t kue_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, kue_match),
+ DEVMETHOD(device_attach, kue_attach),
+ DEVMETHOD(device_detach, kue_detach),
+ DEVMETHOD(device_shutdown, kue_shutdown),
+
+ { 0, 0 }
+};
+
+static driver_t kue_driver = {
+ "kue",
+ kue_methods,
+ sizeof(struct kue_softc)
+};
+
+static devclass_t kue_devclass;
+
+DRIVER_MODULE(if_kue, uhub, kue_driver, kue_devclass, usbd_driver_load, 0);
+
+/*
+ * We have a custom do_request function which is almost like the
+ * regular do_request function, except it has a much longer timeout.
+ * Why? Because we need to make requests over the control endpoint
+ * to download the firmware to the device, which can take longer
+ * than the default timeout.
+ */
+static usbd_status kue_do_request(dev, req, data)
+ usbd_device_handle dev;
+ usb_device_request_t *req;
+ void *data;
+{
+ usbd_xfer_handle xfer;
+ usbd_status err;
+
+ xfer = usbd_alloc_xfer(dev);
+ usbd_setup_default_xfer(xfer, dev, 0, 500000, req,
+ data, UGETW(req->wLength), USBD_SHORT_XFER_OK, 0);
+ err = usbd_sync_transfer(xfer);
+ usbd_free_xfer(xfer);
+ return(err);
+}
+
+static usbd_status kue_setword(sc, breq, word)
+ struct kue_softc *sc;
+ u_int8_t breq;
+ u_int16_t word;
+{
+ usbd_device_handle dev;
+ usb_device_request_t req;
+ usbd_status err;
+ int s;
+
+ dev = sc->kue_udev;
+
+ s = splusb();
+
+ req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
+
+ req.bRequest = breq;
+ USETW(req.wValue, word);
+ USETW(req.wIndex, 0);
+ USETW(req.wLength, 0);
+
+ err = kue_do_request(dev, &req, NULL);
+
+ splx(s);
+
+ return(err);
+}
+
+static usbd_status kue_ctl(sc, rw, breq, val, data, len)
+ struct kue_softc *sc;
+ int rw;
+ u_int8_t breq;
+ u_int16_t val;
+ char *data;
+ int len;
+{
+ usbd_device_handle dev;
+ usb_device_request_t req;
+ usbd_status err;
+ int s;
+
+ dev = sc->kue_udev;
+
+ s = splusb();
+
+ if (rw == KUE_CTL_WRITE)
+ req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
+ else
+ req.bmRequestType = UT_READ_VENDOR_DEVICE;
+
+ req.bRequest = breq;
+ USETW(req.wValue, val);
+ USETW(req.wIndex, 0);
+ USETW(req.wLength, len);
+
+ err = kue_do_request(dev, &req, data);
+
+ splx(s);
+
+ return(err);
+}
+
+static int kue_load_fw(sc)
+ struct kue_softc *sc;
+{
+ usbd_status err;
+
+ /* Load code segment */
+ err = kue_ctl(sc, KUE_CTL_WRITE, KUE_CMD_SEND_SCAN,
+ 0, kue_code_seg, sizeof(kue_code_seg));
+ if (err) {
+ printf("kue%d: failed to load code segment: %s\n",
+ sc->kue_unit, usbd_errstr(err));
+ return(ENXIO);
+ }
+
+ /* Load fixup segment */
+ err = kue_ctl(sc, KUE_CTL_WRITE, KUE_CMD_SEND_SCAN,
+ 0, kue_fix_seg, sizeof(kue_fix_seg));
+ if (err) {
+ printf("kue%d: failed to load fixup segment: %s\n",
+ sc->kue_unit, usbd_errstr(err));
+ return(ENXIO);
+ }
+
+ /* Send trigger command. */
+ err = kue_ctl(sc, KUE_CTL_WRITE, KUE_CMD_SEND_SCAN,
+ 0, kue_trig_seg, sizeof(kue_trig_seg));
+ if (err) {
+ printf("kue%d: failed to load fixup segment: %s\n",
+ sc->kue_unit, usbd_errstr(err));
+ return(ENXIO);
+ }
+
+ return(0);
+}
+
+static void kue_setmulti(sc)
+ struct kue_softc *sc;
+{
+ struct ifnet *ifp;
+ struct ifmultiaddr *ifma;
+ int i = 0;
+
+ ifp = &sc->arpcom.ac_if;
+
+ if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) {
+ sc->kue_rxfilt |= KUE_RXFILT_ALLMULTI;
+ sc->kue_rxfilt &= ~KUE_RXFILT_MULTICAST;
+ kue_setword(sc, KUE_CMD_SET_PKT_FILTER, sc->kue_rxfilt);
+ return;
+ }
+
+ sc->kue_rxfilt &= ~KUE_RXFILT_ALLMULTI;
+
+ for (ifma = ifp->if_multiaddrs.lh_first; ifma != NULL;
+ ifma = ifma->ifma_link.le_next) {
+ if (ifma->ifma_addr->sa_family != AF_LINK)
+ continue;
+ /*
+ * If there are too many addresses for the
+ * internal filter, switch over to allmulti mode.
+ */
+ if (i == KUE_MCFILTCNT(sc)) {
+ i = 0;
+ break;
+ }
+ bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr),
+ KUE_MCFILT(sc, i), ETHER_ADDR_LEN);
+ i++;
+ }
+
+ if (i) {
+ sc->kue_rxfilt |= KUE_RXFILT_MULTICAST;
+ kue_ctl(sc, KUE_CTL_WRITE, KUE_CMD_SET_MCAST_FILTERS,
+ i, sc->kue_mcfilters, i * ETHER_ADDR_LEN);
+ } else
+ sc->kue_rxfilt |= KUE_RXFILT_ALLMULTI;
+
+ kue_setword(sc, KUE_CMD_SET_PKT_FILTER, sc->kue_rxfilt);
+
+ return;
+}
+
+/*
+ * Issue a SET_CONFIGURATION command to reset the MAC. This should be
+ * done after the firmware is loaded into the adapter in order to
+ * bring it into proper operation.
+ */
+static void kue_reset(sc)
+ struct kue_softc *sc;
+{
+ usbd_set_config_no(sc->kue_udev, 1, 0);
+ /* Wait a little while for the chip to get its brains in order. */
+ DELAY(1000);
+ return;
+}
+
+/*
+ * Probe for a KLSI chip.
+ */
+USB_MATCH(kue)
+{
+ USB_MATCH_START(kue, uaa);
+ struct kue_type *t;
+
+ if (!uaa->iface)
+ return(UMATCH_NONE);
+
+ t = kue_devs;
+ while(t->kue_name != NULL) {
+ if (uaa->vendor == t->kue_vid &&
+ uaa->product == t->kue_did) {
+ device_set_desc(self, t->kue_name);
+ return(UMATCH_VENDOR_PRODUCT);
+ }
+ t++;
+ }
+
+ return(UMATCH_NONE);
+}
+
+/*
+ * Attach the interface. Allocate softc structures, do
+ * setup and ethernet/BPF attach.
+ */
+USB_ATTACH(kue)
+{
+ USB_ATTACH_START(kue, sc, uaa);
+ char devinfo[1024];
+ int s;
+ struct ifnet *ifp;
+ usbd_status err;
+ usb_interface_descriptor_t *id;
+ usb_endpoint_descriptor_t *ed;
+ int i;
+
+ s = splimp();
+
+ bzero(sc, sizeof(struct kue_softc));
+ sc->kue_iface = uaa->iface;
+ sc->kue_udev = uaa->device;
+ sc->kue_unit = device_get_unit(self);
+
+ id = usbd_get_interface_descriptor(uaa->iface);
+
+ usbd_devinfo(uaa->device, 0, devinfo);
+ device_set_desc_copy(self, devinfo);
+ printf("%s: %s\n", USBDEVNAME(self), devinfo);
+
+ /* Find endpoints. */
+ for (i = 0; i < id->bNumEndpoints; i++) {
+ ed = usbd_interface2endpoint_descriptor(uaa->iface, i);
+ if (!ed) {
+ printf("kue%d: couldn't get ep %d\n",
+ sc->kue_unit, i);
+ splx(s);
+ USB_ATTACH_ERROR_RETURN;
+ }
+ if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN &&
+ (ed->bmAttributes & UE_XFERTYPE) == UE_BULK) {
+ sc->kue_ed[KUE_ENDPT_RX] = ed->bEndpointAddress;
+ } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT &&
+ (ed->bmAttributes & UE_XFERTYPE) == UE_BULK) {
+ sc->kue_ed[KUE_ENDPT_TX] = ed->bEndpointAddress;
+ } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN &&
+ (ed->bmAttributes & UE_XFERTYPE) == UE_INTERRUPT) {
+ sc->kue_ed[KUE_ENDPT_INTR] = ed->bEndpointAddress;
+ }
+ }
+
+ /* Load the firmware into the NIC. */
+ if (kue_load_fw(sc)) {
+ splx(s);
+ USB_ATTACH_ERROR_RETURN;
+ }
+
+ /* Reset the adapter. */
+ kue_reset(sc);
+
+ /* Read ethernet descriptor */
+ err = kue_ctl(sc, KUE_CTL_READ, KUE_CMD_GET_ETHER_DESCRIPTOR,
+ 0, (char *)&sc->kue_desc, sizeof(sc->kue_desc));
+
+ sc->kue_mcfilters = malloc(KUE_MCFILTCNT(sc) * ETHER_ADDR_LEN,
+ M_USBDEV, M_NOWAIT);
+
+ /*
+ * A KLSI chip was detected. Inform the world.
+ */
+ printf("kue%d: Ethernet address: %6D\n", sc->kue_unit,
+ sc->kue_desc.kue_macaddr, ":");
+
+ bcopy(sc->kue_desc.kue_macaddr,
+ (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
+
+ ifp = &sc->arpcom.ac_if;
+ ifp->if_softc = sc;
+ ifp->if_unit = sc->kue_unit;
+ ifp->if_name = "kue";
+ ifp->if_mtu = ETHERMTU;
+ ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
+ ifp->if_ioctl = kue_ioctl;
+ ifp->if_output = ether_output;
+ ifp->if_start = kue_start;
+ ifp->if_watchdog = kue_watchdog;
+ ifp->if_init = kue_init;
+ ifp->if_baudrate = 10000000;
+ ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
+
+ /*
+ * Call MI attach routines.
+ */
+ if_attach(ifp);
+ ether_ifattach(ifp);
+ bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
+
+ splx(s);
+ USB_ATTACH_SUCCESS_RETURN;
+}
+
+static int kue_detach(dev)
+ device_t dev;
+{
+ struct kue_softc *sc;
+ struct ifnet *ifp;
+ int s;
+
+ s = splusb();
+
+ sc = device_get_softc(dev);
+ ifp = &sc->arpcom.ac_if;
+
+ if (ifp != NULL)
+ if_detach(ifp);
+
+ if (sc->kue_ep[KUE_ENDPT_TX] != NULL)
+ usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_TX]);
+ if (sc->kue_ep[KUE_ENDPT_RX] != NULL)
+ usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_RX]);
+ if (sc->kue_ep[KUE_ENDPT_INTR] != NULL)
+ usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_INTR]);
+
+ if (sc->kue_mcfilters != NULL)
+ free(sc->kue_mcfilters, M_USBDEV);
+
+ splx(s);
+
+ return(0);
+}
+
+/*
+ * Initialize an RX descriptor and attach an MBUF cluster.
+ */
+static int kue_newbuf(sc, c, m)
+ struct kue_softc *sc;
+ struct kue_chain *c;
+ struct mbuf *m;
+{
+ struct mbuf *m_new = NULL;
+
+ if (m == NULL) {
+ MGETHDR(m_new, M_DONTWAIT, MT_DATA);
+ if (m_new == NULL) {
+ printf("kue%d: no memory for rx list "
+ "-- packet dropped!\n", sc->kue_unit);
+ return(ENOBUFS);
+ }
+
+ MCLGET(m_new, M_DONTWAIT);
+ if (!(m_new->m_flags & M_EXT)) {
+ printf("kue%d: no memory for rx list "
+ "-- packet dropped!\n", sc->kue_unit);
+ m_freem(m_new);
+ return(ENOBUFS);
+ }
+ m_new->m_len = m_new->m_pkthdr.len = MCLBYTES;
+ } else {
+ m_new = m;
+ m_new->m_len = m_new->m_pkthdr.len = MCLBYTES;
+ m_new->m_data = m_new->m_ext.ext_buf;
+ }
+
+ c->kue_mbuf = m_new;
+
+ return(0);
+}
+
+static int kue_rx_list_init(sc)
+ struct kue_softc *sc;
+{
+ struct kue_cdata *cd;
+ struct kue_chain *c;
+ int i;
+
+ cd = &sc->kue_cdata;
+ for (i = 0; i < KUE_RX_LIST_CNT; i++) {
+ c = &cd->kue_rx_chain[i];
+ c->kue_sc = sc;
+ c->kue_idx = i;
+ c->kue_accum = 0;
+ if (kue_newbuf(sc, c, NULL) == ENOBUFS)
+ return(ENOBUFS);
+ if (c->kue_xfer == NULL) {
+ c->kue_xfer = usbd_alloc_xfer(sc->kue_udev);
+ if (c->kue_xfer == NULL)
+ return(ENOBUFS);
+ }
+ }
+
+ return(0);
+}
+
+static int kue_tx_list_init(sc)
+ struct kue_softc *sc;
+{
+ struct kue_cdata *cd;
+ struct kue_chain *c;
+ int i;
+
+ cd = &sc->kue_cdata;
+ for (i = 0; i < KUE_TX_LIST_CNT; i++) {
+ c = &cd->kue_tx_chain[i];
+ c->kue_sc = sc;
+ c->kue_idx = i;
+ c->kue_mbuf = NULL;
+ if (c->kue_xfer == NULL) {
+ c->kue_xfer = usbd_alloc_xfer(sc->kue_udev);
+ if (c->kue_xfer == NULL)
+ return(ENOBUFS);
+ }
+ c->kue_buf = malloc(KUE_BUFSZ, M_USBDEV, M_NOWAIT);
+ if (c->kue_buf == NULL)
+ return(ENOBUFS);
+ }
+
+ return(0);
+}
+
+/*
+ * A frame has been uploaded: pass the resulting mbuf chain up to
+ * the higher level protocols.
+ *
+ * Grrr. Receiving transfers larger than about 1152 bytes sometimes
+ * doesn't work. We get an incomplete frame. In order to avoid
+ * this, we queue up RX transfers that are shorter than a full sized
+ * frame. If the received frame is larger than our transfer size,
+ * we snag the rest of the data using a second transfer. Does this
+ * hurt performance? Yes. But after fighting with this stupid thing
+ * for three days, I'm willing to settle. I'd rather have reliable
+ * receive performance that fast but spotty performance.
+ */
+static void kue_rxeof(xfer, priv, status)
+ usbd_xfer_handle xfer;
+ usbd_private_handle priv;
+ usbd_status status;
+{
+ struct kue_softc *sc;
+ struct kue_chain *c;
+ struct ether_header *eh;
+ struct mbuf *m;
+ struct ifnet *ifp;
+ int total_len = 0;
+ u_int16_t len;
+ int s;
+
+ s = splimp();
+
+ c = priv;
+ sc = c->kue_sc;
+ ifp = &sc->arpcom.ac_if;
+
+ if (!(ifp->if_flags & IFF_RUNNING)) {
+ return;
+ splx(s);
+ }
+
+ if (status != USBD_NORMAL_COMPLETION) {
+ if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) {
+ splx(s);
+ return;
+ }
+ printf("kue%d: usb error on rx: %s\n", sc->kue_unit,
+ usbd_errstr(status));
+ if (status == USBD_STALLED)
+ usbd_clear_endpoint_stall(sc->kue_ep[KUE_ENDPT_RX]);
+ goto done;
+ }
+
+ usbd_get_xfer_status(xfer, NULL, NULL, &total_len, NULL);
+ m = c->kue_mbuf;
+ if (total_len == 1)
+ goto done;
+
+ len = *mtod(m, u_int16_t *);
+ m_adj(m, sizeof(u_int16_t));
+
+ /* No errors; receive the packet. */
+ total_len = len;
+ if (kue_newbuf(sc, c, NULL) == ENOBUFS) {
+ ifp->if_ierrors++;
+ goto done;
+ }
+
+ ifp->if_ipackets++;
+ eh = mtod(m, struct ether_header *);
+ m->m_pkthdr.rcvif = ifp;
+ m->m_pkthdr.len = m->m_len = total_len;
+
+ /*
+ * Handle BPF listeners. Let the BPF user see the packet, but
+ * don't pass it up to the ether_input() layer unless it's
+ * a broadcast packet, multicast packet, matches our ethernet
+ * address or the interface is in promiscuous mode.
+ */
+ if (ifp->if_bpf) {
+ bpf_mtap(ifp, m);
+ if (ifp->if_flags & IFF_PROMISC &&
+ (bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr,
+ ETHER_ADDR_LEN) && !(eh->ether_dhost[0] & 1))) {
+ m_freem(m);
+ goto done;
+ }
+ }
+
+ /* Remove header from mbuf and pass it on. */
+ m_adj(m, sizeof(struct ether_header));
+ ether_input(ifp, eh, m);
+
+done:
+
+ /* Setup new transfer. */
+ usbd_setup_xfer(xfer, sc->kue_ep[KUE_ENDPT_RX],
+ c, mtod(c->kue_mbuf, char *), KUE_BUFSZ, USBD_SHORT_XFER_OK,
+ USBD_NO_TIMEOUT, kue_rxeof);
+ usbd_transfer(xfer);
+
+ splx(s);
+
+ return;
+}
+
+/*
+ * A frame was downloaded to the chip. It's safe for us to clean up
+ * the list buffers.
+ */
+
+static void kue_txeof(xfer, priv, status)
+ usbd_xfer_handle xfer;
+ usbd_private_handle priv;
+ usbd_status status;
+{
+ struct kue_softc *sc;
+ struct kue_chain *c;
+ struct ifnet *ifp;
+ usbd_status err;
+ int s;
+
+ s = splimp();
+
+ c = priv;
+ sc = c->kue_sc;
+ ifp = &sc->arpcom.ac_if;
+ ifp->if_timer = 0;
+ ifp->if_flags &= ~IFF_OACTIVE;
+
+ if (status != USBD_NORMAL_COMPLETION) {
+ if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) {
+ splx(s);
+ return;
+ }
+ printf("kue%d: usb error on tx: %s\n", sc->kue_unit,
+ usbd_errstr(status));
+ if (status == USBD_STALLED)
+ usbd_clear_endpoint_stall(sc->kue_ep[KUE_ENDPT_TX]);
+ splx(s);
+ return;
+ }
+
+ usbd_get_xfer_status(c->kue_xfer, NULL, NULL, NULL, &err);
+
+ m_freem(c->kue_mbuf);
+ c->kue_mbuf = NULL;
+
+ if (err)
+ ifp->if_oerrors++;
+ else
+ ifp->if_opackets++;
+
+ if (ifp->if_snd.ifq_head != NULL)
+ kue_start(ifp);
+
+ splx(s);
+
+ return;
+}
+
+static int kue_encap(sc, m, idx)
+ struct kue_softc *sc;
+ struct mbuf *m;
+ int idx;
+{
+ int total_len;
+ struct kue_chain *c;
+ usbd_status err;
+
+ c = &sc->kue_cdata.kue_tx_chain[idx];
+
+ /*
+ * Copy the mbuf data into a contiguous buffer, leaving two
+ * bytes at the beginning to hold the frame length.
+ */
+ m_copydata(m, 0, m->m_pkthdr.len, c->kue_buf + 2);
+ c->kue_mbuf = m;
+
+ total_len = m->m_pkthdr.len + 2;
+ total_len += 64 - (total_len % 64);
+
+ /*
+ * The ADMtek documentation says that the packet length is
+ * supposed to be specified in the first two bytes of the
+ * transfer, however it actually seems to ignore this info
+ * and base the frame size on the bulk transfer length.
+ */
+ c->kue_buf[0] = (u_int8_t)m->m_pkthdr.len;
+ c->kue_buf[1] = (u_int8_t)(m->m_pkthdr.len >> 8);
+
+ usbd_setup_xfer(c->kue_xfer, sc->kue_ep[KUE_ENDPT_TX],
+ c, c->kue_buf, total_len, 0, 10000, kue_txeof);
+
+ /* Transmit */
+ err = usbd_transfer(c->kue_xfer);
+ if (err != USBD_IN_PROGRESS) {
+ kue_stop(sc);
+ return(EIO);
+ }
+
+ sc->kue_cdata.kue_tx_cnt++;
+
+ return(0);
+}
+
+static void kue_start(ifp)
+ struct ifnet *ifp;
+{
+ struct kue_softc *sc;
+ struct mbuf *m_head = NULL;
+
+ sc = ifp->if_softc;
+
+ if (ifp->if_flags & IFF_OACTIVE)
+ return;
+
+ IF_DEQUEUE(&ifp->if_snd, m_head);
+ if (m_head == NULL)
+ return;
+
+ if (kue_encap(sc, m_head, 0)) {
+ IF_PREPEND(&ifp->if_snd, m_head);
+ ifp->if_flags |= IFF_OACTIVE;
+ return;
+ }
+
+ /*
+ * If there's a BPF listener, bounce a copy of this frame
+ * to him.
+ */
+ if (ifp->if_bpf)
+ bpf_mtap(ifp, m_head);
+
+ ifp->if_flags |= IFF_OACTIVE;
+
+ /*
+ * Set a timeout in case the chip goes out to lunch.
+ */
+ ifp->if_timer = 5;
+
+ return;
+}
+
+static void kue_init(xsc)
+ void *xsc;
+{
+ struct kue_softc *sc = xsc;
+ struct ifnet *ifp = &sc->arpcom.ac_if;
+ struct kue_chain *c;
+ usbd_status err;
+ int i, s;
+
+ if (ifp->if_flags & IFF_RUNNING)
+ return;
+
+ s = splimp();
+
+ /* Set MAC address */
+ kue_ctl(sc, KUE_CTL_WRITE, KUE_CMD_SET_MAC,
+ 0, sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
+
+ sc->kue_rxfilt = KUE_RXFILT_UNICAST|KUE_RXFILT_BROADCAST;
+
+ /* If we want promiscuous mode, set the allframes bit. */
+ if (ifp->if_flags & IFF_PROMISC)
+ sc->kue_rxfilt |= KUE_RXFILT_PROMISC;
+
+ kue_setword(sc, KUE_CMD_SET_PKT_FILTER, sc->kue_rxfilt);
+
+ /* I'm not sure how to tune these. */
+ kue_setword(sc, KUE_CMD_SET_SOFS, 1);
+ kue_setword(sc, KUE_CMD_SET_URB_SIZE, 64);
+
+ /* Init TX ring. */
+ if (kue_tx_list_init(sc) == ENOBUFS) {
+ printf("kue%d: tx list init failed\n", sc->kue_unit);
+ splx(s);
+ return;
+ }
+
+ /* Init RX ring. */
+ if (kue_rx_list_init(sc) == ENOBUFS) {
+ printf("kue%d: rx list init failed\n", sc->kue_unit);
+ splx(s);
+ return;
+ }
+
+ /* Load the multicast filter. */
+ kue_setmulti(sc);
+
+ /* Open RX and TX pipes. */
+ err = usbd_open_pipe(sc->kue_iface, sc->kue_ed[KUE_ENDPT_RX],
+ USBD_EXCLUSIVE_USE, &sc->kue_ep[KUE_ENDPT_RX]);
+ if (err) {
+ printf("kue%d: open rx pipe failed: %s\n",
+ sc->kue_unit, usbd_errstr(err));
+ splx(s);
+ return;
+ }
+
+ err = usbd_open_pipe(sc->kue_iface, sc->kue_ed[KUE_ENDPT_TX],
+ USBD_EXCLUSIVE_USE, &sc->kue_ep[KUE_ENDPT_TX]);
+ if (err) {
+ printf("kue%d: open tx pipe failed: %s\n",
+ sc->kue_unit, usbd_errstr(err));
+ splx(s);
+ return;
+ }
+
+ /* Start up the receive pipe. */
+ for (i = 0; i < KUE_RX_LIST_CNT; i++) {
+ c = &sc->kue_cdata.kue_rx_chain[i];
+ usbd_setup_xfer(c->kue_xfer, sc->kue_ep[KUE_ENDPT_RX],
+ c, mtod(c->kue_mbuf, char *), KUE_BUFSZ,
+ USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT, kue_rxeof);
+ usbd_transfer(c->kue_xfer);
+ }
+
+ ifp->if_flags |= IFF_RUNNING;
+ ifp->if_flags &= ~IFF_OACTIVE;
+
+ (void)splx(s);
+
+ return;
+}
+
+static int kue_ioctl(ifp, command, data)
+ struct ifnet *ifp;
+ u_long command;
+ caddr_t data;
+{
+ struct kue_softc *sc = ifp->if_softc;
+ int s, error = 0;
+
+ s = splimp();
+
+ switch(command) {
+ case SIOCSIFADDR:
+ case SIOCGIFADDR:
+ case SIOCSIFMTU:
+ error = ether_ioctl(ifp, command, data);
+ break;
+ case SIOCSIFFLAGS:
+ if (ifp->if_flags & IFF_UP) {
+ if (ifp->if_flags & IFF_RUNNING &&
+ ifp->if_flags & IFF_PROMISC &&
+ !(sc->kue_if_flags & IFF_PROMISC)) {
+ sc->kue_rxfilt |= KUE_RXFILT_PROMISC;
+ kue_setword(sc, KUE_CMD_SET_PKT_FILTER,
+ sc->kue_rxfilt);
+ } else if (ifp->if_flags & IFF_RUNNING &&
+ !(ifp->if_flags & IFF_PROMISC) &&
+ sc->kue_if_flags & IFF_PROMISC) {
+ sc->kue_rxfilt &= ~KUE_RXFILT_PROMISC;
+ kue_setword(sc, KUE_CMD_SET_PKT_FILTER,
+ sc->kue_rxfilt);
+ } else if (!(ifp->if_flags & IFF_RUNNING))
+ kue_init(sc);
+ } else {
+ if (ifp->if_flags & IFF_RUNNING)
+ kue_stop(sc);
+ }
+ sc->kue_if_flags = ifp->if_flags;
+ error = 0;
+ break;
+ case SIOCADDMULTI:
+ case SIOCDELMULTI:
+ kue_setmulti(sc);
+ error = 0;
+ break;
+ default:
+ error = EINVAL;
+ break;
+ }
+
+ (void)splx(s);
+
+ return(error);
+}
+
+static void kue_watchdog(ifp)
+ struct ifnet *ifp;
+{
+ struct kue_softc *sc;
+
+ sc = ifp->if_softc;
+
+ ifp->if_oerrors++;
+ printf("kue%d: watchdog timeout\n", sc->kue_unit);
+
+ /*
+ * The polling business is a kludge to avoid allowing the
+ * USB code to call tsleep() in usbd_delay_ms(), which will
+ * kill us since the watchdog routine is invoked from
+ * interrupt context.
+ */
+ sc->kue_udev->bus->use_polling++;
+ kue_stop(sc);
+ kue_init(sc);
+ sc->kue_udev->bus->use_polling--;
+
+ if (ifp->if_snd.ifq_head != NULL)
+ kue_start(ifp);
+
+ return;
+}
+
+/*
+ * Stop the adapter and free any mbufs allocated to the
+ * RX and TX lists.
+ */
+static void kue_stop(sc)
+ struct kue_softc *sc;
+{
+ usbd_status err;
+ struct ifnet *ifp;
+ int i;
+
+ ifp = &sc->arpcom.ac_if;
+ ifp->if_timer = 0;
+
+ /* Stop transfers. */
+ if (sc->kue_ep[KUE_ENDPT_RX] != NULL) {
+ err = usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_RX]);
+ if (err) {
+ printf("kue%d: abort rx pipe failed: %s\n",
+ sc->kue_unit, usbd_errstr(err));
+ }
+ err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_RX]);
+ if (err) {
+ printf("kue%d: close rx pipe failed: %s\n",
+ sc->kue_unit, usbd_errstr(err));
+ }
+ sc->kue_ep[KUE_ENDPT_RX] = NULL;
+ }
+
+ if (sc->kue_ep[KUE_ENDPT_TX] != NULL) {
+ err = usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_TX]);
+ if (err) {
+ printf("kue%d: abort tx pipe failed: %s\n",
+ sc->kue_unit, usbd_errstr(err));
+ }
+ err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_TX]);
+ if (err) {
+ printf("kue%d: close tx pipe failed: %s\n",
+ sc->kue_unit, usbd_errstr(err));
+ }
+ sc->kue_ep[KUE_ENDPT_TX] = NULL;
+ }
+
+ if (sc->kue_ep[KUE_ENDPT_INTR] != NULL) {
+ err = usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_INTR]);
+ if (err) {
+ printf("kue%d: abort intr pipe failed: %s\n",
+ sc->kue_unit, usbd_errstr(err));
+ }
+ err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_INTR]);
+ if (err) {
+ printf("kue%d: close intr pipe failed: %s\n",
+ sc->kue_unit, usbd_errstr(err));
+ }
+ sc->kue_ep[KUE_ENDPT_INTR] = NULL;
+ }
+
+ /* Free RX resources. */
+ for (i = 0; i < KUE_RX_LIST_CNT; i++) {
+ if (sc->kue_cdata.kue_rx_chain[i].kue_buf != NULL) {
+ free(sc->kue_cdata.kue_rx_chain[i].kue_buf, M_USBDEV);
+ sc->kue_cdata.kue_rx_chain[i].kue_buf = NULL;
+ }
+ if (sc->kue_cdata.kue_rx_chain[i].kue_mbuf != NULL) {
+ m_freem(sc->kue_cdata.kue_rx_chain[i].kue_mbuf);
+ sc->kue_cdata.kue_rx_chain[i].kue_mbuf = NULL;
+ }
+ if (sc->kue_cdata.kue_rx_chain[i].kue_xfer != NULL) {
+ usbd_free_xfer(sc->kue_cdata.kue_rx_chain[i].kue_xfer);
+ sc->kue_cdata.kue_rx_chain[i].kue_xfer = NULL;
+ }
+ }
+
+ /* Free TX resources. */
+ for (i = 0; i < KUE_TX_LIST_CNT; i++) {
+ if (sc->kue_cdata.kue_tx_chain[i].kue_buf != NULL) {
+ free(sc->kue_cdata.kue_tx_chain[i].kue_buf, M_USBDEV);
+ sc->kue_cdata.kue_tx_chain[i].kue_buf = NULL;
+ }
+ if (sc->kue_cdata.kue_tx_chain[i].kue_mbuf != NULL) {
+ m_freem(sc->kue_cdata.kue_tx_chain[i].kue_mbuf);
+ sc->kue_cdata.kue_tx_chain[i].kue_mbuf = NULL;
+ }
+ if (sc->kue_cdata.kue_tx_chain[i].kue_xfer != NULL) {
+ usbd_free_xfer(sc->kue_cdata.kue_tx_chain[i].kue_xfer);
+ sc->kue_cdata.kue_tx_chain[i].kue_xfer = NULL;
+ }
+ }
+
+ ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+
+ return;
+}
+
+/*
+ * Stop all chip I/O so that the kernel's probe routines don't
+ * get confused by errant DMAs when rebooting.
+ */
+static void kue_shutdown(dev)
+ device_t dev;
+{
+ struct kue_softc *sc;
+
+ sc = device_get_softc(dev);
+
+ kue_stop(sc);
+
+ return;
+}
diff --git a/sys/dev/usb/if_kuereg.h b/sys/dev/usb/if_kuereg.h
new file mode 100644
index 0000000..cdc313d
--- /dev/null
+++ b/sys/dev/usb/if_kuereg.h
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 1997, 1998, 1999, 2000
+ * Bill Paul <wpaul@ee.columbia.edu>. 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.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Bill Paul.
+ * 4. Neither the name of the author nor the names of any co-contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD
+ * 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$
+ */
+
+/*
+ * Definitions for the KLSI KL5KUSB101B USB to ethernet controller.
+ * The KLSI part is controlled via vendor control requests, the structure
+ * of which depend a bit on the firmware running on the internal
+ * microcontroller. The one exception is the 'send scan data' command,
+ * which is used to load the firmware.
+ */
+
+#define KUE_CMD_GET_ETHER_DESCRIPTOR 0x00
+#define KUE_CMD_SET_MCAST_FILTERS 0x01
+#define KUE_CMD_SET_PKT_FILTER 0x02
+#define KUE_CMD_GET_ETHERSTATS 0x03
+#define KUE_CMD_GET_GPIO 0x04
+#define KUE_CMD_SET_GPIO 0x05
+#define KUE_CMD_SET_MAC 0x06
+#define KUE_CMD_GET_MAC 0x07
+#define KUE_CMD_SET_URB_SIZE 0x08
+#define KUE_CMD_SET_SOFS 0x09
+#define KUE_CMD_SET_EVEN_PKTS 0x0A
+#define KUE_CMD_SEND_SCAN 0xFF
+
+struct kue_ether_desc {
+ u_int8_t kue_len;
+ u_int8_t kue_rsvd0;
+ u_int8_t kue_rsvd1;
+ u_int8_t kue_macaddr[ETHER_ADDR_LEN];
+ u_int8_t kue_etherstats[4];
+ u_int8_t kue_maxseg[2];
+ u_int8_t kue_mcastfilt[2];
+ u_int8_t kue_rsvd2;
+};
+
+#define KUE_ETHERSTATS(x) \
+ (*(u_int32_t *)&(x)->kue_desc.kue_etherstats)
+#define KUE_MAXSEG(x) \
+ (*(u_int16_t *)&(x)->kue_desc.kue_maxseg)
+#define KUE_MCFILTCNT(x) \
+ ((*(u_int16_t *)&(x)->kue_desc.kue_mcastfilt) & 0x7FFF)
+#define KUE_MCFILT(x, y) \
+ (char *)&(sc->kue_mcfilters[y * ETHER_ADDR_LEN])
+
+#define KUE_STAT_TX_OK 0x00000001
+#define KUE_STAT_RX_OK 0x00000002
+#define KUE_STAT_TX_ERR 0x00000004
+#define KUE_STAT_RX_ERR 0x00000008
+#define KUE_STAT_RX_NOBUF 0x00000010
+#define KUE_STAT_TX_UCAST_BYTES 0x00000020
+#define KUE_STAT_TX_UCAST_FRAMES 0x00000040
+#define KUE_STAT_TX_MCAST_BYTES 0x00000080
+#define KUE_STAT_TX_MCAST_FRAMES 0x00000100
+#define KUE_STAT_TX_BCAST_BYTES 0x00000200
+#define KUE_STAT_TX_BCAST_FRAMES 0x00000400
+#define KUE_STAT_RX_UCAST_BYTES 0x00000800
+#define KUE_STAT_RX_UCAST_FRAMES 0x00001000
+#define KUE_STAT_RX_MCAST_BYTES 0x00002000
+#define KUE_STAT_RX_MCAST_FRAMES 0x00004000
+#define KUE_STAT_RX_BCAST_BYTES 0x00008000
+#define KUE_STAT_RX_BCAST_FRAMES 0x00010000
+#define KUE_STAT_RX_CRCERR 0x00020000
+#define KUE_STAT_TX_QUEUE_LENGTH 0x00040000
+#define KUE_STAT_RX_ALIGNERR 0x00080000
+#define KUE_STAT_TX_SINGLECOLL 0x00100000
+#define KUE_STAT_TX_MULTICOLL 0x00200000
+#define KUE_STAT_TX_DEFERRED 0x00400000
+#define KUE_STAT_TX_MAXCOLLS 0x00800000
+#define KUE_STAT_RX_OVERRUN 0x01000000
+#define KUE_STAT_TX_UNDERRUN 0x02000000
+#define KUE_STAT_TX_SQE_ERR 0x04000000
+#define KUE_STAT_TX_CARRLOSS 0x08000000
+#define KUE_STAT_RX_LATECOLL 0x10000000
+
+#define KUE_RXFILT_PROMISC 0x0001
+#define KUE_RXFILT_ALLMULTI 0x0002
+#define KUE_RXFILT_UNICAST 0x0004
+#define KUE_RXFILT_BROADCAST 0x0008
+#define KUE_RXFILT_MULTICAST 0x0010
+
+#define KUE_TIMEOUT 1000
+#define ETHER_ALIGN 2
+#define KUE_BUFSZ 1536
+#define KUE_CUTOFF 1088
+#define KUE_MIN_FRAMELEN 60
+
+#define KUE_RX_LIST_CNT 1
+#define KUE_TX_LIST_CNT 1
+
+#define KUE_CTL_READ 0x01
+#define KUE_CTL_WRITE 0x02
+
+/*
+ * The interrupt endpoint is currently unused
+ * by the KLSI part.
+ */
+#define KUE_ENDPT_RX 0x0
+#define KUE_ENDPT_TX 0x1
+#define KUE_ENDPT_INTR 0x2
+#define KUE_ENDPT_MAX 0x3
+
+struct kue_type {
+ u_int16_t kue_vid;
+ u_int16_t kue_did;
+ char *kue_name;
+};
+
+struct kue_softc;
+
+struct kue_chain {
+ struct kue_softc *kue_sc;
+ usbd_xfer_handle kue_xfer;
+ char *kue_buf;
+ struct mbuf *kue_mbuf;
+ int kue_accum;
+ int kue_idx;
+};
+
+struct kue_cdata {
+ struct kue_chain kue_tx_chain[KUE_TX_LIST_CNT];
+ struct kue_chain kue_rx_chain[KUE_RX_LIST_CNT];
+ int kue_tx_prod;
+ int kue_tx_cons;
+ int kue_tx_cnt;
+ int kue_rx_prod;
+};
+
+#define KUE_INC(x, y) (x) = (x + 1) % y
+
+struct kue_softc {
+ struct arpcom arpcom;
+ usbd_device_handle kue_udev;
+ usbd_interface_handle kue_iface;
+ struct kue_ether_desc kue_desc;
+ int kue_ed[KUE_ENDPT_MAX];
+ usbd_pipe_handle kue_ep[KUE_ENDPT_MAX];
+ int kue_unit;
+ int kue_if_flags;
+ u_int16_t kue_rxfilt;
+ u_int8_t *kue_mcfilters;
+ struct kue_cdata kue_cdata;
+};
diff --git a/sys/dev/usb/kue_fw.h b/sys/dev/usb/kue_fw.h
new file mode 100644
index 0000000..65b34b2
--- /dev/null
+++ b/sys/dev/usb/kue_fw.h
@@ -0,0 +1,685 @@
+/*
+ * Copyright (c) 1997, 1998, 1999, 2000
+ * Bill Paul <wpaul@ee.columbia.edu>. 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.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Bill Paul.
+ * 4. Neither the name of the author nor the names of any co-contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY Bill Paul 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 Bill Paul OR THE VOICES IN HIS HEAD
+ * 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$
+ */
+
+/*
+ * This file contains the firmware needed to make the KLSI chip work,
+ * along with a few constants related to the QT Engine microcontroller
+ * embedded in the KLSI part.
+ *
+ * Firmware is loaded using the vendor-specific 'send scan data'
+ * command (0xFF). The basic operation is that we must load the
+ * firmware, then issue some trigger commands to fix it up and start
+ * it running. There are three transfers: load the binary code,
+ * load the 'fixup' (data segment?), then issue a command to
+ * start the code firmware running. The data itself is prefixed by
+ * a 16-bit signature word, a 16-bit length value, a type byte
+ * and an interrupt (command) byte. The code segment is of type
+ * 0x02 (replacement interrupt vector data) and the fixup segment
+ * is of type 0x03 (replacement interrupt fixup data). The interrupt
+ * code is 0x64 (load new code). The length word is the total length
+ * of the segment minus 7. I precomputed the values and stuck them
+ * into the appropriate locations within the segments to save some
+ * work in the driver.
+ */
+
+/* QT controller data block types. */
+/* Write data into specific memory location. */
+#define KUE_QTBTYPE_WRITE_DATA 0x00
+/* Write data into interrupt vector location */
+#define KUE_QTBTYPE_WRITE_INTVEC 0x01
+/* Replace interrupt vector with this data */
+#define KUE_QTBTYPE_REPL_INTVEC 0x02
+/* Fixup interrupt vector code with this data */
+#define KUE_QTBTYPE_FIXUP_INTVEC 0x03
+/* Force jump to location */
+#define KUE_QTBTYPE_JUMP 0x04
+/* Force call to location */
+#define KUE_QTBTYPE_CALL 0x05
+/* Force interrupt call */
+#define KUE_QTBTYPE_CALLINTR 0x06
+/*
+ * Cause data to be written using the specified QT engine
+ * interrupt, from starting location in memory for a specified
+ * number of bytes.
+ */
+#define KUE_QTBTYPE_WRITE_WITH_INTR 0x07
+/* Cause data from stream to be written using specified QT interrupt. */
+#define KUE_QTBTYPE_WRITE_STR_WITH_INTR 0x08
+/* Cause data to be written to config locations. */
+/* Addresses assume 0xc000 offset. */
+#define KUE_QTBTYPE_WRITE_CONFIG 0x09
+
+#define KUE_QTINTR_LOAD_CODE 0x64
+#define KUE_QTINTR_TRIGGER_CODE 0x3B
+#define KUE_QTINTR_LOAD_CODE_HIGH 0x9C
+
+/* Firmware code segment */
+static unsigned char kue_code_seg[] =
+{
+ /******************************************/
+ /* NOTE: B6/C3 is data header signature */
+ /* 0xAA/0xBB is data length = total */
+ /* bytes - 7, 0xCC is type, 0xDD is */
+ /* interrupt to use. */
+ /******************************************/
+ 0xB6, 0xC3, 0xf7, 0x0e, 0x02, 0x64,
+ 0x9f, 0xcf, 0xbc, 0x08, 0xe7, 0x57, 0x00, 0x00,
+ 0x9a, 0x08, 0x97, 0xc1, 0xe7, 0x67, 0xff, 0x1f,
+ 0x28, 0xc0, 0xe7, 0x87, 0x00, 0x04, 0x24, 0xc0,
+ 0xe7, 0x67, 0xff, 0xf9, 0x22, 0xc0, 0x97, 0xcf,
+ 0xe7, 0x09, 0xa2, 0xc0, 0x94, 0x08, 0xd7, 0x09,
+ 0x00, 0xc0, 0xe7, 0x59, 0xba, 0x08, 0x94, 0x08,
+ 0x03, 0xc1, 0xe7, 0x67, 0xff, 0xf7, 0x24, 0xc0,
+ 0xe7, 0x05, 0x00, 0xc0, 0xa7, 0xcf, 0x92, 0x08,
+ 0xe7, 0x57, 0x00, 0x00, 0x8e, 0x08, 0xa7, 0xa1,
+ 0x8e, 0x08, 0x97, 0xcf, 0xe7, 0x57, 0x00, 0x00,
+ 0xf2, 0x09, 0x0a, 0xc0, 0xe7, 0x57, 0x00, 0x00,
+ 0xa4, 0xc0, 0xa7, 0xc0, 0x56, 0x08, 0x9f, 0xaf,
+ 0x70, 0x09, 0xe7, 0x07, 0x00, 0x00, 0xf2, 0x09,
+ 0xe7, 0x57, 0xff, 0xff, 0x90, 0x08, 0x9f, 0xa0,
+ 0x40, 0x00, 0xe7, 0x59, 0x90, 0x08, 0x94, 0x08,
+ 0x9f, 0xa0, 0x40, 0x00, 0xc8, 0x09, 0xa2, 0x08,
+ 0x08, 0x62, 0x9f, 0xa1, 0x14, 0x0a, 0xe7, 0x57,
+ 0x00, 0x00, 0x52, 0x08, 0xa7, 0xc0, 0x56, 0x08,
+ 0x9f, 0xaf, 0x04, 0x00, 0xe7, 0x57, 0x00, 0x00,
+ 0x8e, 0x08,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, 0xac, 0x08,
+ 0xe7, 0x77, 0x20, 0x00, 0x66, 0x08, 0x0e, 0xc0,
+ 0xf2, 0x17, 0x01, 0x00, 0x10, 0x00, 0xf2, 0x27,
+ 0x00, 0x00, 0x12, 0x00, 0xe7, 0x77, 0x0a, 0x00,
+ 0x66, 0x08, 0xca, 0x05, 0x1e, 0xc0, 0x97, 0x02,
+ 0xca, 0x09, 0xac, 0x08, 0xf2, 0x17, 0x01, 0x00,
+ 0x0c, 0x00, 0xf2, 0x27, 0x00, 0x00, 0x0e, 0x00,
+ 0xe7, 0x77, 0x02, 0x00, 0x66, 0x08, 0x07, 0xc0,
+ 0xf2, 0x17, 0x01, 0x00, 0x44, 0x00, 0xf2, 0x27,
+ 0x00, 0x00, 0x46, 0x00, 0x06, 0xcf, 0xf2, 0x17,
+ 0x01, 0x00, 0x60, 0x00, 0xf2, 0x27, 0x00, 0x00,
+ 0x62, 0x00, 0xca, 0x05, 0x9f, 0xaf, 0x68, 0x04,
+ 0x0f, 0xcf, 0x57, 0x02, 0x09, 0x02, 0xf1, 0x09,
+ 0x68, 0x08, 0x0c, 0x00, 0xf1, 0xda, 0x0c, 0x00,
+ 0xc8, 0x09, 0x6c, 0x08, 0x50, 0x02, 0x67, 0x02,
+ 0x6c, 0x08, 0xd1, 0x07, 0x00, 0x00, 0xc9, 0x05,
+ 0xe7, 0x09, 0x64, 0x08, 0x62, 0x08, 0xe7, 0x57,
+ 0x00, 0x00, 0x62, 0x08, 0x02, 0xc0, 0x9f, 0xaf,
+ 0x70, 0x03, 0xc8, 0x05, 0xe7, 0x05, 0x00, 0xc0,
+ 0xc0, 0xdf, 0x97, 0xcf, 0xd7, 0x09, 0x00, 0xc0,
+ 0x17, 0x00, 0x17, 0x02, 0x97, 0x02, 0xc0, 0x09,
+ 0x92, 0xc0, 0xe7, 0x87, 0x00, 0x08, 0x24, 0xc0,
+ 0xe7, 0x09, 0x94, 0x08, 0xba, 0x08, 0xe7, 0x17,
+ 0x64, 0x00, 0xba, 0x08, 0xe7, 0x67, 0xff, 0x07,
+ 0xba, 0x08, 0xe7, 0x07, 0x04, 0x00, 0x90, 0xc0,
+ 0xca, 0x09, 0xac, 0x08, 0xe7, 0x07, 0x00, 0x00,
+ 0x7a, 0x08, 0xe7, 0x07, 0x66, 0x03, 0x02, 0x00,
+ 0xc0, 0x77, 0x02, 0x00, 0x10, 0xc0, 0xef, 0x57,
+ 0x00, 0x00, 0xf0, 0x09, 0x04, 0xc0, 0x9f, 0xaf,
+ 0xd8, 0x02, 0x9f, 0xcf, 0x12, 0x08, 0xf2, 0x17,
+ 0x01, 0x00, 0x50, 0x00, 0xf2, 0x27, 0x00, 0x00,
+ 0x52, 0x00, 0x9f, 0xcf, 0x12, 0x08, 0xef, 0x57,
+ 0x00, 0x00, 0xf0, 0x09, 0x08, 0xc0, 0xe7, 0x57,
+ 0x00, 0x00, 0xb8, 0x08, 0xe7, 0x07, 0x00, 0x00,
+ 0xb8, 0x08, 0x0a, 0xc0, 0x03, 0xcf, 0xc0, 0x77,
+ 0x10, 0x00, 0x06, 0xc0, 0xf2, 0x17, 0x01, 0x00,
+ 0x58, 0x00, 0xf2, 0x27, 0x00, 0x00, 0x5a, 0x00,
+ 0xc0, 0x77, 0x80, 0x00, 0x06, 0xc0, 0xf2, 0x17,
+ 0x01, 0x00, 0x70, 0x00, 0xf2, 0x27, 0x00, 0x00,
+ 0x72, 0x00, 0xc0, 0x77, 0x08, 0x00, 0x1d, 0xc1,
+ 0xf2, 0x17, 0x01, 0x00, 0x08, 0x00, 0xf2, 0x27,
+ 0x00, 0x00, 0x0a, 0x00, 0xc0, 0x77, 0x00, 0x02,
+ 0x06, 0xc0, 0xf2, 0x17, 0x01, 0x00, 0x64, 0x00,
+ 0xf2, 0x27, 0x00, 0x00, 0x66, 0x00, 0xc0, 0x77,
+ 0x40, 0x00, 0x06, 0xc0, 0xf2, 0x17, 0x01, 0x00,
+ 0x5c, 0x00, 0xf2, 0x27, 0x00, 0x00, 0x5e, 0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0x97, 0xcf, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x33, 0xcc,
+ 0x00, 0x00, 0x00, 0x00, 0xe7, 0x57, 0x00, 0x80,
+ 0xb2, 0x00, 0x06, 0xc2, 0xe7, 0x07, 0x52, 0x0e,
+ 0x12, 0x00, 0xe7, 0x07, 0x98, 0x0e, 0xb2, 0x00,
+ 0xe7, 0x07, 0xa4, 0x09, 0xf2, 0x02, 0xc8, 0x09,
+ 0xb4, 0x00, 0xf8, 0x07, 0x02, 0x00, 0x0d, 0x00,
+ 0xd7, 0x09, 0x0e, 0xc0, 0xe7, 0x07, 0x00, 0x00,
+ 0x0e, 0xc0, 0xc8, 0x09, 0xdc, 0x00, 0xf0, 0x07,
+ 0xff, 0xff, 0x09, 0x00, 0xf0, 0x07, 0xfb, 0x13,
+ 0x0b, 0x00, 0xe7, 0x09, 0xc0, 0x00, 0x58, 0x08,
+ 0xe7, 0x09, 0x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 0x00,
+ 0x9f, 0xc1, 0x96, 0xeb, 0x9f, 0xcf, 0x4c, 0xeb,
+ 0xe7, 0x07, 0x00, 0x00, 0xa6, 0xc0, 0xe7, 0x09,
+ 0xb0, 0xc0, 0xc8, 0x02, 0xe7, 0x07, 0x03, 0x00,
+ 0xb0, 0xc0, 0x97, 0xcf, 0xc0, 0x09, 0x86, 0x08,
+ 0xc0, 0x37, 0x01, 0x00, 0x97, 0xc9, 0xc9, 0x09,
+ 0x88, 0x08, 0x02, 0x00, 0x41, 0x90, 0x48, 0x02,
+ 0xc9, 0x17, 0x06, 0x00, 0x9f, 0xaf, 0x64, 0x05,
+ 0x9f, 0xa2, 0xd6, 0x0e, 0x02, 0xda, 0x77, 0xc1,
+ 0x41, 0x60, 0x71, 0xc1, 0x97, 0xcf, 0x17, 0x02,
+ 0x57, 0x02, 0x43, 0x04, 0x21, 0x04, 0xe0, 0x00,
+ 0x43, 0x04, 0x21, 0x04, 0xe0, 0x00, 0x43, 0x04,
+ 0x21, 0x04, 0xe0, 0x00, 0xc1, 0x07, 0x01, 0x00,
+ 0xc9, 0x05, 0xc8, 0x05, 0x97, 0xcf,
+ 0, 0
+};
+
+/* Firmware fixup (data?) segment */
+static unsigned char kue_fix_seg[] =
+{
+ /******************************************/
+ /* NOTE: B6/C3 is data header signature */
+ /* 0xAA/0xBB is data length = total */
+ /* bytes - 7, 0xCC is type, 0xDD is */
+ /* interrupt to use. */
+ /******************************************/
+ 0xB6, 0xC3, 0xc9, 0x02, 0x03, 0x64,
+ 0x02, 0x00, 0x08, 0x00, 0x24, 0x00, 0x2e, 0x00,
+ 0x2c, 0x00, 0x3e, 0x00, 0x44, 0x00, 0x48, 0x00,
+ 0x50, 0x00, 0x5c, 0x00, 0x60, 0x00, 0x66, 0x00,
+ 0x6c, 0x00, 0x70, 0x00, 0x76, 0x00, 0x74, 0x00,
+ 0x7a, 0x00, 0x7e, 0x00, 0x84, 0x00, 0x8a, 0x00,
+ 0x8e, 0x00, 0x92, 0x00, 0x98, 0x00, 0x9c, 0x00,
+ 0xa0, 0x00, 0xa8, 0x00, 0xae, 0x00, 0xb4, 0x00,
+ 0xb2, 0x00, 0xba, 0x00, 0xbe, 0x00, 0xc4, 0x00,
+ 0xc8, 0x00, 0xce, 0x00, 0xd2, 0x00, 0xd6, 0x00,
+ 0xda, 0x00, 0xe2, 0x00, 0xe0, 0x00, 0xea, 0x00,
+ 0xf2, 0x00, 0xfe, 0x00, 0x06, 0x01, 0x0c, 0x01,
+ 0x1a, 0x01, 0x24, 0x01, 0x22, 0x01, 0x2a, 0x01,
+ 0x30, 0x01, 0x36, 0x01, 0x3c, 0x01, 0x4e, 0x01,
+ 0x52, 0x01, 0x58, 0x01, 0x5c, 0x01, 0x9c, 0x01,
+ 0xb6, 0x01, 0xba, 0x01, 0xc0, 0x01, 0xca, 0x01,
+ 0xd0, 0x01, 0xda, 0x01, 0xe2, 0x01, 0xea, 0x01,
+ 0xf0, 0x01, 0x0a, 0x02, 0x0e, 0x02, 0x14, 0x02,
+ 0x26, 0x02, 0x6c, 0x02, 0x8e, 0x02, 0x98, 0x02,
+ 0xa0, 0x02, 0xa6, 0x02, 0xba, 0x02, 0xc6, 0x02,
+ 0xce, 0x02, 0xe8, 0x02, 0xee, 0x02, 0xf4, 0x02,
+ 0xf8, 0x02, 0x0a, 0x03, 0x10, 0x03, 0x1a, 0x03,
+ 0x1e, 0x03, 0x2a, 0x03, 0x2e, 0x03, 0x34, 0x03,
+ 0x3a, 0x03, 0x44, 0x03, 0x4e, 0x03, 0x5a, 0x03,
+ 0x5e, 0x03, 0x6a, 0x03, 0x72, 0x03, 0x80, 0x03,
+ 0x84, 0x03, 0x8c, 0x03, 0x94, 0x03, 0x98, 0x03,
+ 0xa8, 0x03, 0xae, 0x03, 0xb4, 0x03, 0xba, 0x03,
+ 0xce, 0x03, 0xcc, 0x03, 0xd6, 0x03, 0xdc, 0x03,
+ 0xec, 0x03, 0xf0, 0x03, 0xfe, 0x03, 0x1c, 0x04,
+ 0x30, 0x04, 0x38, 0x04, 0x3c, 0x04, 0x40, 0x04,
+ 0x48, 0x04, 0x46, 0x04, 0x54, 0x04, 0x5e, 0x04,
+ 0x64, 0x04, 0x74, 0x04, 0x78, 0x04, 0x84, 0x04,
+ 0xd8, 0x04, 0xec, 0x04, 0xf0, 0x04, 0xf8, 0x04,
+ 0xfe, 0x04, 0x1c, 0x05, 0x2c, 0x05, 0x30, 0x05,
+ 0x4a, 0x05, 0x56, 0x05, 0x5a, 0x05, 0x88, 0x05,
+ 0x8c, 0x05, 0x96, 0x05, 0x9a, 0x05, 0xa8, 0x05,
+ 0xcc, 0x05, 0xd2, 0x05, 0xda, 0x05, 0xe0, 0x05,
+ 0xe4, 0x05, 0xfc, 0x05, 0x06, 0x06, 0x14, 0x06,
+ 0x12, 0x06, 0x1a, 0x06, 0x20, 0x06, 0x26, 0x06,
+ 0x2e, 0x06, 0x34, 0x06, 0x48, 0x06, 0x52, 0x06,
+ 0x64, 0x06, 0x86, 0x06, 0x90, 0x06, 0x9a, 0x06,
+ 0xa0, 0x06, 0xac, 0x06, 0xaa, 0x06, 0xb2, 0x06,
+ 0xb8, 0x06, 0xdc, 0x06, 0xda, 0x06, 0xe2, 0x06,
+ 0xe8, 0x06, 0xf2, 0x06, 0xf8, 0x06, 0xfc, 0x06,
+ 0x0a, 0x07, 0x10, 0x07, 0x14, 0x07, 0x24, 0x07,
+ 0x2a, 0x07, 0x32, 0x07, 0x38, 0x07, 0xb2, 0x07,
+ 0xba, 0x07, 0xde, 0x07, 0xe4, 0x07, 0x10, 0x08,
+ 0x14, 0x08, 0x1a, 0x08, 0x1e, 0x08, 0x30, 0x08,
+ 0x38, 0x08, 0x3c, 0x08, 0x44, 0x08, 0x42, 0x08,
+ 0x48, 0x08, 0xc6, 0x08, 0xcc, 0x08, 0xd2, 0x08,
+ 0xfe, 0x08, 0x04, 0x09, 0x0a, 0x09, 0x0e, 0x09,
+ 0x12, 0x09, 0x16, 0x09, 0x20, 0x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ce, 0x0b, 0xde, 0x0b, 0xf4, 0x0b, 0xfa, 0x0b,
+ 0x00, 0x0c, 0x24, 0x0c, 0x28, 0x0c, 0x30, 0x0c,
+ 0x36, 0x0c, 0x3c, 0x0c, 0x40, 0x0c, 0x4a, 0x0c,
+ 0x50, 0x0c, 0x58, 0x0c, 0x56, 0x0c, 0x5c, 0x0c,
+ 0x60, 0x0c, 0x64, 0x0c, 0x80, 0x0c, 0x94, 0x0c,
+ 0x9a, 0x0c, 0x98, 0x0c, 0x9e, 0x0c, 0xa4, 0x0c,
+ 0xa2, 0x0c, 0xa8, 0x0c, 0xac, 0x0c, 0xb0, 0x0c,
+ 0xb4, 0x0c, 0xb8, 0x0c, 0xbc, 0x0c, 0xce, 0x0c,
+ 0xd2, 0x0c, 0xd6, 0x0c, 0xf4, 0x0c, 0xfa, 0x0c,
+ 0x00, 0x0d, 0xfe, 0x0c, 0x06, 0x0d, 0x0e, 0x0d,
+ 0x0c, 0x0d, 0x16, 0x0d, 0x1c, 0x0d, 0x22, 0x0d,
+ 0x20, 0x0d, 0x30, 0x0d, 0x7e, 0x0d, 0x82, 0x0d,
+ 0x9a, 0x0d, 0xa0, 0x0d, 0xa6, 0x0d, 0xb0, 0x0d,
+ 0xb8, 0x0d, 0xc2, 0x0d, 0xc8, 0x0d, 0xce, 0x0d,
+ 0xd4, 0x0d, 0xdc, 0x0d, 0x1e, 0x0e, 0x2c, 0x0e,
+ 0x3e, 0x0e, 0x4c, 0x0e, 0x50, 0x0e, 0x5e, 0x0e,
+ 0xae, 0x0e, 0xb8, 0x0e, 0xc6, 0x0e, 0xca, 0x0e,
+ 0, 0
+};
+
+/* Fixup command. */
+#define KUE_TRIGCMD_OFFSET 5
+static unsigned char kue_trig_seg[] = {
+0xb6, 0xc3, 0x01, 0x00, 0x06, 0x64, 0x00, 0x00
+};
diff --git a/sys/dev/usb/usb_quirks.c b/sys/dev/usb/usb_quirks.c
index e591860..4a8dd84 100644
--- a/sys/dev/usb/usb_quirks.c
+++ b/sys/dev/usb/usb_quirks.c
@@ -60,7 +60,18 @@ static struct usbd_quirk_entry {
{ USB_VENDOR_INSIDEOUT,USB_PRODUCT_INSIDEOUT_EDGEPORT4,
0x094, { UQ_SWAP_UNICODE}},
{ USB_VENDOR_BTC, USB_PRODUCT_BTC_BTC7932, 0x100, { UQ_NO_STRINGS }},
- { USB_VENDOR_ADS, USB_PRODUCT_ADS_ENET, 0x002, { UQ_NO_STRINGS }},
+ { USB_VENDOR_ADS, USB_PRODUCT_ADS_ENET, 0x002, { UQ_NO_STRINGS|
+ UQ_NO_TSLEEP }},
+ { USB_VENDOR_KLSI, USB_PRODUCT_KLSI_USB101, 0x002, { UQ_NO_STRINGS|
+ UQ_NO_TSLEEP }},
+ { USB_VENDOR_PERACOM, USB_PRODUCT_PERACOM_ENET, 0x002, { UQ_NO_STRINGS|
+ UQ_NO_TSLEEP }},
+ { USB_VENDOR_PERACOM, USB_PRODUCT_PERACOM_ENET2, 0x002, { UQ_NO_STRINGS|
+ UQ_NO_TSLEEP }},
+ { USB_VENDOR_3COM, USB_PRODUCT_3COM_3C19250, 0x002, { UQ_NO_STRINGS|
+ UQ_NO_TSLEEP }},
+ { USB_VENDOR_ENTREGA, USB_PRODUCT_ENTREGA_E45, 0x002, { UQ_NO_STRINGS|
+ UQ_NO_TSLEEP }},
{ USB_VENDOR_PERACOM, USB_PRODUCT_PERACOM_SERIAL1, 0x101, { UQ_NO_STRINGS }},
{ USB_VENDOR_DALLAS, USB_PRODUCT_DALLAS_J6502, 0x0a2, { UQ_BAD_ADC }},
{ USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_N48, 0x110, { UQ_MS_REVZ }},
diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs
index f57b72e..699ffa4 100644
--- a/sys/dev/usb/usbdevs
+++ b/sys/dev/usb/usbdevs
@@ -41,6 +41,7 @@ $FreeBSD$
* List of known USB vendors
*/
+vendor KLSI 0x03e8 Kawasaki LSI
vendor HP 0x03f0 Hewlett Packard
vendor NEC 0x0409 NEC
vendor KODAK 0x040a Eastman Kodak Corp.
@@ -65,13 +66,14 @@ vendor ACER 0x04a5 Acer Peripheral Inc.
vendor CANON 0x04a9 Canon Inc.
vendor CYPRESS 0x04b4 Cypress Semiconductor
vendor EPSON 0x04b8 Seiko Epson Corp.
-vendor 3COM 0x04c1 U.S. Robotics
+vendor 3COMUSR 0x04c1 U.S. Robotics
vendor KONICA 0x04c8 Konica Corp.
vendor ALTEC 0x04d2 Altec Lansing
vendor SHUTTLE 0x04e6 Shuttle Technology
vendor CHICONY 0x04f2 Chicony Electronics Co., Ltd.
vendor BROTHER 0x04f9 Brother Industries Corp.
vendor DALLAS 0x04fa Dallas Semiconductor
+vendor 3COM 0x0506 3Com Corp.
vendor BELKIN 0x050d Belkin Components
vendor KAWATSU 0x050f Kawatsu Semiconductor, Inc.
vendor APC 0x051d American Power Conversion
@@ -117,6 +119,9 @@ vendor INTEL 0x8086 Intel
* List of known products. Grouped by vendor.
*/
+/* Kawasaki LSI products */
+product KLSI USB101 0x0008 USB ethernet
+
/* HP products */
product HP 4100C 0x0101 Scanjet 4100C
product HP 6300C 0x0601 Scanjet 6300C
@@ -198,7 +203,7 @@ product CYPRESS THERMO 0x0002 thermometer
product EPSON PRINTER3 0x0003 ISD USB Smart Cable
/* 3Com products */
-product 3COM USR56K 0x3021 U.S.Robotics 56000 Voice Faxmodem Pro
+product 3COMUSR USR56K 0x3021 U.S.Robotics 56000 Voice Faxmodem Pro
/* Konica Corp. Products */
product KONICA CAMERA 0x0720 Digital Color Camera
@@ -218,6 +223,9 @@ product BROTHER HL1050 0x0002 HL-1050 laser printer
/* Dallas Semiconductor products */
product DALLAS J6502 0x4201 J-6502 speakers
+/* 3Com products */
+product 3COM 3C19250 0x03E8 3C19250 Ethernet adapter
+
/* Kawatsu products */
product KAWATSU MH4000P 0x0003 MiniHub 4000P
@@ -247,6 +255,8 @@ product TELEX MIC1 0x0001 Enhanced USB Microphone
/* Peracom products */
product PERACOM SERIAL1 0x0001 Serial Converter
+product PERACOM ENET 0x0002 Ethernet adapter
+product PERACOM ENET2 0x0005 Ethernet adapter
/* Wacom products */
product WACOM CT0405U 0x0000 CT-0405-U Tablet
@@ -308,6 +318,7 @@ product ENTREGA 1S 0x0001 1S serial connector
product ENTREGA 2S 0x0002 2S serial connector
product ENTREGA 1S25 0x0003 1S25 serial connector
product ENTREGA 4S 0x0004 4S serial connector
+product ENTREGA E45 0x0005 E45 Ethernet adapter
product ENTREGA CENTRONICS 0x0006 Centronics connector
product ENTREGA 1S9 0x0093 1S9 serial connector
product ENTREGA EZUSB 0x8000 EZ-USB
diff --git a/sys/dev/usb/usbdevs.h b/sys/dev/usb/usbdevs.h
index 9b5ac13..d749500 100644
--- a/sys/dev/usb/usbdevs.h
+++ b/sys/dev/usb/usbdevs.h
@@ -4,7 +4,7 @@
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
*
* generated from:
- * FreeBSD: src/sys/dev/usb/usbdevs,v 1.1 1999/11/18 18:02:44 n_hibma Exp
+ * FreeBSD: src/sys/dev/usb/usbdevs,v 1.2 1999/12/28 02:00:56 wpaul Exp
*/
/*
@@ -48,6 +48,7 @@
* List of known USB vendors
*/
+#define USB_VENDOR_KLSI 0x03e8 /* Kawasaki LSI */
#define USB_VENDOR_HP 0x03f0 /* Hewlett Packard */
#define USB_VENDOR_NEC 0x0409 /* NEC */
#define USB_VENDOR_KODAK 0x040a /* Eastman Kodak Corp. */
@@ -72,13 +73,14 @@
#define USB_VENDOR_CANON 0x04a9 /* Canon Inc. */
#define USB_VENDOR_CYPRESS 0x04b4 /* Cypress Semiconductor */
#define USB_VENDOR_EPSON 0x04b8 /* Seiko Epson Corp. */
-#define USB_VENDOR_3COM 0x04c1 /* U.S. Robotics */
+#define USB_VENDOR_3COMUSR 0x04c1 /* U.S. Robotics */
#define USB_VENDOR_KONICA 0x04c8 /* Konica Corp. */
#define USB_VENDOR_ALTEC 0x04d2 /* Altec Lansing */
#define USB_VENDOR_SHUTTLE 0x04e6 /* Shuttle Technology */
#define USB_VENDOR_CHICONY 0x04f2 /* Chicony Electronics Co., Ltd. */
#define USB_VENDOR_BROTHER 0x04f9 /* Brother Industries Corp. */
#define USB_VENDOR_DALLAS 0x04fa /* Dallas Semiconductor */
+#define USB_VENDOR_3COM 0x0506 /* 3Com Corp. */
#define USB_VENDOR_BELKIN 0x050d /* Belkin Components */
#define USB_VENDOR_KAWATSU 0x050f /* Kawatsu Semiconductor, Inc. */
#define USB_VENDOR_APC 0x051d /* American Power Conversion */
@@ -124,6 +126,9 @@
* List of known products. Grouped by vendor.
*/
+/* Kawasaki LSI products */
+#define USB_PRODUCT_KLSI_USB101 0x0008 /* USB ethernet */
+
/* HP products */
#define USB_PRODUCT_HP_4100C 0x0101 /* Scanjet 4100C */
#define USB_PRODUCT_HP_6300C 0x0601 /* Scanjet 6300C */
@@ -205,7 +210,7 @@
#define USB_PRODUCT_EPSON_PRINTER3 0x0003 /* ISD USB Smart Cable */
/* 3Com products */
-#define USB_PRODUCT_3COM_USR56K 0x3021 /* U.S.Robotics 56000 Voice Faxmodem Pro */
+#define USB_PRODUCT_3COMUSR_USR56K 0x3021 /* U.S.Robotics 56000 Voice Faxmodem Pro */
/* Konica Corp. Products */
#define USB_PRODUCT_KONICA_CAMERA 0x0720 /* Digital Color Camera */
@@ -225,6 +230,9 @@
/* Dallas Semiconductor products */
#define USB_PRODUCT_DALLAS_J6502 0x4201 /* J-6502 speakers */
+/* 3Com products */
+#define USB_PRODUCT_3COM_3C19250 0x03E8 /* 3C19250 Ethernet adapter */
+
/* Kawatsu products */
#define USB_PRODUCT_KAWATSU_MH4000P 0x0003 /* MiniHub 4000P */
@@ -254,6 +262,8 @@
/* Peracom products */
#define USB_PRODUCT_PERACOM_SERIAL1 0x0001 /* Serial Converter */
+#define USB_PRODUCT_PERACOM_ENET 0x0002 /* Ethernet adapter */
+#define USB_PRODUCT_PERACOM_ENET2 0x0005 /* Ethernet adapter */
/* Wacom products */
#define USB_PRODUCT_WACOM_CT0405U 0x0000 /* CT-0405-U Tablet */
@@ -315,6 +325,7 @@
#define USB_PRODUCT_ENTREGA_2S 0x0002 /* 2S serial connector */
#define USB_PRODUCT_ENTREGA_1S25 0x0003 /* 1S25 serial connector */
#define USB_PRODUCT_ENTREGA_4S 0x0004 /* 4S serial connector */
+#define USB_PRODUCT_ENTREGA_E45 0x0005 /* E45 Ethernet adapter */
#define USB_PRODUCT_ENTREGA_CENTRONICS 0x0006 /* Centronics connector */
#define USB_PRODUCT_ENTREGA_1S9 0x0093 /* 1S9 serial connector */
#define USB_PRODUCT_ENTREGA_EZUSB 0x8000 /* EZ-USB */
diff --git a/sys/dev/usb/usbdevs_data.h b/sys/dev/usb/usbdevs_data.h
index 6aa755e..9082a20 100644
--- a/sys/dev/usb/usbdevs_data.h
+++ b/sys/dev/usb/usbdevs_data.h
@@ -4,7 +4,7 @@
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
*
* generated from:
- * FreeBSD: src/sys/dev/usb/usbdevs,v 1.1 1999/11/18 18:02:44 n_hibma Exp
+ * FreeBSD: src/sys/dev/usb/usbdevs,v 1.2 1999/12/28 02:00:56 wpaul Exp
*/
/*
@@ -46,6 +46,12 @@
struct usb_knowndev usb_knowndevs[] = {
{
+ USB_VENDOR_KLSI, USB_PRODUCT_KLSI_USB101,
+ 0,
+ "Kawasaki LSI",
+ "USB ethernet",
+ },
+ {
USB_VENDOR_HP, USB_PRODUCT_HP_4100C,
0,
"Hewlett Packard",
@@ -262,7 +268,7 @@ struct usb_knowndev usb_knowndevs[] = {
"ISD USB Smart Cable",
},
{
- USB_VENDOR_3COM, USB_PRODUCT_3COM_USR56K,
+ USB_VENDOR_3COMUSR, USB_PRODUCT_3COMUSR_USR56K,
0,
"U.S. Robotics",
"U.S.Robotics 56000 Voice Faxmodem Pro",
@@ -304,6 +310,12 @@ struct usb_knowndev usb_knowndevs[] = {
"J-6502 speakers",
},
{
+ USB_VENDOR_3COM, USB_PRODUCT_3COM_3C19250,
+ 0,
+ "3Com Corp.",
+ "3C19250 Ethernet adapter",
+ },
+ {
USB_VENDOR_KAWATSU, USB_PRODUCT_KAWATSU_MH4000P,
0,
"Kawatsu Semiconductor, Inc.",
@@ -364,6 +376,18 @@ struct usb_knowndev usb_knowndevs[] = {
"Serial Converter",
},
{
+ USB_VENDOR_PERACOM, USB_PRODUCT_PERACOM_ENET,
+ 0,
+ "Peracom Networks Inc.",
+ "Ethernet adapter",
+ },
+ {
+ USB_VENDOR_PERACOM, USB_PRODUCT_PERACOM_ENET2,
+ 0,
+ "Peracom Networks Inc.",
+ "Ethernet adapter",
+ },
+ {
USB_VENDOR_WACOM, USB_PRODUCT_WACOM_CT0405U,
0,
"WACOM Corp. Ltd.",
@@ -526,6 +550,12 @@ struct usb_knowndev usb_knowndevs[] = {
"4S serial connector",
},
{
+ USB_VENDOR_ENTREGA, USB_PRODUCT_ENTREGA_E45,
+ 0,
+ "Entrega",
+ "E45 Ethernet adapter",
+ },
+ {
USB_VENDOR_ENTREGA, USB_PRODUCT_ENTREGA_CENTRONICS,
0,
"Entrega",
@@ -628,6 +658,12 @@ struct usb_knowndev usb_knowndevs[] = {
"82930 test board",
},
{
+ USB_VENDOR_KLSI, 0,
+ USB_KNOWNDEV_NOPROD,
+ "Kawasaki LSI",
+ NULL,
+ },
+ {
USB_VENDOR_HP, 0,
USB_KNOWNDEV_NOPROD,
"Hewlett Packard",
@@ -772,7 +808,7 @@ struct usb_knowndev usb_knowndevs[] = {
NULL,
},
{
- USB_VENDOR_3COM, 0,
+ USB_VENDOR_3COMUSR, 0,
USB_KNOWNDEV_NOPROD,
"U.S. Robotics",
NULL,
@@ -814,6 +850,12 @@ struct usb_knowndev usb_knowndevs[] = {
NULL,
},
{
+ USB_VENDOR_3COM, 0,
+ USB_KNOWNDEV_NOPROD,
+ "3Com Corp.",
+ NULL,
+ },
+ {
USB_VENDOR_BELKIN, 0,
USB_KNOWNDEV_NOPROD,
"Belkin Components",
diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC
index b638840..7ffb9ff 100644
--- a/sys/i386/conf/GENERIC
+++ b/sys/i386/conf/GENERIC
@@ -216,3 +216,4 @@ pseudo-device bpf #Berkeley packet filter
#controller umass0 # Disks/Mass storage - Requires scbus and da0
#device ums0 # Mouse
#device aue0 # ADMtek USB ethernet
+#device kue0 # Kawasaki LSI USB ethernet
diff --git a/sys/i386/conf/LINT b/sys/i386/conf/LINT
index 069aee5..66ede1e 100644
--- a/sys/i386/conf/LINT
+++ b/sys/i386/conf/LINT
@@ -2346,6 +2346,11 @@ device ums0
# the Billionton USB100 and the Melco LU-ATX NICs. Also
# works with the ADMtek AN986 Pegasus eval board.
device aue0
+#
+# Kawasaki LSI ethernet. Supports the LinkSys USB10T,
+# Entrega USB-NET-E45, Peracom Ethernet Adapter, and
+# the 3Com 3c19250.
+device kue0
# debugging options for the USB subsystem
#
diff --git a/sys/i386/conf/NEWCARD b/sys/i386/conf/NEWCARD
index 013585c..27e3cda 100644
--- a/sys/i386/conf/NEWCARD
+++ b/sys/i386/conf/NEWCARD
@@ -225,5 +225,6 @@ pseudo-device bpf #Berkeley packet filter
#controller umass0 # Disks/Mass storage - Requires scbus and da0
#device ums0 # Mouse
#device aue0 # ADMtek USB ethernet
+#device kue0 # Kawasaki LSI USB ethernet
options DDB
diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES
index 069aee5..66ede1e 100644
--- a/sys/i386/conf/NOTES
+++ b/sys/i386/conf/NOTES
@@ -2346,6 +2346,11 @@ device ums0
# the Billionton USB100 and the Melco LU-ATX NICs. Also
# works with the ADMtek AN986 Pegasus eval board.
device aue0
+#
+# Kawasaki LSI ethernet. Supports the LinkSys USB10T,
+# Entrega USB-NET-E45, Peracom Ethernet Adapter, and
+# the 3Com 3c19250.
+device kue0
# debugging options for the USB subsystem
#
diff --git a/sys/i386/conf/PCCARD b/sys/i386/conf/PCCARD
index 613482b..c158da1 100644
--- a/sys/i386/conf/PCCARD
+++ b/sys/i386/conf/PCCARD
@@ -216,3 +216,4 @@ pseudo-device bpf #Berkeley packet filter
#controller umass0 # Disks/Mass storage - Requires scbus and da0
#device ums0 # Mouse
#device aue0 # ADMtek USB ethernet
+#device kue0 # Kawasaki LSI USB ethernet
diff --git a/sys/i386/i386/userconfig.c b/sys/i386/i386/userconfig.c
index 460463d..6f9844a 100644
--- a/sys/i386/i386/userconfig.c
+++ b/sys/i386/i386/userconfig.c
@@ -378,6 +378,7 @@ static DEV_INFO device_info[] = {
{"plip", "Parallel Port IP link", FLG_FIXED, CLS_NETWORK},
{"aue", "ADMtek AN986 USB ethernet adapter", FLG_FIXED, CLS_NETWORK},
+{"kue", "Kawasaki LSI USB ethernet adapter", FLG_FIXED, CLS_NETWORK},
{"cs", "IBM EtherJet, CS89x0-based Ethernet adapters",0, CLS_NETWORK},
{"ed", "NE1000,NE2000,3C503,WD/SMC80xx Ethernet adapters",0, CLS_NETWORK},
{"el", "3C501 Ethernet adapter", 0, CLS_NETWORK},
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index 357f098..49a91f1 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -3,7 +3,7 @@
# XXX present but broken: ip_mroute_mod pcic
SUBDIR= aha amr aue ccd cd9660 coda dc fdesc fxp if_disc if_ef if_ppp \
- if_sl if_tun ipfilter ipfw joy kernfs md mfs mii mlx msdos \
+ if_sl if_tun ipfilter ipfw joy kernfs kue md mfs mii mlx msdos \
ncp netgraph nfs ntfs nullfs \
nwfs portal procfs rl sf sis sk ste ti tl \
ugen uhid ukbd ulpt umapfs umass umodem ums union usb vn vr wb xl
diff --git a/sys/modules/kue/Makefile b/sys/modules/kue/Makefile
new file mode 100644
index 0000000..ad427f1
--- /dev/null
+++ b/sys/modules/kue/Makefile
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+S = ${.CURDIR}/../..
+.PATH: $S/dev/usb
+KMOD = if_kue
+SRCS = if_kue.c opt_bdg.h opt_usb.h device_if.h bus_if.h
+SRCS += miibus_if.h
+CFLAGS += ${DEBUG_FLAGS}
+
+.include <bsd.kmod.mk>
diff --git a/sys/pc98/conf/GENERIC b/sys/pc98/conf/GENERIC
index e0edaaa..f461431 100644
--- a/sys/pc98/conf/GENERIC
+++ b/sys/pc98/conf/GENERIC
@@ -295,3 +295,4 @@ pseudo-device bpf #Berkeley packet filter
#controller umass0 # Disks/Mass storage - Requires scbus and da0
#device ums0 # Mouse
#device aue0 # ADMtek USB ethernet
+#device kue0 # Kawasaki LSI USB ethernet
diff --git a/sys/pc98/conf/GENERIC98 b/sys/pc98/conf/GENERIC98
index e0edaaa..f461431 100644
--- a/sys/pc98/conf/GENERIC98
+++ b/sys/pc98/conf/GENERIC98
@@ -295,3 +295,4 @@ pseudo-device bpf #Berkeley packet filter
#controller umass0 # Disks/Mass storage - Requires scbus and da0
#device ums0 # Mouse
#device aue0 # ADMtek USB ethernet
+#device kue0 # Kawasaki LSI USB ethernet
diff --git a/usr.sbin/sade/devices.c b/usr.sbin/sade/devices.c
index dbe28e9..a7591b9 100644
--- a/usr.sbin/sade/devices.c
+++ b/usr.sbin/sade/devices.c
@@ -100,6 +100,7 @@ static struct _devname {
{ DEVICE_TYPE_NETWORK, "fe", "Fujitsu MB86960A/MB86965A ethernet card" },
{ DEVICE_TYPE_NETWORK, "ie", "AT&T StarLAN 10 and EN100; 3Com 3C507; NI5210" },
{ DEVICE_TYPE_NETWORK, "ix", "Intel Etherexpress ethernet card" },
+ { DEVICE_TYPE_NETWORK, "kue", "Kawasaki LSI USB ethernet adapter" },
{ DEVICE_TYPE_NETWORK, "le", "DEC EtherWorks 2 or 3 ethernet card" },
{ DEVICE_TYPE_NETWORK, "lnc", "Lance/PCnet (Isolan/Novell NE2100/NE32-VL) ethernet" },
{ DEVICE_TYPE_NETWORK, "rl", "RealTek 8129/8139 PCI ethernet card" },
diff --git a/usr.sbin/sysinstall/devices.c b/usr.sbin/sysinstall/devices.c
index dbe28e9..a7591b9 100644
--- a/usr.sbin/sysinstall/devices.c
+++ b/usr.sbin/sysinstall/devices.c
@@ -100,6 +100,7 @@ static struct _devname {
{ DEVICE_TYPE_NETWORK, "fe", "Fujitsu MB86960A/MB86965A ethernet card" },
{ DEVICE_TYPE_NETWORK, "ie", "AT&T StarLAN 10 and EN100; 3Com 3C507; NI5210" },
{ DEVICE_TYPE_NETWORK, "ix", "Intel Etherexpress ethernet card" },
+ { DEVICE_TYPE_NETWORK, "kue", "Kawasaki LSI USB ethernet adapter" },
{ DEVICE_TYPE_NETWORK, "le", "DEC EtherWorks 2 or 3 ethernet card" },
{ DEVICE_TYPE_NETWORK, "lnc", "Lance/PCnet (Isolan/Novell NE2100/NE32-VL) ethernet" },
{ DEVICE_TYPE_NETWORK, "rl", "RealTek 8129/8139 PCI ethernet card" },
OpenPOWER on IntegriCloud