From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: "ath10k@lists.infradead.org" <ath10k@lists.infradead.org>
Subject: Re: [RFC PATCH 1/3] ath10k: ignore diagnose pipes in ath10k_pci_ce_recv_data()/_send_done()
Date: Fri, 12 Sep 2014 11:01:12 +0300 [thread overview]
Message-ID: <8761gt1d4n.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <CA+BoTQ=9kUFXpTKwE1i8TjEPFeszih+U9FDpWRdaYguf7Xa-Gw@mail.gmail.com> (Michal Kazior's message of "Fri, 12 Sep 2014 09:53:08 +0200")
Michal Kazior <michal.kazior@tieto.com> writes:
> On 11 September 2014 22:31, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
>> As ath10k_pci_diag_read_mem() uses polling to receive data from CE, the CE callbacks
>> have to ignore the pipe used for diagnose reads. Otherwise ath10k crashes due
>> to NULL dereference and polling reads timeout.
>>
>> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
>> ---
>> drivers/net/wireless/ath/ath10k/pci.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
>> index baeb98e78b1f..154451ab3e3c 100644
>> --- a/drivers/net/wireless/ath/ath10k/pci.c
>> +++ b/drivers/net/wireless/ath/ath10k/pci.c
>> @@ -819,6 +819,9 @@ static void ath10k_pci_ce_send_done(struct ath10k_ce_pipe *ce_state)
>> unsigned int nbytes;
>> unsigned int transfer_id;
>>
>> + if (ce_state->id == 7)
>> + return;
>
> I think you can check it in a saner way: (ce_state == ar_pci->ce_diag).
>
> Another approach is to prevent this from happening in the first place
> by never unmasking the diagnostic window copy engine pipe in
> ath10k_ce_enable_interrupts() and preventing
> ath10k_ce_per_engine_service() from being called in
> ath10k_pci_hif_send_complete_check() for the diagnostic ce pipe.
I like the latter approach and I'll try to implement that first. Thanks!
--
Kalle Valo
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
next prev parent reply other threads:[~2014-09-12 8:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-11 20:31 [RFC PATCH 0/3] ath10k: export calibration data to user space Kalle Valo
2014-09-11 20:31 ` [RFC PATCH 1/3] ath10k: ignore diagnose pipes in ath10k_pci_ce_recv_data()/_send_done() Kalle Valo
2014-09-12 7:53 ` Michal Kazior
2014-09-12 8:01 ` Kalle Valo [this message]
2014-09-11 20:31 ` [RFC PATCH 2/3] ath10k: add diag_read() to hif ops Kalle Valo
2014-09-12 9:57 ` Michal Kazior
2014-09-12 10:03 ` Kalle Valo
2014-09-11 20:31 ` [RFC PATCH 3/3] ath10k: add cal_data debugfs file Kalle Valo
2014-09-11 20:53 ` Kalle Valo
2014-09-11 22:45 ` Ben Greear
2014-09-12 11:25 ` Kalle Valo
2014-09-12 10:11 ` Michal Kazior
2014-09-12 10:50 ` Kalle Valo
2014-09-12 16:17 ` 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=8761gt1d4n.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--cc=michal.kazior@tieto.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