On Wed, Jun 22, 2011 at 5:22 PM, RKK <kulkarni.ravi4@xxxxxxxxx> 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
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@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies