Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Mar 2003 10:35:55 -0800
From:      Maksim Yevmenkin <myevmenk@exodus.net>
To:        current@freebsd.org
Subject:   What is the proper handling for USB IOERRORs
Message-ID:  <3E78B88B.8000908@exodus.net>

next in thread | raw e-mail | index | archive | help
Dear Hackers,

Does anyone know what is the proper handling for USB IOERROR status
in USB transfer callback?

here is my problem. the driver opens bulk pipe and submits incoming
USB bulk transfer. the USB device is detached while the transfer is
still pending and pipe is still open. USB transfer callback gets called
with IOERROR status.

now how do i handle this? how do i know that this IOERROR is because
the device is gone and not because of some other reason?

there is a special USB status - CANCELLED and the driver only
stops re-submitting the request when it sees CANCELLED status.
the problem however is that the driver gets IOERROR *before*
it gets CANCELLED and thus keep re-submitting the request over
and over again. now eventually the driver will get CANCELLED
status and then the whole thing stops.

should driver just stop on any error? is there any other way?

thanks,
max




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E78B88B.8000908>