diff options
author | sanpei <sanpei@FreeBSD.org> | 2004-05-30 01:48:04 +0000 |
---|---|---|
committer | sanpei <sanpei@FreeBSD.org> | 2004-05-30 01:48:04 +0000 |
commit | f3ff3c1aefc91455d73d3aa4c364eb5c652986e4 (patch) | |
tree | 1950cb0b5ab44831cb0c6a44b89f4a8dbb04a55f | |
parent | 58fffa8ca6e41cd27b6e309192a82e542f6f104a (diff) | |
download | FreeBSD-src-f3ff3c1aefc91455d73d3aa4c364eb5c652986e4.zip FreeBSD-src-f3ff3c1aefc91455d73d3aa4c364eb5c652986e4.tar.gz |
check interface number
Kyocera AH-K3001V has 2 data interface. But we could use only one
interface(id = 0)
PR: kern/66779
Submitted by: Togawa Satoshi <toga@puyo.org>
-rw-r--r-- | sys/dev/usb/umodem.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c index e552d16..c28dfbc 100644 --- a/sys/dev/usb/umodem.c +++ b/sys/dev/usb/umodem.c @@ -118,10 +118,11 @@ SYSCTL_INT(_hw_usb_umodem, OID_AUTO, debug, CTLFLAG_RW, static const struct umodem_product { u_int16_t vendor; u_int16_t product; + u_int8_t interface; } umodem_products[] = { /* Kyocera AH-K3001V*/ - { USB_VENDOR_KYOCERA, USB_PRODUCT_KYOCERA_AHK3001V }, - { 0, 0 }, + { USB_VENDOR_KYOCERA, USB_PRODUCT_KYOCERA_AHK3001V, 0 }, + { 0, 0, 0 }, }; /* @@ -236,7 +237,8 @@ USB_MATCH(umodem) ret = UMATCH_NONE; for (i = 0; umodem_products[i].vendor != 0; i++) { if (umodem_products[i].vendor == UGETW(dd->idVendor) && - umodem_products[i].product == UGETW(dd->idProduct)) { + umodem_products[i].product == UGETW(dd->idProduct) && + umodem_products[i].interface == id->bInterfaceNumber) { ret = UMATCH_VENDOR_PRODUCT; break; } |