usbd_io returns 3 (ESRCH) !!!

Hello everybody!

I am new to developing USB drivers for QNX. Here is my problem. I need to
send data to a custom USB device. Everything seems to go smooth until I try
to send
data to the device. At this point my usbd_io call returns
3(ESRCH) for the first time, then the devu-uhci dies and subsequent calls to
usbd_io return 9 (EBADF).

The EBADF error code is somewhat documented in the ddk help (says problem
with usbd_connect). However, there is no mentioning of error code 3 (ESRCH)
in the help for usbd_io. What does error code 3 mean?

Can anyone please help…

Thanks,

Cristian

Cristian <crt@cs.caltech.edu> wrote:
: Hello everybody!

: I am new to developing USB drivers for QNX. Here is my problem. I need to
: send data to a custom USB device. Everything seems to go smooth until I try
: to send
: data to the device. At this point my usbd_io call returns
: 3(ESRCH) for the first time, then the devu-uhci dies and subsequent calls to
: usbd_io return 9 (EBADF).

: The EBADF error code is somewhat documented in the ddk help (says problem
: with usbd_connect). However, there is no mentioning of error code 3 (ESRCH)
: in the help for usbd_io. What does error code 3 mean?

: Can anyone please help…

You can find the full docs for errno in the QNX Neutrino Library Reference.
Here’s what they say:

ESRCH – No such process

Someone else might know if it has a specific meaning for the USB stuff.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

Steve Reid <stever@qnx.com> wrote:

Cristian <> crt@cs.caltech.edu> > wrote:
: Hello everybody!

: I am new to developing USB drivers for QNX. Here is my problem. I need to
: send data to a custom USB device. Everything seems to go smooth until I try
: to send
: data to the device. At this point my usbd_io call returns
: 3(ESRCH) for the first time, then the devu-uhci dies and subsequent calls to
: usbd_io return 9 (EBADF).

: The EBADF error code is somewhat documented in the ddk help (says problem
: with usbd_connect). However, there is no mentioning of error code 3 (ESRCH)
: in the help for usbd_io. What does error code 3 mean?

: Can anyone please help…

You can find the full docs for errno in the QNX Neutrino Library Reference.
Here’s what they say:

ESRCH – No such process

Someone else might know if it has a specific meaning for the USB stuff.

I don’t think so. It sounds like the devu-uci dies WHILE handling
your request. If you are SEND-blocked or REPLY-blocked on a process,
and that process dies, MsgSend() will fail, setting errno to ESRCH.
(And, anything built on MsgSend() will similarly fail – resulting
in usbd_io failing with errno of ESRCH). If you try a later MsgSend()
to a coid or fd that points to a process that no longers exists, you
will get EBADF as your errno.

Now, the real question is why did devu-uhci die. Unfortunately,
I’m not at all familiar with that piece, so can’t even tell you
what sort of looking to do on that side, or what info to collect.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.