[9236] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

A question about data buffers (fwd/2nd time around)

daemon@ATHENA.MIT.EDU (Mads Bondo Dydensborg)
Mon Jul 24 07:53:04 2000

Date:	Mon, 24 Jul 2000 13:42:42 +0200 (CEST)
From:	Mads Bondo Dydensborg <madsdyd@challenge.dk>
To:	linux-scsi@vger.rutgers.edu
Message-ID: <Pine.LNX.4.21.0007241341310.25057-100000@challenge.dk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Resending this - maybe someone will notice it this time :-)

I am working with accessing a SCSI device through shared memory. Since I
can't (currently) make sure that the physical addresses are the same
accross the different machines, I currently have to copy the data buffers
back and forth between the local machine's main memory and the shared
memory.

I was thinking if it was safe to do something like this when I recieve a
command from the scsi mid level:

if (cmd->request.cmd != READ) {
  /* For anything but READ, we need to copy buffers, etc */
  copy_data_buffers_sg_lists_etc_to_shared memory	
}

and, when I return the commands back, something like:

if (cmd->request.cmd != WRITE) {
  /* For anything but WRITE, we need to copy buffers, etc */
  copy_data_buffers_sg_lists_etc_from_shared memory	
}

In other words: Can I assume that the linux scsi mid level does not
put any information in the data buffer for a READ, and does not expect
changes to the data present after a WRITE?

I hope my question is clear. I guess I could go through the scsi mid level
myself, but maybe someone here knows the answer, in which case I would be
very happy to be enligthed.

Thanks,

Mads

-- 
Mads Bondo Dydensborg.                               madsdyd@challenge.dk
In a stinging rebuke, a federal judge Monday ruled Microsoft Corp. violated
the nation's antitrust laws by using its monopoly power in personal computer
operating systems to stifle competition.
                        - CNN Financial News April 03, 2000: 7:53 p.m. ET


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post