From: greearb@candelatech.com To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Ben Greear <greearb@candelatech.com> Subject: ath10k: wmi-alloc-chunk should use DMA_BIDIRECTIONAL. Date: Tue, 29 Nov 2016 14:00:28 -0800 [thread overview] Message-ID: <1480456828-13735-1-git-send-email-greearb@candelatech.com> (raw) From: Ben Greear <greearb@candelatech.com> These memory chunks are often used as 'swap' by the NIC, so it will be both reading and writing to these areas. This seems to fix errors like this on my x86-64 machine: kernel: DMAR: DMAR:[DMA Write] Request device [05:00.0] fault addr ff5de000 DMAR:[fault reason 05] PTE Write access is not set Tested-by: Marek Behun <kabel@blackhole.sk> Signed-off-by: Ben Greear <greearb@candelatech.com> diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 9fcb249..c68278a 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -4558,7 +4558,7 @@ static int ath10k_wmi_alloc_chunk(struct ath10k *ar, u32 req_id, if (!num_units) return -ENOMEM; - paddr = dma_map_single(ar->dev, vaddr, pool_size, DMA_TO_DEVICE); + paddr = dma_map_single(ar->dev, vaddr, pool_size, DMA_BIDIRECTIONAL); if (dma_mapping_error(ar->dev, paddr)) { kfree(vaddr); return -ENOMEM;
WARNING: multiple messages have this Message-ID (diff)
From: greearb@candelatech.com To: ath10k@lists.infradead.org Cc: Ben Greear <greearb@candelatech.com>, linux-wireless@vger.kernel.org Subject: ath10k: wmi-alloc-chunk should use DMA_BIDIRECTIONAL. Date: Tue, 29 Nov 2016 14:00:28 -0800 [thread overview] Message-ID: <1480456828-13735-1-git-send-email-greearb@candelatech.com> (raw) From: Ben Greear <greearb@candelatech.com> These memory chunks are often used as 'swap' by the NIC, so it will be both reading and writing to these areas. This seems to fix errors like this on my x86-64 machine: kernel: DMAR: DMAR:[DMA Write] Request device [05:00.0] fault addr ff5de000 DMAR:[fault reason 05] PTE Write access is not set Tested-by: Marek Behun <kabel@blackhole.sk> Signed-off-by: Ben Greear <greearb@candelatech.com> diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 9fcb249..c68278a 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -4558,7 +4558,7 @@ static int ath10k_wmi_alloc_chunk(struct ath10k *ar, u32 req_id, if (!num_units) return -ENOMEM; - paddr = dma_map_single(ar->dev, vaddr, pool_size, DMA_TO_DEVICE); + paddr = dma_map_single(ar->dev, vaddr, pool_size, DMA_BIDIRECTIONAL); if (dma_mapping_error(ar->dev, paddr)) { kfree(vaddr); return -ENOMEM; _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k
next reply other threads:[~2016-11-29 22:00 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-11-29 22:00 greearb [this message] 2016-11-29 22:00 ` ath10k: wmi-alloc-chunk should use DMA_BIDIRECTIONAL greearb 2016-12-01 11:16 ` Kalle Valo 2016-12-01 11:16 ` Kalle Valo 2016-12-05 10:29 ` Valo, Kalle 2016-12-05 10:29 ` Valo, Kalle
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1480456828-13735-1-git-send-email-greearb@candelatech.com \ --to=greearb@candelatech.com \ --cc=ath10k@lists.infradead.org \ --cc=linux-wireless@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.