this actually works? could you please send usbctl (from the usbutil package) output for this device? I don't like adding more quirks. if the device has the bulk endpoints in the control interface, then the requirement that the endpoints be in a different interface is overly restrictive.
On Wed, Feb 09, 2011 at 06:54:06PM -0800, Daniel C. Sinclair wrote: > Hello, I recently got a Qstarz BT-Q818XT GPS receiver > (http://www.qstarz.com/Products/GPS%20Products/BT-Q818XT-F.htm) which > contains an MTK vII/3329 chipset > (http://www.mediatek.com/en/product/info.php?sn=50). I got the > following when I plugged it into my laptop which is running > yesterday's snapshot: > > umodem0 at uhub1 port 2 configuration 1 interface 1 "MTK GPS Receiver" > rev 2.00/1.00 addr 2 > umodem0: no pointer to data interface > ugen0 at uhub1 port 2 configuration 1 "MTK GPS Receiver" rev 2.00/1.00 addr 2 > > I came up with some patches that make my GPS work and now I get the following: > > umodem0 at uhub1 port 2 configuration 1 interface 1 "MTK GPS Receiver" > rev 2.00/1.00 addr 2 > umodem0: data interface 0, has no CM over data, has no break > umodem0: status change notification available > ucom0 at umodem0 > > The first patch adds a new class of USB quirks: > > Index: usb_quirks.h > =================================================================== > RCS file: /cvs/src/sys/dev/usb/usb_quirks.h,v > retrieving revision 1.16 > diff -u -r1.16 usb_quirks.h > --- usb_quirks.h 19 Jul 2010 05:08:37 -0000 1.16 > +++ usb_quirks.h 10 Feb 2011 01:37:18 -0000 > @@ -49,6 +49,7 @@ > #define UQ_MS_LEADING_BYTE 0x00010000 /* mouse sends unknown leading byte > */ > #define UQ_EHCI_NEEDTO_DISOWN 0x00020000 /* must hand device over to > USB 1.1 > if attached to EHCI */ > +#define UQ_NO_CDC_UNION 0x00040000 /* no CDC UNION descriptor */ > }; > > extern const struct usbd_quirks usbd_no_quirk; > Index: umodem.c > =================================================================== > RCS file: /cvs/src/sys/dev/usb/umodem.c,v > retrieving revision 1.41 > diff -u -r1.41 umodem.c > --- umodem.c 25 Jan 2011 20:03:36 -0000 1.41 > +++ umodem.c 10 Feb 2011 01:37:18 -0000 > @@ -267,10 +267,13 @@ > /* Get the capabilities. */ > umodem_get_caps(uaa, id->bInterfaceNumber, &data_iface_no, > &sc->sc_cm_cap, &sc->sc_acm_cap); > - if (data_iface_no == 0) { > - printf("%s: no pointer to data interface\n", > - sc->sc_dev.dv_xname); > - goto bad; > + > + if (!(usbd_get_quirks(sc->sc_udev)->uq_flags & UQ_NO_CDC_UNION)) { > + if (data_iface_no == 0) { > + printf("%s: no pointer to data interface\n", > + sc->sc_dev.dv_xname); > + goto bad; > + } > } > > printf("%s: data interface %d, has %sCM over data, has %sbreak\n", > > > The second patch adds the vendor/device IDs and makes the GPS use the quirk: > > Index: usbdevs > =================================================================== > RCS file: /cvs/src/sys/dev/usb/usbdevs,v > retrieving revision 1.540 > diff -u -r1.540 usbdevs > --- usbdevs 1 Feb 2011 18:23:59 -0000 1.540 > +++ usbdevs 10 Feb 2011 01:37:53 -0000 > @@ -437,6 +437,7 @@ > vendor HAWKING 0x0e66 Hawking > vendor FOSSIL 0x0e67 Fossil > vendor GMATE 0x0e7e G.Mate > +vendor MTK 0x0e8d MTK > vendor OTI 0x0ea0 Ours Technology > vendor PILOTECH 0x0eaf Pilotech > vendor NOVATECH 0x0eb0 Nova Tech > @@ -2565,6 +2566,9 @@ > > /* MDS products */ > product MDS ISDBT 0x0001 MDS ISDB-T tuner > + > +/* MTK products */ > +product MTK VII3329 0x3329 vII/3329 GPS Receiver > > /* Meinberg Funkuhren products */ > product MEINBERG USB5131 0x0301 USB 5131 DCF77 - Radio Clock > Index: usb_quirks.c > =================================================================== > RCS file: /cvs/src/sys/dev/usb/usb_quirks.c,v > retrieving revision 1.63 > diff -u -r1.63 usb_quirks.c > --- usb_quirks.c 2 Dec 2010 06:39:09 -0000 1.63 > +++ usb_quirks.c 10 Feb 2011 01:37:54 -0000 > @@ -133,6 +133,8 @@ > { USB_VENDOR_VELLEMAN, USB_PRODUCT_VELLEMAN_K8055, ANY, { UQ_BAD_HID }}, > { USB_VENDOR_DREAMLINK, USB_PRODUCT_DREAMLINK_ULMB1, ANY, { > UQ_BAD_HID }}, > > + { USB_VENDOR_MTK, USB_PRODUCT_MTK_VII3329, ANY, { UQ_NO_CDC_UNION }}, > + > { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220, ANY, { UQ_NO_STRINGS > }}, > { USB_VENDOR_SHANTOU, USB_PRODUCT_SHANTOU_DM9601, ANY, { UQ_NO_STRINGS }}, > { USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2573, ANY, { UQ_NO_STRINGS > }}, > > > A very similar thing was done in NetBSD last year. See > http://www.mail-archive.com/source-changes-full@netbsd.org/msg15959.html > and http://www.mail-archive.com/source-changes-full@netbsd.org/msg15960.html > > Daniel -- jake...@sdf.lonestar.org SDF Public Access UNIX System - http://sdf.lonestar.org