diff options
author | n_hibma <n_hibma@FreeBSD.org> | 1999-04-19 20:25:18 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 1999-04-19 20:25:18 +0000 |
commit | d87a4625d23a7d6d44f08604ad70eb25f4e26f3c (patch) | |
tree | a5410495094c487bf9a11a17b7f82cea64fd772e /sys/dev | |
parent | a38d5f8be38a3b14f3c6aec71107cb7928e6f29b (diff) | |
download | FreeBSD-src-d87a4625d23a7d6d44f08604ad70eb25f4e26f3c.zip FreeBSD-src-d87a4625d23a7d6d44f08604ad70eb25f4e26f3c.tar.gz |
1) Add Rockfire vendor and gamepad product (MAEKAWA Masahide)
2) Sort the list again (Roger Hardiman)
3) Reinstate a piece of code to look for a name for a device
if none is found in the device itself.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/usb_subr.c | 39 | ||||
-rw-r--r-- | sys/dev/usb/usbdevs.h | 16 | ||||
-rw-r--r-- | sys/dev/usb/usbdevs_data.h | 38 |
3 files changed, 73 insertions, 20 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index f8e9af9..838d778 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -73,6 +73,23 @@ extern int usbdebug; #define DPRINTFN(n,x) #endif +typedef u_int16_t usb_vendor_id_t; +typedef u_int16_t usb_product_id_t; + +/* + * Descriptions of of known vendors and devices ("products"). + */ +struct usb_knowndev { + usb_vendor_id_t vendor; + usb_product_id_t product; + int flags; + char *vendorname, *productname; +}; +#define USB_KNOWNDEV_NOPROD 0x01 /* match on vendor only */ + +#include <dev/usb/usbdevs_data.h> + + static usbd_status usbd_set_config __P((usbd_device_handle, int)); char *usbd_get_string __P((usbd_device_handle, int, char *)); int usbd_getnewaddr __P((usbd_bus_handle bus)); @@ -160,11 +177,31 @@ usbd_devinfo_vp(dev, v, p) char *v, *p; { usb_device_descriptor_t *udd = &dev->ddesc; - char *vendor = 0, *product = 0; + char *vendor, *product; + struct usb_knowndev *kdp; vendor = usbd_get_string(dev, udd->iManufacturer, v); product = usbd_get_string(dev, udd->iProduct, p); + if (!vendor) { + for(kdp = usb_knowndevs; + kdp->vendorname != NULL; + kdp++) { + if (kdp->vendor == UGETW(udd->idVendor) && + (kdp->product == UGETW(udd->idProduct) || + (kdp->flags & USB_KNOWNDEV_NOPROD) != 0)) + break; + } + if (kdp->vendorname == NULL) { + vendor = product = NULL; + } else { + vendor = kdp->vendorname; + product = (kdp->flags & USB_KNOWNDEV_NOPROD) == 0 ? + kdp->productname : NULL; + } + } + + if (vendor) strcpy(v, vendor); else diff --git a/sys/dev/usb/usbdevs.h b/sys/dev/usb/usbdevs.h index a67af42..13ba5ff 100644 --- a/sys/dev/usb/usbdevs.h +++ b/sys/dev/usb/usbdevs.h @@ -70,12 +70,13 @@ #define USB_VENDOR_KONICA 0x04c8 /* Konica Corporation */ #define USB_VENDOR_SHUTTLE 0x04e6 /* Shuttle Technology */ #define USB_VENDOR_JAZZ 0x04fa /* Jazz */ -#define USB_VENDOR_VISION 0x0553 /* Vision */ #define USB_VENDOR_AKS 0x0529 /* Aladdin Knowledge Systems */ +#define USB_VENDOR_VISION 0x0553 /* Vision */ #define USB_VENDOR_ATEN 0x0557 /* ATen */ #define USB_VENDOR_PERACOM 0x0565 /* Peracom */ #define USB_VENDOR_EIZO 0x056d /* EIZO */ #define USB_VENDOR_AGILER 0x056e /* Agiler */ +#define USB_VENDOR_ROCKFIRE 0x0583 /* Rockfire */ #define USB_VENDOR_IOMEGA 0x059b /* Iomega */ #define USB_VENDOR_BELKIN 0x05ab /* Belkin */ #define USB_VENDOR_LOGITECH 0x05ac /* Logitech */ @@ -143,7 +144,7 @@ #define USB_PRODUCT_EPSON_PRINTER3 0x0003 /* ISD USB Smart Cable */ /* 3Com products */ -#define USB_PRODUCT_3COM_USR56K 0x3021 /* U.S.Robotics 56000 Voice USB Modem */ +#define USB_PRODUCT_3COM_USR56K 0x3021 /* U.S.Robotics Voice Faxmodem Pro */ /* Konica Corporation Products */ #define USB_PRODUCT_KONICA_CAMERA 0x0720 /* Digital Color Camera */ @@ -154,12 +155,12 @@ /* Jazz products */ #define USB_PRODUCT_JAZZ_J6502 0x4201 /* J-6502 speakers */ -/* Vision products */ -#define USB_PRODUCT_VISION_CAMERA 0x0002 /* VC6452V002 Camera */ - /* AKS products */ #define USB_PRODUCT_AKS_USBHASP 0x0001 /* USB-HASP 0.06 */ +/* Vision products */ +#define USB_PRODUCT_VISION_CAMERA 0x0002 /* VC6452V002 Camera */ + /* ATen products */ #define USB_PRODUCT_ATEN_UC1284 0x2001 /* Parallel printer adapter */ @@ -173,6 +174,9 @@ /* Agiler products */ #define USB_PRODUCT_AGILER_MOUSE29UO 0x0002 /* mouse 29UO */ +/* Rockfire products */ +#define USB_PRODUCT_ROCKFIRE_GAMEPAD 0x2033 /* gamepad 203USB */ + /* Iomega products */ #define USB_PRODUCT_IOMEGA_ZIP100 0x0001 /* Zip 100 */ @@ -181,7 +185,7 @@ /* Logitech products */ #define USB_PRODUCT_LOGITECH_M2452 0x0203 /* M2452 keyboard */ -#define USB_PRODUCT_LOGITECH_M4848 0x0301 /* M4848 mouse */ +#define USB_PRODUCT_LOGITECH_MOUSE1 0x0301 /* mouse */ /* Chic Technology products */ #define USB_PRODUCT_CHIC_MOUSE1 0x0001 /* mouse */ diff --git a/sys/dev/usb/usbdevs_data.h b/sys/dev/usb/usbdevs_data.h index 2630f7e..068057c 100644 --- a/sys/dev/usb/usbdevs_data.h +++ b/sys/dev/usb/usbdevs_data.h @@ -169,7 +169,7 @@ struct usb_knowndev usb_knowndevs[] = { USB_VENDOR_3COM, USB_PRODUCT_3COM_USR56K, 0, "3Com", - "U.S.Robotics 56000 Voice USB Modem", + "U.S.Robotics Voice Faxmodem Pro", }, { USB_VENDOR_KONICA, USB_PRODUCT_KONICA_CAMERA, @@ -190,18 +190,18 @@ struct usb_knowndev usb_knowndevs[] = { "J-6502 speakers", }, { - USB_VENDOR_VISION, USB_PRODUCT_VISION_CAMERA, - 0, - "Vision", - "VC6452V002 Camera", - }, - { USB_VENDOR_AKS, USB_PRODUCT_AKS_USBHASP, 0, "Aladdin Knowledge Systems", "USB-HASP 0.06", }, { + USB_VENDOR_VISION, USB_PRODUCT_VISION_CAMERA, + 0, + "Vision", + "VC6452V002 Camera", + }, + { USB_VENDOR_ATEN, USB_PRODUCT_ATEN_UC1284, 0, "ATen", @@ -232,6 +232,12 @@ struct usb_knowndev usb_knowndevs[] = { "mouse 29UO", }, { + USB_VENDOR_ROCKFIRE, USB_PRODUCT_ROCKFIRE_GAMEPAD, + 0, + "Rockfire", + "gamepad 203USB", + }, + { USB_VENDOR_IOMEGA, USB_PRODUCT_IOMEGA_ZIP100, 0, "Iomega", @@ -250,10 +256,10 @@ struct usb_knowndev usb_knowndevs[] = { "M2452 keyboard", }, { - USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_M4848, + USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_MOUSE1, 0, "Logitech", - "M4848 mouse", + "mouse", }, { USB_VENDOR_CHIC, USB_PRODUCT_CHIC_MOUSE1, @@ -424,15 +430,15 @@ struct usb_knowndev usb_knowndevs[] = { NULL, }, { - USB_VENDOR_VISION, 0, + USB_VENDOR_AKS, 0, USB_KNOWNDEV_NOPROD, - "Vision", + "Aladdin Knowledge Systems", NULL, }, { - USB_VENDOR_AKS, 0, + USB_VENDOR_VISION, 0, USB_KNOWNDEV_NOPROD, - "Aladdin Knowledge Systems", + "Vision", NULL, }, { @@ -460,6 +466,12 @@ struct usb_knowndev usb_knowndevs[] = { NULL, }, { + USB_VENDOR_ROCKFIRE, 0, + USB_KNOWNDEV_NOPROD, + "Rockfire", + NULL, + }, + { USB_VENDOR_IOMEGA, 0, USB_KNOWNDEV_NOPROD, "Iomega", |