From owner-freebsd-current Wed Mar 19 10:39:15 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E61A37B401 for ; Wed, 19 Mar 2003 10:39:14 -0800 (PST) Received: from scl8owa02.int.exodus.net (scl8out02.exodus.net [66.35.230.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB42543F93 for ; Wed, 19 Mar 2003 10:39:07 -0800 (PST) (envelope-from Maksim.Yevmenkin@cw.com) Received: from scl8owa01.int.exodus.net ([66.35.230.241]) by scl8owa02.int.exodus.net with Microsoft SMTPSVC(5.0.2195.5329); Wed, 19 Mar 2003 10:39:07 -0800 Received: from exodus.net ([165.193.27.35]) by scl8owa01.int.exodus.net over TLS secured channel with Microsoft SMTPSVC(5.0.2195.5329); Wed, 19 Mar 2003 10:39:07 -0800 Message-ID: <3E78B88B.8000908@exodus.net> Date: Wed, 19 Mar 2003 10:35:55 -0800 From: Maksim Yevmenkin User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20021126 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: current@freebsd.org Subject: What is the proper handling for USB IOERRORs Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 19 Mar 2003 18:39:07.0585 (UTC) FILETIME=[D30E5B10:01C2EE46] Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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