linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* accessing the scsi disk from a kernel module
@ 2005-09-30  5:27 Karthik Sarangan
  2005-09-30  6:00 ` Fawad Lateef
  0 siblings, 1 reply; 6+ messages in thread
From: Karthik Sarangan @ 2005-09-30  5:27 UTC (permalink / raw)
  To: Linux SCSI Mailing List

what do I write in a kernel module for accessing a scsi disk device?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: accessing the scsi disk from a kernel module
  2005-09-30  5:27 accessing the scsi disk from a kernel module Karthik Sarangan
@ 2005-09-30  6:00 ` Fawad Lateef
  2005-09-30  6:29   ` Karthik Sarangan
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Fawad Lateef @ 2005-09-30  6:00 UTC (permalink / raw)
  To: Karthik Sarangan; +Cc: Linux SCSI Mailing List

On 9/30/05, Karthik Sarangan <karthiks@cdac.in> wrote:
> what do I write in a kernel module for accessing a scsi disk device?
>

What do u mean by this ??? Are you writing a driver for SCSI Disk or
Want to do read/write on it using its own driver ??? For read/write
using its own driver you can use/call generic_make_request (function
from block/ll_rw_blk.c) from your kernel module to send requests to
any block device available on the system and kernel will do the
creating and sending request to correct block device whether that will
be a SCSI disk or any disk .... And if you want directly to use the
SCSI device then you have to make requests using SCSI protocol .....

--
Fawad Lateef

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: accessing the scsi disk from a kernel module
  2005-09-30  6:00 ` Fawad Lateef
@ 2005-09-30  6:29   ` Karthik Sarangan
  2005-09-30  6:53   ` Karthik Sarangan
  2005-09-30  7:06   ` Karthik Sarangan
  2 siblings, 0 replies; 6+ messages in thread
From: Karthik Sarangan @ 2005-09-30  6:29 UTC (permalink / raw)
  To: Fawad Lateef; +Cc: Linux SCSI Mailing List

Fawad Lateef wrote:

>On 9/30/05, Karthik Sarangan <karthiks@cdac.in> wrote:
>  
>
>>what do I write in a kernel module for accessing a scsi disk device?
>>
>>    
>>
>
>What do u mean by this ??? Are you writing a driver for SCSI Disk or
>Want to do read/write on it using its own driver ??? For read/write
>using its own driver you can use/call generic_make_request (function
>from block/ll_rw_blk.c) from your kernel module to send requests to
>any block device available on the system and kernel will do the
>creating and sending request to correct block device whether that will
>be a SCSI disk or any disk .... And if you want directly to use the
>SCSI device then you have to make requests using SCSI protocol .....
>
>--
>Fawad Lateef
>
>  
>
I dont want the buffer cache of the block device interfering.

Basically I require to read/write data (without being cached or copied into
intermediate kernel buffers) to scsi disk from a kernel module.

Hope this make my meaning clearer.

Karthik Sarangan


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: accessing the scsi disk from a kernel module
  2005-09-30  6:00 ` Fawad Lateef
  2005-09-30  6:29   ` Karthik Sarangan
@ 2005-09-30  6:53   ` Karthik Sarangan
  2005-09-30  7:56     ` Fawad Lateef
  2005-09-30  7:06   ` Karthik Sarangan
  2 siblings, 1 reply; 6+ messages in thread
From: Karthik Sarangan @ 2005-09-30  6:53 UTC (permalink / raw)
  To: Fawad Lateef; +Cc: Linux SCSI Mailing List

Fawad Lateef wrote:

>On 9/30/05, Karthik Sarangan <karthiks@cdac.in> wrote:
>  
>
>>what do I write in a kernel module for accessing a scsi disk device?
>>
>>    
>>
>
>What do u mean by this ??? Are you writing a driver for SCSI Disk or
>Want to do read/write on it using its own driver ??? For read/write
>using its own driver you can use/call generic_make_request (function
>from block/ll_rw_blk.c) from your kernel module to send requests to
>any block device available on the system and kernel will do the
>creating and sending request to correct block device whether that will
>be a SCSI disk or any disk .... And if you want directly to use the
>SCSI device then you have to make requests using SCSI protocol .....
>
>--
>Fawad Lateef
>
>  
>
I dont want the buffer cache of the block device interfering.

Basically I require to read/write data (without being cached or copied into
intermediate kernel buffers) to scsi disk from a kernel module.

Hope this make my meaning clearer.

Karthik Sarangan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: accessing the scsi disk from a kernel module
  2005-09-30  6:00 ` Fawad Lateef
  2005-09-30  6:29   ` Karthik Sarangan
  2005-09-30  6:53   ` Karthik Sarangan
@ 2005-09-30  7:06   ` Karthik Sarangan
  2 siblings, 0 replies; 6+ messages in thread
From: Karthik Sarangan @ 2005-09-30  7:06 UTC (permalink / raw)
  To: Fawad Lateef, Linux SCSI Mailing List

Fawad Lateef wrote:

>On 9/30/05, Karthik Sarangan <karthiks@cdac.in> wrote:
>  
>
>>what do I write in a kernel module for accessing a scsi disk device?
>>
>>    
>>
>
>What do u mean by this ??? Are you writing a driver for SCSI Disk or
>Want to do read/write on it using its own driver ??? For read/write
>using its own driver you can use/call generic_make_request (function
>from block/ll_rw_blk.c) from your kernel module to send requests to
>any block device available on the system and kernel will do the
>creating and sending request to correct block device whether that will
>be a SCSI disk or any disk .... And if you want directly to use the
>SCSI device then you have to make requests using SCSI protocol .....
>
>--
>Fawad Lateef
>
>  
>
I dont want the buffer cache of the block device interfering.

Basically I require to read/write data (without being cached or copied into
intermediate kernel buffers) to scsi disk from a kernel module.

Hope this make my meaning clearer.

Karthik Sarangan




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: accessing the scsi disk from a kernel module
  2005-09-30  6:53   ` Karthik Sarangan
@ 2005-09-30  7:56     ` Fawad Lateef
  0 siblings, 0 replies; 6+ messages in thread
From: Fawad Lateef @ 2005-09-30  7:56 UTC (permalink / raw)
  To: Karthik Sarangan; +Cc: Linux SCSI Mailing List

On 9/30/05, Karthik Sarangan <karthiks@cdac.in> wrote:
> I dont want the buffer cache of the block device interfering.
>
> Basically I require to read/write data (without being cached or copied into
> intermediate kernel buffers) to scsi disk from a kernel module.
>
> Hope this make my meaning clearer.
>

Ya, I havn't did thing what you want but for sending SCSI Commands to
the SCSI Device directly you have to use SCSI Protocol, in
Kernel-2.6.x I found generic SCSI Mid-Layer Driver
(http://lxr.linux.no/source/drivers/scsi/scsi.c) and other files with
name scsi_* in drivers/scsi/ from which you can get help and also look
header files defined in include/scsi/ which actually has the
structures holding the SCSI cmnds etc ......  (CMIIW)


--
Fawad Lateef

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-09-30  8:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-30  5:27 accessing the scsi disk from a kernel module Karthik Sarangan
2005-09-30  6:00 ` Fawad Lateef
2005-09-30  6:29   ` Karthik Sarangan
2005-09-30  6:53   ` Karthik Sarangan
2005-09-30  7:56     ` Fawad Lateef
2005-09-30  7:06   ` Karthik Sarangan

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).