Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-05-2009, 05:09 PM   #1
LQ Newbie
Registered: Jun 2006
Location: Gainesville, Fl, USA
Distribution: Debian GNU/Linux
Posts: 18

Rep: Reputation: 0
usb_bulk_msg return value -8

I'm writing a USB kernel driver and for some of the bulk transfers, I'm using the following function.

#include <linux/usb.h>
int usb_bulk_msg (struct usb_device * usb_dev, unsigned int pipe, void * data, int len, int * actual_length, int timeout);
When I call it, it returns -8. The man page states:

If successful, it returns 0, otherwise a negative error number. The number of actual bytes transferred will be placed in the actual_timeout parameter.
If by "negative error number" it is referring to a value defined in errno.h, then that return value means "Exec format error". usb_bulk_msg is in the kernel, it shouldn't be calling exec. And if it was, wth?

Any ideas on what this value actually means?
Old 11-05-2009, 05:34 PM   #2
Registered: Nov 2009
Location: Lisbon, Portugal
Distribution: Gentoo, CentOs, Ubuntu, Debian
Posts: 182

Rep: Reputation: 49
I believe you will actually look in to the source code. BTW, why do you think that is returning a value defined in "errno.h"? It just returns an int It can be anything.

Looking in to the source code you have:

return usb_start_wait_urb(urb,timeout,actual_length);
Fallowing usb_start_wait_urb I discovered:
ret = usb_internal_control_msg(dev, pipe, dr, data, size, timeout);

I don't think it has anything to do with errno.h


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
dpkg return error :post installation script return an error code (1) grimfold Debian 2 09-10-2009 02:55 PM
Return Value Swapna173 Linux - Newbie 5 08-29-2008 08:10 AM
return value neerajchaudhari Linux - Newbie 1 08-29-2005 02:42 AM
return 0 or return(0) in C? servnov Programming 5 01-08-2005 05:39 PM
return linuxanswer Programming 4 10-26-2003 12:31 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:22 AM.

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