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.
This commit is contained in:
Nick Hibma 1999-04-19 20:25:18 +00:00
parent 63cfedcc93
commit 49ae25e811
3 changed files with 75 additions and 22 deletions

View File

@ -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

View File

@ -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 */

View File

@ -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,
@ -189,18 +189,18 @@ struct usb_knowndev usb_knowndevs[] = {
"Jazz",
"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,
@ -231,6 +231,12 @@ struct usb_knowndev usb_knowndevs[] = {
"Agiler",
"mouse 29UO",
},
{
USB_VENDOR_ROCKFIRE, USB_PRODUCT_ROCKFIRE_GAMEPAD,
0,
"Rockfire",
"gamepad 203USB",
},
{
USB_VENDOR_IOMEGA, USB_PRODUCT_IOMEGA_ZIP100,
0,
@ -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,
@ -423,18 +429,18 @@ struct usb_knowndev usb_knowndevs[] = {
"Jazz",
NULL,
},
{
USB_VENDOR_VISION, 0,
USB_KNOWNDEV_NOPROD,
"Vision",
NULL,
},
{
USB_VENDOR_AKS, 0,
USB_KNOWNDEV_NOPROD,
"Aladdin Knowledge Systems",
NULL,
},
{
USB_VENDOR_VISION, 0,
USB_KNOWNDEV_NOPROD,
"Vision",
NULL,
},
{
USB_VENDOR_ATEN, 0,
USB_KNOWNDEV_NOPROD,
@ -459,6 +465,12 @@ struct usb_knowndev usb_knowndevs[] = {
"Agiler",
NULL,
},
{
USB_VENDOR_ROCKFIRE, 0,
USB_KNOWNDEV_NOPROD,
"Rockfire",
NULL,
},
{
USB_VENDOR_IOMEGA, 0,
USB_KNOWNDEV_NOPROD,