Re: SCSI /dev/sg question

gokhan sozmen (gokhan_sozmen@hotbot.com)
Sun, 29 Aug 1999 17:34:48 -0700


On Sun, 29 Aug 1999 23:42:16 Kurt Garloff wrote:

>This is not possible. The Linux SCSI drivers that I know don't allcoate an
>entry in the list of SCSI devices, not in /proc/scsi/scsi, nor in /dev/sg?.
>
>But what do you want to achieve by sending SCSI commands via sg to the
>adapter?

Useful in certain situations. For example with
most hardware RAID adapters the adapter creates
virtual SCSI disks (called containers) and
hides the details from the host.

In such a system, if these virtual disks are
not initialized (i.e. during virgin installation,
you will not see any SCSI devices in /proc/scsi
nor will there be a mapping of the driver to
a /dev/sg file. However to create these virtual
disks you have to send ioctl commands to the
driver - hence the problem.

There seems to be two solutions:
1- report the adapter as an additional SCSI
device, other than what you set the device id
in the scsi host template.( scsi init skips
adapter device id when building the /dev/sg
list and hence it doesn't get mapped to a
/dev/sg file )
OR
2- create an additional normal driver interface
to the SCSI driver. I'm not sure if anyone's
attempted this. I'd like to hear about it if
it's been done. It should be possible I guess.

>
>Hope this helps.

Thanks.
Gokhan Sozmen

>--
>Kurt Garloff <garloff@suse.de> Wuppertal, FRG
>PGP2 key: See mail header, key servers Linux kernel development
>SuSE GmbH, N|rnberg, FRG SCSI drivers: tmscsim(DC390), DC395
>

HotBot - Search smarter.
http://www.hotbot.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/