From: Ben Greear <greearb@candelatech.com>
To: Adrian Chadd <adrian@freebsd.org>,
"Manoharan, Rajkumar" <rmanohar@qti.qualcomm.com>
Cc: Rajkumar Manoharan <rmanohar@codeaurora.org>,
"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>,
"Valo, Kalle" <kvalo@qca.qualcomm.com>,
Sebastian Gottschall <s.gottschall@dd-wrt.com>,
"michal.kazior@tieto.com" <michal.kazior@tieto.com>,
"nbd@nbd.name" <nbd@nbd.name>
Subject: Re: [PATCH] ath10k: fix system hang at qca99x0 probe on x86 platform
Date: Tue, 19 Jul 2016 09:53:14 -0700 [thread overview]
Message-ID: <578E5AFA.4000908@candelatech.com> (raw)
In-Reply-To: <CAJ-Vmon1duBNcWhjaNdANYFfd3hwQUYYHrmx7LRZvT-Ec2x1Cg@mail.gmail.com>
On 07/19/2016 09:13 AM, Adrian Chadd wrote:
> On 19 July 2016 at 08:25, Manoharan, Rajkumar <rmanohar@qti.qualcomm.com> wrote:
>> On June 30, 2016 12:39 PM, Michal Kazior <michal.kazior@tieto.com> wrote:
>>> On 29 June 2016 at 18:35, Manoharan, Rajkumar <rmanohar@qti.qualcomm.com> wrote:
>>>>>> Am 29.06.2016 um 16:04 schrieb Sebastian Gottschall:
>>>>>> this fix will crash QCA9980 on QCA IPQ8064 cpu based systems.
>>>>>> so please rework it, or leave it out.
>>>>>> note:
>>>>>> maybe the limit of 256kb is too low for that card
>>>>>>
>>>>> by the way. 512 works
>>>
>>> I think this suggests the problem isn't about memory chunk size limit
>>> per se but some kind of bug in address/offset logic in fw or hw.
>>>
>>> DMA coherent and single-map addresses use completely different ranges
>>> in many cases. Perhaps some MSBs are not properly handled in fw or hw.
>>> I recall there is a magic macro through which target device accesses
>>> host memory so maybe that's a good place to look to better understand
>>> the problem?
>>>
>> Michał,
>>
>> Could you please shed some light on this issue? It seems this issue is popping up
>> more frequently and there are multiple threads for this issue.
>>
>> "Anyone brought up 9984 NIC on x86-64?"
>> "AR9882 IOMMU faults"
>>
>>> I recall Ben mentioned he worked around the problem by enabling
>>> IOMMU/VT-d on his system. This could either prevent the device from
>>> doing bad things or maybe changed DMA address ranges that are handed
>>> out to the driver effectively or changed PCI controller behavior in
>>> some way.
>>>
>>>> Thanks a lot Sebastian. Let me confirm the same on x86 and will update the change.
>>>
>>> Just changing the memory chunk size limit blindly is bad and
>>> Sebastian's crash has proven it. 512 may seem to work now but it may
>>> fail with a other 10.4 firmware revisions or make x86 hang in other
>>> cases.
>>>
>> Even with current logic, If the memory chunk allocation fails for bigger size, then it tries
>> to allocate smaller chunks. So If smaller chunks causes unexpected behaviour, it is even
>> applicable to existing logic. no?
>
> Try allocating WMI memory with GFP_DMA32. The way it currently is
> working in linux is that caling dma map ends up allocating iommu slots
> to map that 64 bit memory back into 32 bit space, /or/ it will end up
> allocating bounce buffers.
>
> The WMI memory alloc routine is being used for the swap space too,
> which ends up with 700kbyte or more allocated twice - once for the
> initial alloc, and another for the dma map call.
>
> You should try GFP_DMA32 and see if that fixes it. You need contig, <
> 32 bit physical memory allocated, and bounce buffers are really
> supposed to be ephemeral.
I briefly tested with the GFP_DMA32 and it worked on my 9984 test rig.
I also found firmware bugs in my 10.4.3 (3.3-25) based firmware when smaller
chunk sizes are used. Possibly this is fixed in QCA firmware images, but likely
if you select more active peers than will fit in one 256k chunk your firmware
will crash. I tested with 72 active peers. I have fixed this bug in my 9984 firmware
as far as I can tell, but I have not run stress tests on it yet.
Thanks,
Ben
>
>
>
> -adrian
>
> _______________________________________________
> ath10k mailing list
> ath10k@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/ath10k
>
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
next prev parent reply other threads:[~2016-07-19 16:59 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 6:17 [PATCH] ath10k: fix system hang at qca99x0 probe on x86 platform Rajkumar Manoharan
2016-06-29 13:55 ` Sebastian Gottschall
2016-06-29 14:04 ` Sebastian Gottschall
2016-06-29 14:10 ` Sebastian Gottschall
2016-06-29 16:35 ` Manoharan, Rajkumar
2016-06-29 16:58 ` Sebastian Gottschall
2016-06-30 7:09 ` Michal Kazior
2016-07-19 15:25 ` Manoharan, Rajkumar
2016-07-19 16:13 ` Adrian Chadd
2016-07-19 16:53 ` Ben Greear [this message]
2016-07-19 17:00 ` Adrian Chadd
2016-07-20 5:38 ` Michal Kazior
2016-07-20 5:44 ` Adrian Chadd
2016-07-20 6:05 ` Michal Kazior
2016-07-20 6:11 ` Adrian Chadd
2016-07-20 6:27 ` Michal Kazior
2016-07-20 8:49 ` Sebastian Gottschall
2016-07-20 8:51 ` rx rate issue Sebastian Gottschall
2016-07-20 10:23 ` Michal Kazior
2016-07-20 10:50 ` Sebastian Gottschall
2016-07-20 11:03 ` Michal Kazior
2016-07-20 11:10 ` Sebastian Gottschall
2016-07-20 11:32 ` Michal Kazior
2016-07-20 11:12 ` Sebastian Gottschall
2016-07-20 16:42 ` Ben Greear
2016-07-20 16:50 ` Sebastian Gottschall
2016-07-25 14:37 ` 9984 issues Sebastian Gottschall
2016-07-25 14:43 ` Ben Greear
2016-07-25 15:09 ` Sebastian Gottschall
2016-07-25 16:03 ` Adrian Chadd
2016-07-25 16:31 ` Sebastian Gottschall
2016-07-25 17:22 ` Adrian Chadd
2016-07-26 1:11 ` Sebastian Gottschall
2016-07-26 2:26 ` Ben Greear
2016-07-26 2:40 ` Sebastian Gottschall
2016-07-26 9:31 ` 9984 issues solution Sebastian Gottschall
2016-07-26 10:27 ` Michal Kazior
[not found] ` <d5410503-fd51-5076-82 ,36-c296346f5d7f@dd-wrt.com>
[not found] ` <BAY176-W27264163A549F6C69777EFB60D0@phx.gbl>
2016-07-26 3:06 ` Not able to capture qos data packets - QCA988x sudheer thota
2016-07-26 6:21 ` Michal Kazior
2016-07-26 11:53 ` sudheer thota
[not found] ` <BAY176-W426C633D2FC24792734487B90F0@phx.gbl>
2016-07-27 6:51 ` RIFS packets missing on ath10k monitor sudheer thota
2016-07-20 17:02 ` [PATCH] ath10k: fix system hang at qca99x0 probe on x86 platform Adrian Chadd
2016-09-26 16:53 ` [PATCH] ath10k: fix system hang at qca99x0 probe on x86 platform (DMA32 issue) Ben Greear
2016-07-20 16:48 ` [PATCH] ath10k: fix system hang at qca99x0 probe on x86 platform Ben Greear
2016-07-20 5:36 ` Michal Kazior
2016-07-20 16:52 ` Ben Greear
2016-07-22 22:43 ` Ben Greear
2016-07-23 9:11 ` Sebastian Gottschall
2016-07-23 9:45 ` Manoharan, Rajkumar
2016-07-23 21:55 ` Ben Greear
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=578E5AFA.4000908@candelatech.com \
--to=greearb@candelatech.com \
--cc=adrian@freebsd.org \
--cc=ath10k@lists.infradead.org \
--cc=kvalo@qca.qualcomm.com \
--cc=michal.kazior@tieto.com \
--cc=nbd@nbd.name \
--cc=rmanohar@codeaurora.org \
--cc=rmanohar@qti.qualcomm.com \
--cc=s.gottschall@dd-wrt.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).