In on control endpoint

Steve Clark sclark at netwolves.com
Wed May 14 20:16:15 UTC 2008


Hans Petter Selasky wrote:
> Hi Steve,
> 
> Try this:
> 
> static void
> ubsa_sierra_unlock(struct usbd_device *udev)
> {
> 	usb_device_request_t req;
> 
> 	req.bmRequestType = UT_WRITE_VENDOR_DEVICE;
> 	req.bRequest = 0x0b;
> 	USETW(req.wValue, 0x0001);
> 	req.wIndex[0] = 0;
> 	req.wIndex[1] = 0;
> 	USETW(req.wLength, 0);
> 
> 	if (usbd_do_request_flags
> 	    (udev, NULL, &req, NULL, 0, NULL, 1000)) {
> 		/* ignore any errors */
> 	}
> 	return;
> }
> 
> static int
> ubsa_probe(device_t dev)
> {
>         struct usb_attach_arg *uaa = device_get_ivars(dev);
>         const struct ubsa_product *up = ubsa_products;
> 
>         if (uaa->usb_mode != USB_MODE_HOST) {
>                 return (UMATCH_NONE);
>         }
>         if (uaa->iface) {
>                 return (UMATCH_NONE);
>         }
>         if ( uaa->vendor == USB_VENDOR_SIERRA && uaa->product == 0xfff )
>         {
> 	  ubsa_sierra_unlock(uaa->device);
> 	  return (UMATCH_NONE);
>         }
>         while (up->vendor) {
>                 if ((up->vendor == uaa->vendor) &&
>                     (up->product == uaa->product)) {
>                         return (UMATCH_VENDOR_PRODUCT);
>                 }
>                 up++;
>         }
>         return (UMATCH_NONE);
> }
> 
> If it works, maybe you can send a complete patch including those entries you 
> added to usbdevs ?
> 
> --HPS
> 
> 
Hi Hans,

I am using the modem right now!!!! As soon as I am satisfied that it is working reliably I'll
gladly send along the patches.

Thanks again,
Steve 


More information about the freebsd-usb mailing list