This is my case:
I have my own usb device let's say "ddd"
Device has 1(one) Configuration, 1(one) Interface (IF) and 3 alternate IF
I work with device only from user space using usb_devfs IOCTL's
I do the following:
1. Run ddd_init executable
open( "/proc/bus/usb/.... )
ioctl(USBDEVFS_SETCONFIGURATION ... )
ioctl(USBDEVFS_CLAIMINTERFACE ... )
ioctl(USBDEVFS_SETINTERFACE ...) /* Select IF=1 alt_IF=2 */
ioctl(USBDEVFS_RELEASEINTERFACE ... )
close
2. I run applications "ddd_doit1, ddd_doit2, ddd_doit3, ..... )
open( "/proc/bus/usb/.... )
while( doing it ) {
ioctl(USBDEVFS_CLAIMINTERFACE ... )
ioctl(USBDEVFS_BULK ... ) /* device works with BULK on IF=1 alt_IF=2 in_EP=0x84
out_EP=0x02 */
ioctl(USBDEVFS_RELEASEINTERFACE ... )
}
close
This processes can run simultaneously and use CLAIMEINTERFACE as mutex
All this works fine on 2.4.xxx
But Now I run it on 2.6.4-52-smp and got error in
ioctl(USBDEVFS_BULK ... )
I made some digging in the kernel code and found out the problem is that after
RELEASEINTERFACE
all IF endpoints are disabled by reducing maxmessage to zero. It seams like I have to
call
ioctl(USBDEVFS_SETINTERFACE ...) any time after I claime IF.
My question is if I'm doing something wrong? I do not want to call
ioctl(USBDEVFS_SETINTERFACE ...)
all the time because as far as I understand USBDEVFS_SETINTERFACE cause to control
transaction which has no reason as well as I made it once and selected the right IF
and alt_IF in ddd_init.
I do not understand why sequence of
open( "/proc/bus/usb/.... )
ioctl(USBDEVFS_CLAIMINTERFACE ... )
is not enough to send next
ioctl(USBDEVFS_BULK ... )
Can You suggest any workaround ? Or maybe I'm missing something.
Thanks.
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel