LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-16-2009, 07:26 AM   #1
saloua
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Rep: Reputation: 0
Problem with usb driver - usb_submit_urb() does not work properly


Hello all!

I have written simple usb device driver.
But it works wrong. My device has 2 bulk full-speed USB2.0 endpoints(IN and OUT).
It uses standard write() call for writing(OUT urb) into device.
usb_submit_urb() returns 0, which means all OK. Callback return OK. But sometimes no usb transfer happens and my device doesn't receive anything. It is very strange behavior and my GUI application fails when this happens because data order is corrupted.
It is all OK with read() call(IN urbs).

Maybe there is some bug in usbcore?
Can anyone please help me or point a direction to which I should look?

If you need I can post parts of code. The same error occurs on mandrivalinux kernel 2.6.18 and VectorLinux gold 6.0 kernel 2.6.27

Thanks!
 
Old 07-17-2009, 07:56 AM   #2
cladisch
Member
 
Registered: Oct 2008
Location: Earth
Distribution: Slackware
Posts: 228

Rep: Reputation: 54
Quote:
usb_submit_urb() returns 0, which means all OK. Callback return OK. But sometimes no usb transfer happens and my device doesn't receive anything.
Is the callback's error code zero in this case, too?
Does usbmon indicate that the data was sent?

Quote:
Maybe there is some bug in usbcore?
Unlikely.

Quote:
Can anyone please help me or point a direction to which I should look?
You should look at your driver's source code.

Quote:
If you need I can post parts of code.
That would be helpful, since my crystal ball is under repair.
 
Old 07-20-2009, 10:19 AM   #3
saloua
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for answering me. I have found error in my driver.
I am developing real time application that's why it is hard to explain parts of code without knowing the whole project.

Sorry for wasting your time
 
  


Reply

Tags
usb2



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
usb serial driver failing when calling "usb_submit_urb" - why? DEF. Programming 3 05-28-2009 10:25 AM
Cannot get flash to work properly with an external USB Audio card - no sound Voland Linux - Software 3 10-02-2008 02:11 PM
Logitech MX Duo USB Does not work properly n e r d Linux - Hardware 1 05-30-2006 01:42 PM
Usb mouse doesn't work properly supervillan Linux - Hardware 1 03-26-2006 11:54 PM
USB NIC can't work properly!! Realtek 8150 chip. alsor Linux - Hardware 0 07-31-2004 02:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration