NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: kern/48715: Please support more USB modems



hi Ryoon,

no comment about the general change, but ..

>  +static const struct usb_devno umodem_devs[] = {
>  +	/* Conexant USB Modem */
>  +	{ USB_VENDOR_CONEXANT, USB_PRODUCT_CONEXANT_MODEM_1 },
>  +};
>  +#define	umodem_lookup(v, p) usb_lookup(umodem_devs, v, p)
>  +
>   int             umodem_match(device_t, cfdata_t, void *);
>   void            umodem_attach(device_t, device_t, void *);
>   int             umodem_detach(device_t, int);
>  @@ -97,13 +103,17 @@
>   	struct usbif_attach_arg *uiaa = aux;
>   	usb_interface_descriptor_t *id;
>   	int cm, acm;
>  +	id = usbd_get_interface_descriptor(uiaa->uiaa_iface);
>  +
>  +	if (umodem_lookup(uiaa->uiaa_vendor, uiaa->uiaa_product) &&
>  +	    id->bInterfaceNumber == 1)
>  +		return (UMATCH_VENDOR_PRODUCT);

what's this magic "1" about?


.mrg.


Home | Main Index | Thread Index | Old Index