From owner-freebsd-hackers Tue Aug 27 8:36:56 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 BB0D137B400; Tue, 27 Aug 2002 08:36:53 -0700 (PDT) Received: from freebsd.dk (cpe.atm2-0-56339.0x50c6aa0a.abnxx2.customer.tele.dk [80.198.170.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1432243E72; Tue, 27 Aug 2002 08:36:52 -0700 (PDT) (envelope-from sos@freebsd.dk) Received: (from sos@localhost) by freebsd.dk (8.12.5/8.12.5) id g7RFapYX004079; Tue, 27 Aug 2002 17:36:51 +0200 (CEST) (envelope-from sos) From: Soeren Schmidt Message-Id: <200208271536.g7RFapYX004079@freebsd.dk> Subject: Re: USB->ATA devices In-Reply-To: <200208271608.aa03351@salmon.maths.tcd.ie> To: Ian Dowse Date: Tue, 27 Aug 2002 17:36:50 +0200 (CEST) Cc: Bruce M Simpson , n_hibma@FreeBSD.ORG, joe@FreeBSD.ORG, hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL98b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=ISO-8859-1 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 It seems Ian Dowse wrote: > 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. Sounds like a can of worms better left unopened... -Søren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message