linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: Parav Pandit <paravpandit@yahoo.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: doubts about sg driver
Date: Thu, 14 Jun 2007 16:02:39 -0400	[thread overview]
Message-ID: <46719EDF.3020308@torque.net> (raw)
In-Reply-To: <84219.67525.qm@web30104.mail.mud.yahoo.com>

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?
> Or SG always interacts with scsi_mod and it is
> transparent to the HBA drivers?
>>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.

The sg driver talks to the scsi mid level (and the
block layer strangely enough) but not directly to
LLDs.

> 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?

The sg driver is useful for any SCSI device (logical
unit) that is exposed by the scsi mid level. Apart
from direct access (i.e. disk) devices that might
include cd/dvd drives, tape drives, scsi enclosures,
saf-te controllers (which have processor peripheral
device type) and well known logical units.

> 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 the lk 2.6 series the mapping can be found in sysfs
(see lsscsi, specifically 'lsscsi -g'). In the sg3_utils
package the sg_map utility shows the mapping. That may
be helpful in the lk 2.4 series since there is no sysfs.

Doug Gilbert




      parent reply	other threads:[~2007-06-14 20:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-14 17:47 doubts about sg driver Parav Pandit
2007-06-14 19:51 ` Andrew Patterson
2007-06-14 20:02 ` Douglas Gilbert [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46719EDF.3020308@torque.net \
    --to=dougg@torque.net \
    --cc=linux-scsi@vger.kernel.org \
    --cc=paravpandit@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).