From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: <ath10k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 1/2] ath10k: improve warm reset reliability
Date: Thu, 15 May 2014 13:48:16 +0300 [thread overview]
Message-ID: <87r43v9v2n.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1400050658-2763-2-git-send-email-michal.kazior@tieto.com> (Michal Kazior's message of "Wed, 14 May 2014 08:57:37 +0200")
Michal Kazior <michal.kazior@tieto.com> writes:
> Warm reset is now able to recover after device
> crashes which required a cold reset before.
>
> This should greatly reduce chances of getting data
> bus errors or host system freezes due to buggy
> cold reset on some chips.
>
> Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Awesome! This is very much needed. I just have a cosmetic comment:
> +/* this function effectively clears target memory controller assert line */
> +static void ath10k_pci_warm_reset_si0(struct ath10k *ar)
> +{
> + u32 val;
> +
> + val = ath10k_pci_read32(ar, RTC_SOC_BASE_ADDRESS +
> + SOC_RESET_CONTROL_ADDRESS);
> + ath10k_pci_write32(ar, RTC_SOC_BASE_ADDRESS + SOC_RESET_CONTROL_ADDRESS,
> + val | SOC_RESET_CONTROL_SI0_RST_MASK);
> + val = ath10k_pci_read32(ar, RTC_SOC_BASE_ADDRESS +
> + SOC_RESET_CONTROL_ADDRESS);
We do have the ath10k_pci_soc_ functions for accessing SOC registers, I
would prefer to use those here. I now modified your patch with the diff
below. Is that ok to you?
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -1807,20 +1807,18 @@ static void ath10k_pci_warm_reset_si0(struct ath10k *ar)
{
u32 val;
- val = ath10k_pci_read32(ar, RTC_SOC_BASE_ADDRESS +
- SOC_RESET_CONTROL_ADDRESS);
- ath10k_pci_write32(ar, RTC_SOC_BASE_ADDRESS + SOC_RESET_CONTROL_ADDRESS,
- val | SOC_RESET_CONTROL_SI0_RST_MASK);
- val = ath10k_pci_read32(ar, RTC_SOC_BASE_ADDRESS +
- SOC_RESET_CONTROL_ADDRESS);
+ val = ath10k_pci_soc_read32(ar, SOC_RESET_CONTROL_ADDRESS);
+ ath10k_pci_soc_write32(ar, SOC_RESET_CONTROL_ADDRESS,
+ val | SOC_RESET_CONTROL_SI0_RST_MASK);
+ val = ath10k_pci_soc_read32(ar, SOC_RESET_CONTROL_ADDRESS);
+
msleep(10);
- val = ath10k_pci_read32(ar, RTC_SOC_BASE_ADDRESS +
- SOC_RESET_CONTROL_ADDRESS);
- ath10k_pci_write32(ar, RTC_SOC_BASE_ADDRESS + SOC_RESET_CONTROL_ADDRESS,
- val & ~SOC_RESET_CONTROL_SI0_RST_MASK);
- val = ath10k_pci_read32(ar, RTC_SOC_BASE_ADDRESS +
- SOC_RESET_CONTROL_ADDRESS);
+ val = ath10k_pci_soc_read32(ar, SOC_RESET_CONTROL_ADDRESS);
+ ath10k_pci_soc_write32(ar, SOC_RESET_CONTROL_ADDRESS,
+ val & ~SOC_RESET_CONTROL_SI0_RST_MASK);
+ val = ath10k_pci_soc_read32(ar, SOC_RESET_CONTROL_ADDRESS);
+
msleep(10);
}
Full patch here:
https://github.com/kvalo/ath/commit/7b52054308a371d479a9e686e1d8411d19a90fd7
--
Kalle Valo
next prev parent reply other threads:[~2014-05-15 10:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-14 6:57 [PATCH 0/2] ath10k: warm reset fixes 2014-05-14 Michal Kazior
2014-05-14 6:57 ` [PATCH 1/2] ath10k: improve warm reset reliability Michal Kazior
2014-05-15 10:48 ` Kalle Valo [this message]
2014-05-15 12:42 ` Michal Kazior
2014-05-15 12:57 ` Kalle Valo
2014-05-14 6:57 ` [PATCH 2/2] ath10k: retry warm reset a few times Michal Kazior
2014-05-14 14:22 ` [PATCH 0/2] ath10k: warm reset fixes 2014-05-14 Kalle Valo
2014-05-14 14:25 ` Kalle Valo
2014-05-16 13:49 ` Kalle Valo
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=87r43v9v2n.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).