From owner-freebsd-hackers Tue Aug 27 8: 8:49 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E02637B400; Tue, 27 Aug 2002 08:08:43 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 3934F43E84; Tue, 27 Aug 2002 08:08:42 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 27 Aug 2002 16:08:35 +0100 (BST) To: Soeren Schmidt Cc: Bruce M Simpson , n_hibma@FreeBSD.ORG, joe@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: USB->ATA devices In-Reply-To: Your message of "Tue, 27 Aug 2002 16:37:15 +0200." <200208271437.g7REbFUl091711@freebsd.dk> Date: Tue, 27 Aug 2002 16:08:35 +0100 From: Ian Dowse Message-ID: <200208271608.aa03351@salmon.maths.tcd.ie> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200208271437.g7REbFUl091711@freebsd.dk>, Soeren Schmidt writes: >It should be possible to hide the USB stuff under the ATA_* macroes >or even just under bus_space_*. >I need a bit more concrete details on how to call into the USB >code, then it should be pretty easy to add... This would be hard to do right, as the preferred way to talk to USB devices is with a request-callback model. The ATA command would need to be put into a request structure and handed to the USB device driver, and the USB driver would then call back when the request completes. There are hacks that can be used to perform the USB operations synchronously, but they generally do not handle unexpected removal of the device well at all. There are many possible ATA/ATAPI over USB protocols, so turning the ATA request into one or more USB transfers is a bridge-specific operation. Basically these odd protocols exist because the manufacturers of the various bridges have decided to cut corners and not implement the standard USB mass storage interface. Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message