Re: Help - interface between Linux SCSI mid-level driver and lower-level driver

Michael Pavlovsky
2004-03-26T10:40:50Z

Hi,
I am working on something similar ( over InfiniBand)
I have no experiance with scsi subsystem and I am gothering any peace of
information about mid-core layer interface towards higher layers.
I hope next may help to you, and if you know more please publish it.
In order to activate mid layer you should call scsi_allocate_device
after that
choose the right device from linked list and fill scsi_command struct
register it , and call scsi_do_command
I am going to write some code soon so I hope I would undertstand better.
For now the best source of information for me is
http://www.andante.org/scsi.html
it is sucks ( just data structures and not complete)
and take unh-iscsi from sf.net they have scsi_target.{c,h} it is ~1500
lines of code and readable

please write me if you know more.

Michael

Lee Xing wrote:

>Hi,
>
>I'm not SCSI driver expert. Sorry for asking simple questions here. Your help would be appreciated.
>
>We are working on a new prototype that uses a FC HBA on Linux. Our FC driver detects the physical FC disks as SCSI devices and reports them to a higher_layer (not Linux SCSI mid-level driver) in Linux kernel. Now, we need to create another layer that sits in between the existing higher_layer and Linux SCSI mid-level driver, and to register the detected FC/SCSI devices as Linux sd/sg devices.
>
>My question is what are the interface functions in SCSI mid-level driver we can invoke to register the detected FC/SCSI devices as Linux sg/sd devices. Sample code and documents would be a great help.
>
>Thanks,
>
>
>L.
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>

--
--
"If everybody minded their own business," the Duchess
said in a hoarse growl, "the world would go round a
deal faster than it does".

Lewis Carroll (1832--98), English author,mathematician.
Alice's Adventures in Wonderland, ch. 6 (1865).