From: Romain <ti...@li...> - 2004-04-15 12:40:59
|
Hi, Tijl Coosemans a dit : >> I did'nt know. But, I noticed in libticables support that you don't >> reset endpoints (due to a lack of support in libusb/BSD). This is >> important to make sure that a transfer is starting on a known state >> (and this is Ti-Connect do). > > I suspect the reason it isn't implemented in libusb/bsd is because > there aren't any ioctl calls in ugen to clear a halt or reset the > endpoints. > I'm not entirely sure, but I think this is handled by the ugen driver > itself. > > This is the relevant code snippet from the ugen interrupt handler. > 'status' holds the transfer exit status. > > if (status =3D=3D USBD_CANCELLED) > return; > > if (status !=3D USBD_NORMAL_COMPLETION) { > DPRINTF(("ugenintr: status=3D%d\n", status)); > if (status =3D=3D USBD_STALLED) > usbd_clear_endpoint_stall_async(sce->pipeh); > return; > } Yes, it is ! >> Well, there is a good reason to keep this support ;-) > > You can always make it platform specific and have the linux version > use a kernel module, but I'd keep the libusb code in the bsd port, in > case somebody decides to make a NetBSD/OpenBSD/... port. The libusb > method is more portable. Even if kernel support is better (at least under Linux), I keep libusb support because it has been written and it can be used as a fallback when no module is found (this is the current behaviour, managed by the detection/mapping layer). roms. --- Romain Li=E9vin (roms) <ti...@li...> Site web <http://www.lievin.net> "Linux, y'a moins bien mais c'est plus cher !" |