Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 May 2008 16:16:13 -0400
From:      Steve Clark <sclark@netwolves.com>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        freebsd-usb@freebsd.org
Subject:   Re: In on control endpoint
Message-ID:  <482B488D.1020704@netwolves.com>
In-Reply-To: <200805142147.06261.hselasky@c2i.net>
References:  <4828AA64.7060306@netwolves.com> <200805141739.48185.hselasky@c2i.net> <482B1E6B.3070309@netwolves.com> <200805142147.06261.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?482B488D.1020704>