In on control endpoint
Hans Petter Selasky
hselasky at c2i.net
Wed May 14 19:45:52 UTC 2008
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
More information about the freebsd-usb
mailing list