Paul Guo - SUN ERI - Beijing China wrote: > I tried to bind an buffer with len of 62268 to a dma handle, but > unfortunately failed. > ddi_dma_addr_bind_handle returns value: DDI_DMA_TOOBIG. The solaris is > snv_93 x86. > > status = ddi_dma_addr_bind_handle(tcb->tx_dma_handle, > NULL,(caddr_t)mp->b_rptr, len, > DDI_DMA_WRITE | DDI_DMA_STREAMING, DDI_DMA_DONTWAIT, 0, &dma_cookie, > &ncookies); > > tx_dma_handle is allocated using the following attr. > 90 DMA_ATTR_V0, /* version number */ > 91 0x0000000000000000ull, /* low address */ > 92 0xFFFFFFFFFFFFFFFFull, /* high address */ > 93 0x00000000FFFFFFFFull, /* dma counter max */ > 94 1, /* alignment */ > 95 0x00000FFF, /* burst sizes */ > 96 0x00000001, /* minimum transfer size */ > 97 0x00000000FFFFFFFFull, /* maximum transfer size */ > 98 0xFFFFFFFFFFFFFFFFull, /* maximum segment size */ > 99 16, /* scatter/gather list length */ > 100 0x00000001, /* granularity */ > 101 DDI_DMA_FLAGERR /* DMA flags */ > > 60+ kB is not a large buffer, and sgl 16 is not small, I do not know > why ddi_dma_addr_bind_handle still fails with DDI_DMA_TOOBIG? Anyone knows > why? >
The console warning comes from: http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/i86pc/io/rootnex.c#2521 Where was your memory allocated from? 62268 / 4096 is > 15 (~15.2). As I calculate it; at worst, this means it may take 17 cookies to map it, not 16. I imagine you hit this worst case and thus you got the wanring because you're unable to accept partial mappings. Paul _______________________________________________ driver-discuss mailing list driver-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/driver-discuss