Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Aug 1999 20:14:25 -0400
From:      Keith Mitchell <kmitch@weenix.guru.org>
To:        scsi@freebsd.org
Subject:   CAM (driver devel) question
Message-ID:  <19990811201425.A89846@weenix.guru.org>

next in thread | raw e-mail | index | archive | help
Hi,

I am starting to work on writing a SCSI device driver for FreeBSD and  have
been looking at some of the other drivers to try and figure out the
interface to the device driver and came up with a few questions that I 
couldn't find an answer to (either in the source code or in the mailing
list archives).

Right now my development focus is on the 3.2 tree and my system is a
3.2-STABLE system from early 8/99.


(1) It appears from looking at the other drivers that the CAM subsystem
will handle scatter gather.  If (ccb_h->flags & CAM_SCATTER_VALID) != 0 then
the data pointer refers to a scatter/gather list.  The problem is I couldn't
find anywhere in the kernel that sets this value.  Does CAM reslly support
scatter/gather at this point in time and if so where does the structure
get allocated and passed down.

(2) I see that most (if not all) of the SCSI drivers have been switched over
to the new bus_dma methods.  Whenever the drivers send data down to the card
they always do a bus_dmamap_sync() on a DMA map in the controller specific
CCB structures.

My question is do I need to do that on every piece of DMA??  I have to DMA
a structure to the controller to start a command (command can be an I/O
request or an internal command).  That structure also usually has a data
pointer (or two) there.  Do I need to keep a map to handle syncs to every
structure that I DMA to the adapter (adapter CCBs and data included)??


Thanks.

-- 
Keith Mitchell
Email: kmitch@guru.org				PGP key available upon request


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message




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