On Thu, 14 Apr 2005 17:16:33 -0700 Lan, Oliver wrote:

| Greg,
| In my program, I have following lines:
| struct usbdevfs_urb *pURB;
|         pURB->type = USBDEVFS_URB_TYPE_BULK;
|         pURB->endpoint = endpoint;
|         pURB->buffer = pBuffer;
|         pURB->buffer_length = iBufferLen;
|         pURB->signr = signal;
|         pURB->number_of_packets = iNumPackets;
|         pURB->usercontext = pUserContext;
|         pURB->flags = USBDEVFS_URB_QUEUE_BULK;
| 
|         iResult = ioctl(m_fd,USBDEVFS_SUBMITURB,pURB);
| 
| I don't know why in the devio.c, proc_submiturb() will return with
| -EINVAL at this if statement: If ( uurb.flags &
| ~(USBDEVFS_URB_ISO_ASAP|USBDEVFS_SHORT_NOT_OK|URB_NOT_FSRB|URB_ZERO_PACK
| ET)) { Return EINVAL; }

Only those listed flags are allowed.
What does it do if you set pURB->flags = 0  ?


| Does Fedroa take out the support of USBDEVFS_URB_QUEUE_BULK? If yes,
| what is alternative way to use it? It was working on 2.4 kernel.

2.6 removes the need that flag, not just Fedora.
IIRC, you can always queue bulk URBs in 2.6, just create
and send multiple URBs.  No flags required.


| I can change the pURB->flags to be USBDEVFS_URB_ISO_ASAP to make the
| program go further, but the pURB->type (USBDEVFS_URB_TYPE_BULK) will
| cause the op->submit_urb() to return errno 22 in the urb.c:
| usb_submit_urb().
| 
| Do you have any clue?
| 
| Thanks
| 
| tclan
| 
| -----Original Message-----
| From: Greg KH [mailto:[EMAIL PROTECTED] 
| Sent: Wednesday, April 13, 2005 7:48 AM
| To: Lan, Oliver
| Cc: linux-usb-devel@lists.sourceforge.net
| Subject: Re: linux 2.6 porting issue
| 
| On Wed, Apr 13, 2005 at 07:19:24AM -0700, Lan, Oliver wrote:
| > And we found out usbdevfs was not supported on Linux 2.6.10, the mount
| > -t usbdevfs command failed with Kernel not support usbdevfs message. 
| 
| It has been called "usbfs" for over 2 years.  That also works on 2.4 and
| I think on 2.2.
| 
| >  Then I try to use hiddev, first to create a usb dir under /etc. then
| > mknod /dev/usb/hiddev0 c 180 96 was OK.
| > But the open("/dev/usb/hiddev0", O_RDONLY) failed with "no such
| device".
| 
| Are you sure you have a hid device attached?  Why would you need to
| create the node, it should already be there if you have a static /dev,
| or if you use udev.


---
~Randy


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to