Hi there,
How do I know the address returned through ddi_dma_buf_bind_handle()?
The question is:
During debugging my SCSI HBA driver for bootable HBA case, the boot
processing
always stuck on a specific command where the address assigned is strange.
The
condition are following

1. bp->b_bcount=0x14000, bp->b_flags=0x2080051, bp->b_un.b_addr = 0;
   ama_flags= 0xa;
2. allocate dma_handle
3. call ddi_dma_buf_bind_handle(handle, bp, dma_flags, callback, 0,
                                &cmd_dmacookie, &cmd->ncookie);
   And return is always "0" (DDI_DMA_MAPPED)
4. The driver collect cmd_dmacookie.dmac_laddress to form a scatter/gatter
list, 
   it shows the following in several commands running

   1st times  0x7f7c1000 ~ 0x7f594000 (14 sglist)
   ...
   2nd times  0x7f6d5000 ~ 0x7f748000 (14 sglist)
   ...
   3rd times  0x7fedd000 ~ 0x7f850000 (14 sglist)
   ...
   4th times  0x2c74000  ~  0x22b3000 (14 sglist) <----- get busted

   The last one seems is not an valid address range. That's why I think 
   driver code get busted. I check every command before the last one has
been
   returned and release resources. Do I operate correctly for this DMA? And
how 
   to fix it?
  

Thanks
Steve


_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to