Mark Lord writes: > Mikael Pettersson wrote: > > I've started working on NCQ support for sata_promise, > > and I have a few questions regarding NCQ and libata: > > > > 1. Can I rely not seeing any non-NCQ commands while there > > are uncompleted NCQ commands on a port? > .. > > No, you cannot. So you'll have to code a .qc_defer() method > to hold them off in that case. For a *really* good example, > see my recently deployed mv_qc_defer() function in sata_mv.c > as of linux-2.6.26-rc2. Hmm, so I misinterpreted ata_std_qc_defer()? Ok, I'll look at sata_mv's version. ... > > 5. Does dmam_alloc_coherent() give the same alignment guarantees > > that pci_alloc_consistent() does? That is, both CPU and bus > > addresses will be aligned to the smallest PAGE_SIZE order that > > fits the requested size. > .. > > In sata_mv, I ran into those same concerns, and ended up creating > a couple of pools for local use by the driver. It uses dmam_pool_create() > (note the extra "m" in "dmam_"), dma_pool_alloc(), and dma_pool_free(). > > If you just search for "_pool" in sata_mv, you'll find all of the calls > (not many). The use of "dmam_pool_create()" assures that things will be > cleaned up properly/automatically if the controller ever "goes away". Thanks, this sounds like a decent solution. /Mikael -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html