From: Tijl C. <ti...@ul...> - 2004-04-15 12:13:48
|
On Thu, 15 Apr 2004 11:12:57 +0200 (CEST), Romain Li=E9vin wrote: > Hi Tijl, >=20 >> On Tue, 13 Apr 2004 23:04:51 +0200 (CEST), Romain Li=E9vin wrote: >> >>> Note: kernel module behaviour/implementation is the same as the >>> lib-usb one but is working better (no transfer interruption). >>> Kernel module should have less latency (by nature). >>> >>> Tijl: I think that a FreeBSD kernel module will be the only way >>> to make it work on BSD. >> >> The cable works fine using libusb (there are no transfer >> interruptions like you mentioned above), except with ohci, where >> the cable doesn't get probed and attached so a kernel module >> wouldn't work here either. >=20 > 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; } > I can say that receiving a FLASH app or doing a ROMdump w/ libusb > support under Linux (can) fails at any moment. Well, I must admit that I haven't done any extensive testing but so far I haven't had any problems with the cable. > 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. |