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



The following reply was made to PR kern/48715; it has been noted by GNATS.

From: matthew green <mrg%eterna.com.au@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
    netbsd-bugs%netbsd.org@localhost, ryoon%NetBSD.org@localhost
Subject: re: kern/48715: Please support more USB modems
Date: Sat, 25 Jun 2016 13:30:45 +1000

 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