kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: sumeetgandhare@gmail.com (sumeet gandhare)
To: kernelnewbies@lists.kernelnewbies.org
Subject: how to implement a SCSI commands through a driver?
Date: Wed, 22 Jun 2011 20:44:26 +0530	[thread overview]
Message-ID: <BANLkTi=7NHhRu0=8gLUoMXcox-A_sGiOkA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTikfuBjgueW67_eeuUhTZWSq5qvxQg@mail.gmail.com>

On Wed, Jun 22, 2011 at 5:22 PM, RKK <kulkarni.ravi4@gmail.com> wrote:

> Hi all ,
> Im trying to implement a custom new storage protocl which uses SCSI
> for storage in Linux .  I have been looking around for some files in
> the Linux SCSI subsystems to understand its three  layered design. The
> idea is to develop a separate stack which will internally use SCSI .
> so to get started all i want to do is write a module(kernel space)
> which sends SCSI commands to target device and retrieve some
> information from it. any idea like to how to proceed and which are
> files/books that can help me in this regard. I'm reading SCSI SPC-4
> and SBC-3 specifications .
>
> Hi Ravi,
   Please have a look at files drivers/scsi/scsi_lib.c , drivers/scsi/scsi.c
and drivers/scsi/scsi_scan.c, drivers/scsi/scsi_error.c
   scsi_scan.c contains the scsi discovery code. scsi_error.c contains the
error recovery code ..

   The main entry point function in scsi middle layer is scsi_request_fn ()
http://lxr.linux.no/#linux+v2.6.39/drivers/scsi/scsi_lib.c#L1481
  Also look at function scsi_alloc_sdev () in
http://lxr.linux.no/#linux+v2.6.39/drivers/scsi/scsi_scan.c#L238 ..

Regards,
Sumeet

> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110622/97eded88/attachment.html 

      reply	other threads:[~2011-06-22 15:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22 11:52 how to implement a SCSI commands through a driver? RKK
2011-06-22 15:14 ` sumeet gandhare [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='BANLkTi=7NHhRu0=8gLUoMXcox-A_sGiOkA@mail.gmail.com' \
    --to=sumeetgandhare@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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).