On 11/30/2015 10:32 AM, Felix Fietkau wrote:
Coherent memory is more expensive to allocate (and constrained on some architectures where it has to be pre-allocated). It is also completely unnecessary, since the host has no reason to even access these allocated memory spaces Signed-off-by: Felix Fietkau <nbd@xxxxxxxxxxx>
- memset(ar->wmi.mem_chunks[idx].vaddr, 0, pool_size); + if (!num_units) + return -ENOMEM; + + paddr = dma_map_single(ar->dev, vaddr, pool_size, DMA_TO_DEVICE); + if (dma_mapping_error(ar->dev, paddr)) { + kfree(vaddr); + return -ENOMEM; + }
Are you sure you have the direction correct for the 'dma_map_single' call? I thought this memory was for the NIC to scribble in, and probably host should never even bother reading or writing it? The reason I started looking at this is that I see these errors when trying to use a 4x4 wave-2 ath10k NIC in a 4.4.0-rc7 ath kernel: [ 202.489625] wlan0: authenticate with 00:0e:8e:f8:73:96 [ 202.784533] DMAR: DRHD: handling fault status reg 3 [ 202.786246] wlan0: send auth to 00:0e:8e:f8:73:96 (try 1/3) [ 202.788133] DMAR: DMAR:[DMA Write] Request device [05:00.0] fault addr ff5de000 DMAR:[fault reason 05] PTE Write access is not set [ 202.887410] wlan0: send auth to 00:0e:8e:f8:73:96 (try 2/3) [ 202.988423] wlan0: send auth to 00:0e:8e:f8:73:96 (try 3/3) [ 203.089437] wlan0: authentication with 00:0e:8e:f8:73:96 timed out This is on an Intel x86-64 system with IOMMU (VT-d) enabled. I'm likely having more than one problem since a 4.3.0-rc6+ kernel is not working with this NIC either... Thanks, Ben -- Ben Greear <greearb@xxxxxxxxxxxxxxx> Candela Technologies Inc http://www.candelatech.com -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html