Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jun 2008 14:17:23 -0600
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        "Pan, Weimin" <weimin.pan@hp.com>
Cc:        "freebsd-scsi@freebsd.org" <freebsd-scsi@freebsd.org>
Subject:   Re: How to directly pass a dma physical address and length from SCSI upper layer to LLD without mapping the dma memory to kernel pages
Message-ID:  <20080609201723.GA95850@nargothrond.kdm.org>
In-Reply-To: <6B24EEDBA38D764293B27C04FE414CC64E40604C07@G1W0491.americas.hpqcorp.net>
References:  <6B24EEDBA38D764293B27C04FE414CC64E40604C07@G1W0491.americas.hpqcorp.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 09, 2008 at 18:18:16 +0000, Pan, Weimin wrote:
> SCSI upper layer can pass a scatterlist to middle layer and LLD. Normally the page_link, length, and offset is set in the scatterlist. LLD will convert to dma_address from pages by itself. That means the dma physical address has to map to kernel memory space before it can be passed to LLD for data transfer. If I have a large dma memroy and it doesn't need to be touched by kernel or user mode Apps, it is a performance penalty to force to do that.
> 
> Is there a way to directly pass a dma physical address from upper layer to LLD (like use dma_address in a scatterlist)?
> I looked at a couple of LLD drivers and none of them handle this kind of situation.

In theory, you can pass a physical address in a CAM CCB if you set the
CAM_DATA_PHYS flag on the CCB.

It looks like quite a few drivers in the tree support that flag, or at
least look at it.

So take a look at whichever driver you're using, and see if it looks at
that flag in the CCB.

Ken
-- 
Kenneth Merry
ken@kdm.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080609201723.GA95850>