Subject: Re: SCSI Scatter-Gather buffer command
To: Dante Profeta <dante@mclink.it>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 07/02/1998 10:59:41
On Thu, 02 Jul 1998 14:02:01 +0200 
 Dante Profeta <dante@mclink.it> wrote:

 > Jason Thorpe wrote:
 > > Is that as clear as mud?  :-)
 > 
 > :-) It's very clear to me, thank you.

*whew*  Ok, good ... sometimes it's hard to explain things (you take for
granted background info that the other person might not know...)

 > There is no such a thing in my Linux code.
 > So, have I to translate linear buffers into DMA segments? Why?

Well... because linear buffers in virtual space are not necessary
linear in DMA space...

In any case, it's easy... you call bus_dmamap_load() with the linear
buffer, and it places the DMA segments into the dmamap... the code
in bha.c that does this is in bha_scsi_cmd(), starting at line 1450
(assuming version 1.23 of the file).

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                            Home: +1 408 866 1912
NAS: M/S 258-5                                       Work: +1 650 604 0935
Moffett Field, CA 94035                             Pager: +1 650 428 6939