Subject: Re: pseudo SCSI disk HBA driver?
To: None <>
From: Manuel Bouyer <>
List: tech-kern
Date: 02/05/2002 21:39:21
On Tue, Feb 05, 2002 at 05:24:58AM +0000, wrote:
> Does the source tree include anything like a pseudo HBA 
> driver?  Or does anyone know of one floating around?
> I want to write a little driver that sits below the SCSI 
> disk driver (sd.c) and receives SCSI commands but has no 
> hardware below it.  It's fine that it's hardwired to 
> sd.c. 
> The idea is similar to a pseudo disk driver, such as a 
> logical volume manager, but sits below sd.c, rather than 
> above it.
> If nothing like this exists already, do you have any 
> documentation suggestions?
> I'm wondering if it's as simple as adding a little piece 
> of code to the kernel (either modloaded or statically 
> linked) that dummys-up the arguments needed to call 
> sdattach(), and then just call it.  Or is it a lot more 
> complicated than that?

A dummy HBA driver, which accepts commands and always claim them to
be successfull should be easy to do (needs some tricks for the
INQUIRY, obvisouly). The harder part may be to fake anserw for commands
that expect data back.

See the scsipi(9) manual page

Manuel Bouyer <>