David,
      Thanks for your info, another quick question. Im
using the dma_buf_bind_handle API to translate the
'buf' structure into cookies(physical addresses) to
load my h/w SGL ,but i also need the virtual address
of the buffer, is it suffice to use just
bp->b_un.b_addr or should i do a bp_mapin(bp) prior to
this? 

Thanks in advance

Som



--- David Gwynne <[EMAIL PROTECTED]> wrote:

> On Fri, Dec 21, 2007 at 12:59:23AM -0800, Somnath
> kotur wrote:
> > Hi David,
> >           I am involved in writing a SCSI HBA
> Driver
> > myself for  properietary card, i noticed that in
> > tran_init_pkt , you first stash away the DMA
> cookies
> > for the 'buf' structure in an intermediate
> structure
> > called the ccb_sgl[] ,and then in tran_start you
> load
> > the hw sgl with this ccb_sgl (referring to
> function
> > mfi_load_sgl()) ..Is there a reason the hw sgl was
> not
> > directly loaded in tran_init_pkt in the same loop
> as
> > the ccb_sgl[] is loaded ? i saw the svn commit for
> the
> > same and am not sure i fully understood, could you
> pls
> > explain?
> 
> solaris has a really annoying "feature" where you
> cant iterate over its
> dma descriptors more than once. so if you want to
> use them twice you
> have to keep a copy of their values yourself. i
> stash the values
> because i need their value twice, the first time in
> init_pkt to figure
> out how much you're going to transfer in that io,
> and the second time
> in tran_start as you describe above.
> 
> the reason i dont write the sgl to the hardware
> descriptor during
> init_pkt is because i dont know what type of command
> im doing at that
> point. mfi handles block io operation with a
> differently sized command
> to the one you pass the rest of the scsi commands to
> the firmware with.
> this means the beginning of the sgl can be in two
> different offsets. i
> cant write the sgl till tran_start when i figure out
> what command
> it is.
> 
> hope this helps,
> dlg
> 
> > 
> > Thanks
> > Som
> > --- David Gwynne <[EMAIL PROTECTED]> wrote:
> > 
> > > Hi,
> > > 
> > > I have written a driver called mfi that supports
> the
> > > LSI MegaRAID SAS  
> > > and Dell PERC 5 RAID controllers. This hardware
> > > currently lacks  
> > > support in OpenSolaris, but a lot of of the big
> > > vendors (it seems  
> > > like everyone except Sun) are now shipping these
> > > boards in their  
> > > machines. Integrating this driver could open
> doors
> > > for OpenSolaris  
> > > based distributions on these machines.
> > > 
> > > I currently have a RFE 6556091 open against this
> > > code, however, I'd  
> > > like to see the process of integration done in
> the
> > > open and by the  
> > > community, hence this project proposal.
> > > 
> > > The code for the driver is available at the
> > > following urls:
> > > 
> > > http://www.itee.uq.edu.au/~dlg/mfi/
> > > https://svn.itee.uq.edu.au/repo/mfi/ (svn)
> > > https://svn.itee.uq.edu.au/viewvc/mfi/
> > > 
> > > Feel free to contact me if you need further
> > > information.
> > > 
> > > dlg
> > > _______________________________________________
> > > driver-discuss mailing list
> > > driver-discuss@opensolaris.org
> > >
> >
>
http://mail.opensolaris.org/mailman/listinfo/driver-discuss
> > > 
> > 
> > 
> > 
> >      
>
____________________________________________________________________________________
> > Looking for last minute shopping deals?  
> > Find them fast with Yahoo! Search. 
>
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
> 



      
____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
_______________________________________________
driver-discuss mailing list
driver-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to