From patchwork Fri Jul 8 13:57:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 9221009 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9353360467 for ; Fri, 8 Jul 2016 13:58:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84717287F9 for ; Fri, 8 Jul 2016 13:58:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 786E4287FB; Fri, 8 Jul 2016 13:58:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 091EB287F9 for ; Fri, 8 Jul 2016 13:58:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bLWIc-0006Ep-Da; Fri, 08 Jul 2016 13:58:34 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bLWIa-0006E1-Gb for ath10k@bombadil.infradead.org; Fri, 08 Jul 2016 13:58:32 +0000 Received: from mail2.candelatech.com ([208.74.158.173]) by merlin.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bLWIY-0004DN-S5 for ath10k@lists.infradead.org; Fri, 08 Jul 2016 13:58:31 +0000 Received: from [50.34.199.106] (unknown [50.34.199.106]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail2.candelatech.com (Postfix) with ESMTPSA id A81C840A339; Fri, 8 Jul 2016 06:57:47 -0700 (PDT) Message-ID: <577FB15B.3050907@candelatech.com> Date: Fri, 08 Jul 2016 06:57:47 -0700 From: Ben Greear User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: "Manoharan, Rajkumar" , Ben Skeggs , "ath10k@lists.infradead.org" Subject: Re: AR9882 IOMMU faults References: <4b0fdabc-ff87-c182-7db6-68bf32755407@redhat.com> <1467983388208.13042@qti.qualcomm.com> In-Reply-To: <1467983388208.13042@qti.qualcomm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160708_095830_965104_396EEF15 X-CRM114-Status: GOOD ( 23.15 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On 07/08/2016 06:09 AM, Manoharan, Rajkumar wrote: > Logs are so limited. If possible, revert below commit and give a try > > "ath10k: do not use coherent memory for allocated device memory chunks" > > If revert is not so clean, try with this patch. > > https://patchwork.kernel.org/patch/9175029/ I use this patch, I don't think it is upstream, and per comment, I have not tested this on other than x86 platform: [greearb@ben-dt ath10k]$ git show 0e6e6f6b2 commit 0e6e6f6b2fac0ade990de56eef3841dbe7128f35 Author: Ben Greear Date: Thu Jan 21 18:57:11 2016 -0800 ath10k: wmi-alloc-chunk should use DMA_BIDIRECTIONAL. 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 Should be tested and verified by someone who uses other platforms though... Signed-off-by: Ben Greear [greearb@ben-dt ath10k]$ > > -Rajkumar > ________________________________________ > From: ath10k on behalf of Ben Skeggs > Sent: Friday, July 8, 2016 10:59 AM > To: ath10k@lists.infradead.org > Subject: AR9882 IOMMU faults > > Hey, > > I've just installed a COMPEX WLE600VX (AR9882) in my router machine, > operating in AP mode. > > While it appears to be working well enough, I get massive floods of > IOMMU faults reported in my kernel log. These appear to increase with > the load on the network. > > I've attached both the info that ath10k reports when it detects the > device, and a sample of one of the DMAR messages (worth nothing that > it's the same fault address in all the messages). > > Is this a known issue, and anything I can do to help get it resolved? > > Thanks, > Ben. > > _______________________________________________ > ath10k mailing list > ath10k@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/ath10k > diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index af37a77..502f0e0 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -4404,7 +4404,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;