Date: Sun, 6 Jan 2008 22:03:34 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 132644 for review Message-ID: <200801062203.m06M3YRj078475@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=132644 Change 132644 by hselasky@hselasky_laptop001 on 2008/01/06 22:02:58 Improve alternate setting. Add some more debug prints. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#99 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#99 (text+ko) ==== @@ -3368,20 +3368,22 @@ } if (iface->alt_index == req.wValue[0]) { /* no change - nothing to do */ + PRINTFN(0, ("alt setting no change\n")); break; } - error = device_detach(iface->subdev); - if (error) { - goto tr_stalled; - } + usbd_detach_device(udev, req.wIndex[0], 1); + error = usbd_set_alt_interface_index(udev, req.wIndex[0], req.wValue[0]); if (error) { + PRINTFN(0, ("alt setting failed %s\n", + usbd_errstr(error))); goto tr_stalled; } error = usbd_probe_and_attach(udev, req.wIndex[0]); if (error) { + PRINTFN(0, ("alt setting probe failed\n")); goto tr_stalled; } break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801062203.m06M3YRj078475>