Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Aug 2002 16:08:35 +0100
From:      Ian Dowse <iedowse@maths.tcd.ie>
To:        Soeren Schmidt <sos@freebsd.dk>
Cc:        Bruce M Simpson <bms@spc.org>, n_hibma@FreeBSD.ORG, joe@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Re: USB->ATA devices 
Message-ID:   <200208271608.aa03351@salmon.maths.tcd.ie>
In-Reply-To: Your message of "Tue, 27 Aug 2002 16:37:15 %2B0200." <200208271437.g7REbFUl091711@freebsd.dk> 

next in thread | previous in thread | raw e-mail | index | archive | help
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




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