[OpenWrt-Devel] [PATCH 3/3] mac80211: ath10k: reset chip after supported check
Ben Greear
greearb at candelatech.com
Mon Apr 1 16:46:12 EDT 2019
On 4/1/19 1:32 PM, Tomislav Požega wrote:
> When chip reset is done before the chip is checked if supported
> there will be crash. Previous behaviour caused bootloops on
> Archer C7 v1 units, this patch allows clean device boot without
> excluding ath10k driver.
Did you try the patch that Michal posted that checks the chip version
ID and so might be a good and safe fix for all chips?
If you want to put in a hack like this for a particular platform, maybe
make it specific to that one platform so you don't risk instability on
a wide range of systems?
Thanks,
Ben
>
> Signed-off-by: Tomislav Požega <pozega.tomislav at gmail.com>
> ---
> ...0-ath10k-reset-chip-after-supported-check.patch | 39 ++++++++++++++++++++
> 1 files changed, 39 insertions(+), 0 deletions(-)
> create mode 100644 package/kernel/mac80211/patches/ath/980-ath10k-reset-chip-after-supported-check.patch
>
> diff --git a/package/kernel/mac80211/patches/ath/980-ath10k-reset-chip-after-supported-check.patch b/package/kernel/mac80211/patches/ath/980-ath10k-reset-chip-after-supported-check.patch
> new file mode 100644
> index 0000000..81ca5e1
> --- /dev/null
> +++ b/package/kernel/mac80211/patches/ath/980-ath10k-reset-chip-after-supported-check.patch
> @@ -0,0 +1,39 @@
> +From: Tomislav Požega <pozega.tomislav at gmail.com>
> +Date: Fri, 22 Mar 2019 19:06:25 +0100
> +Subject: [PATCH] ath10k: reset chip after supported check
> +
> +When chip reset is done before the chip is checked if supported
> +there will be crash. Previous behaviour caused bootloops on
> +Archer C7 v1 units, this patch allows clean device boot without
> +excluding ath10k driver.
> +
> +Signed-off-by: Tomislav Požega <pozega.tomislav at gmail.com>
> +
> +--- a/drivers/net/wireless/ath/ath10k/pci.c
> ++++ b/drivers/net/wireless/ath/ath10k/pci.c
> +@@ -3612,12 +3612,6 @@ static int ath10k_pci_probe(struct pci_d
> + goto err_deinit_irq;
> + }
> +
> +- ret = ath10k_pci_chip_reset(ar);
> +- if (ret) {
> +- ath10k_err(ar, "failed to reset chip: %d\n", ret);
> +- goto err_free_irq;
> +- }
> +-
> + chip_id = ath10k_pci_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
> + if (chip_id == 0xffffffff) {
> + ath10k_err(ar, "failed to get chip id\n");
> +@@ -3630,6 +3624,12 @@ static int ath10k_pci_probe(struct pci_d
> + goto err_free_irq;
> + }
> +
> ++ ret = ath10k_pci_chip_reset(ar);
> ++ if (ret) {
> ++ ath10k_err(ar, "failed to reset chip: %d\n", ret);
> ++ goto err_free_irq;
> ++ }
> ++
> + ret = ath10k_core_register(ar, chip_id);
> + if (ret) {
> + ath10k_err(ar, "failed to register driver core: %d\n", ret);
>
--
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc http://www.candelatech.com
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list