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>
This commit is contained in:
MIHIRA Sanpei Yoshiro 2004-05-30 01:48:04 +00:00
parent 76ce6ff787
commit f7ec9a7547
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129858

View File

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