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.                               [EMAIL PROTECTED]
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 [EMAIL PROTECTED]

Reply via email to