Hi Parav,
On Thu, 2007-06-14 at 10:47 -0700, Parav Pandit wrote:
> Hi,
>
> Few basic questions on sg driver:
>
> 1. Are there any hooks that low level HBA driver needs
> to implement - for providing support for SG (SCSI
> generic) driver?
No. This is all done in the sg/scsi-midlayer.
> Or SG always interacts with scsi_mod and it is
> transparent to the HBA drivers?
Yes.
> From the tldp How-to and sg.c it looks like it doesn't
> directly talk with Low level HBA driver, but want to
> confirm.
Correct.
>
> 2. Can applications talk with SCSI RAID controller
> device (some targets exposes LUN-0 as controller)
> through sg interface or it is only for storage
> devices?
Any SCSI device.
>
> 3. How is the mapping between /dev/sda /dev/sdb etc to
> /dev/sg0 /dev/sg1 etc?
> Is this information is accessible via procfs or sysfs
> interface?
>
In 2.6 kernels, you can looks at:
/sys/class/scsi_device/h:c:t:l/scsi_generic:sg#
in 2.4 and 2.6 you can look at /proc/scsi/sg/devices. Where the
contents is:
seq_printf(s, "%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n",
scsidp->host->host_no, scsidp->channel,
scsidp->id, scsidp->lun, (int)
scsidp->type,
1,
(int) scsidp->queue_depth,
(int) scsidp->device_busy,
(int) scsi_device_online(scsidp));
> Regards,
> Parav Pandit
>
>
>
>
> ____________________________________________________________________________________
> Be a better Globetrotter. Get better travel answers from someone who knows.
> Yahoo! Answers - Check it out.
> http://answers.yahoo.com/dir/?link=list&sid=396545469
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Andrew Patterson
Hewlett-Packard Company
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html