ath10k: restore QCA9880-AR1A (v1) detection
Subsystems (2)
PATCH 1/1 ath10k: restore QCA9880-AR1A (v1) detection
commit f8914a14623a79b73f72b2b1ee4cd9b2cb91b735 upstream
---
From f8914a14623a79b73f72b2b1ee4cd9b2cb91b735 Mon Sep 17 00:00:00 2001
From: Christian Lamparter <[email protected]>
Date: Mon, 25 Mar 2019 13:50:19 +0100
Subject: [PATCH for-4.19-stable] ath10k: restore QCA9880-AR1A (v1) detection
To: [email protected],
[email protected]
Cc: Kalle Valo <[email protected]>
This patch restores the old behavior that read
the chip_id on the QCA988x before resetting the
chip. This needs to be done in this order since
the unsupported QCA988x AR1A chips fall off the
bus when resetted. Otherwise the next MMIO Op
after the reset causes a BUS ERROR and panic.
--- drivers/net/wireless/ath/ath10k/pci.c | 36 +++++++++++++++++++-------- 1 file changed, 25 insertions(+), 11 deletions(-)
drivers/net/wireless/ath/ath10k/pci.c +21 -6
@@ -3483,7 +3483,7 @@ static int ath10k_pci_probe(struct pci_dstruct ath10k_pci *ar_pci;enum ath10k_hw_rev hw_rev;u32 chip_id; -bool pci_ps; +bool pci_ps, is_qca988x = false;int (*pci_soft_reset)(struct ath10k *ar);int (*pci_hard_reset)(struct ath10k *ar);u32 (*targ_cpu_to_ce_addr)(struct ath10k *ar,u32 addr);
@@ -3493,6 +3493,7 @@ static int ath10k_pci_probe(struct pci_dcase QCA988X_2_0_DEVICE_ID : hw_rev =ATH10K_HW_QCA988X ; pci_ps = false; + is_qca988x = true; pci_soft_reset = ath10k_pci_warm_reset; pci_hard_reset = ath10k_pci_qca988x_chip_reset; targ_cpu_to_ce_addr = ath10k_pci_qca988x_targ_cpu_to_ce_addr;
@@ -3612,6 +3613,19 @@ static int ath10k_pci_probe(struct pci_d goto err_deinit_irq; } +/* Read CHIP_ID before reset to catch QCA9880-AR1A v1 devices that +* fall off the bus during chip_reset. These chips have the same pci +* device id as the QCA9880 BR4A or 2R4E. So that's why the check. +*/ +if (is_qca988x) { + chip_id =ath10k_pci_soc_read32 (ar,SOC_CHIP_ID_ADDRESS ); +if (chip_id !=0xffffffff ) { +if (!ath10k_pci_chip_is_supported (pdev->device, + chip_id)) + goto err_unsupported; + } + } + ret =ath10k_pci_chip_reset (ar);if (ret) {ath10k_err (ar,"failed to reset chip: %d\n" , ret);
@@ -3624,11 +3638,8 @@ static int ath10k_pci_probe(struct pci_d goto err_free_irq; } -if (!ath10k_pci_chip_is_supported (pdev->device, chip_id)) { -ath10k_err (ar,"device %04x with chip_id %08x isn't supported\n" , - pdev->device, chip_id); - goto err_free_irq; - } +if (!ath10k_pci_chip_is_supported (pdev->device, chip_id)) + goto err_unsupported; ret =ath10k_core_register (ar, chip_id);if (ret) {
@@ -3638,6 +3649,10 @@ static int ath10k_pci_probe(struct pci_dreturn 0 ; +err_unsupported: +ath10k_err (ar,"device %04x with chip_id %08x isn't supported\n" , + pdev->device, bus_params.chip_id); + err_free_irq:ath10k_pci_free_irq (ar);ath10k_pci_rx_retry_sync (ar);
Quoted 17 lines · Christian Lamparter
commit
f8914a14623a79b73f72b2b1ee4cd9b2cb91b735upstream
---
Fromf8914a14623a79b73f72b2b1ee4cd9b2cb91b735Mon Sep 17 00:00:00 2001
From: Christian Lamparter <[email protected]>
Date: Mon, 25 Mar 2019 13:50:19 +0100
Subject: [PATCH for-4.19-stable] ath10k: restore QCA9880-AR1A (v1) detection
To: [email protected],
[email protected]
Cc: Kalle Valo <[email protected]>This patch restores the old behavior that read
thechip_idon the QCA988x before resetting the
chip. This needs to be done in this order since
the unsupported QCA988x AR1A chips fall off the
bus when resetted. Otherwise the next MMIO Op
after the reset causes a BUS ERROR and panic.
Quoted 3 lines
Cc [email protected] # 4.19Fixes 1a7fecb766c8 ("ath10k: reset chip before reading chip_id in probe")Signed-off-by Christian Lamparter <[email protected]>
Queued up for all branches, thanks!
Signature · 2 lines
Thanks, Sasha
Quoted 18 lines · Sasha Levin
Quoted 17 lines · Christian Lamparter
commit
f8914a14623a79b73f72b2b1ee4cd9b2cb91b735upstream
---Quoted 1 line
From
f8914a14623a79b73f72b2b1ee4cd9b2cb91b735Mon Sep 17 00:00:00 2001From: Christian Lamparter <[email protected]>
Date: Mon, 25 Mar 2019 13:50:19 +0100
Subject: [PATCH for-4.19-stable] ath10k: restore QCA9880-AR1A (v1) detection
To: [email protected],
[email protected]
Cc: Kalle Valo <[email protected]>This patch restores the old behavior that read
thechip_idon the QCA988x before resetting the
chip. This needs to be done in this order since
the unsupported QCA988x AR1A chips fall off the
bus when resetted. Otherwise the next MMIO Op
after the reset causes a BUS ERROR and panic.
Quoted 5 lines
Quoted 3 lines
Cc [email protected] # 4.19Fixes 1a7fecb766c8 ("ath10k: reset chip before reading chip_id in probe")Signed-off-by Christian Lamparter <[email protected]>Queued up for all branches, thanks!
This broke the 4.4 build :(
I'll drop it from there.
thanks,
greg k-h
Quoted 19 lines · Greg KH
Quoted 18 lines · Sasha Levin
Quoted 17 lines · Christian Lamparter
commit
f8914a14623a79b73f72b2b1ee4cd9b2cb91b735upstream
---Quoted 1 line
From
f8914a14623a79b73f72b2b1ee4cd9b2cb91b735Mon Sep 17 00:00:00 2001From: Christian Lamparter <[email protected]>
Date: Mon, 25 Mar 2019 13:50:19 +0100
Subject: [PATCH for-4.19-stable] ath10k: restore QCA9880-AR1A (v1) detection
To: [email protected],
[email protected]
Cc: Kalle Valo <[email protected]>This patch restores the old behavior that read
thechip_idon the QCA988x before resetting the
chip. This needs to be done in this order since
the unsupported QCA988x AR1A chips fall off the
bus when resetted. Otherwise the next MMIO Op
after the reset causes a BUS ERROR and panic.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Cc [email protected] # 4.19Fixes 1a7fecb766c8 ("ath10k: reset chip before reading chip_id in probe")Signed-off-by Christian Lamparter <[email protected]>Queued up for all branches, thanks!
This broke the 4.4 build :(
And it broke the 4.9 build :(
Quoted 24 lines · Greg KH
Quoted 23 lines · Greg KH
Quoted 22 lines · Sasha Levin
Quoted 20 lines · Christian Lamparter
commit
f8914a14623a79b73f72b2b1ee4cd9b2cb91b735upstream
---Quoted 1 line
From
f8914a14623a79b73f72b2b1ee4cd9b2cb91b735Mon Sep 17 00:00:00 2001From: Christian Lamparter <[email protected]>
Date: Mon, 25 Mar 2019 13:50:19 +0100
Subject: [PATCH for-4.19-stable] ath10k: restore QCA9880-AR1A (v1) detection
To: [email protected],
[email protected]
Cc: Kalle Valo <[email protected]>This patch restores the old behavior that read
thechip_idon the QCA988x before resetting the
chip. This needs to be done in this order since
the unsupported QCA988x AR1A chips fall off the
bus when resetted. Otherwise the next MMIO Op
after the reset causes a BUS ERROR and panic.Cc [email protected] # 4.19Fixes 1a7fecb766c8 ("ath10k: reset chip before reading chip_id in probe")Signed-off-by Christian Lamparter <[email protected]>
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Queued up for all branches, thanks!
This broke the 4.4 build :(
And it broke the 4.9 build :(
And 4.14.y :(
Quoted 25 lines · Greg KH
Quoted 24 lines · Greg KH
Quoted 23 lines · Greg KH
Quoted 22 lines · Sasha Levin
Quoted 20 lines · Christian Lamparter
commit
f8914a14623a79b73f72b2b1ee4cd9b2cb91b735upstream
---Quoted 1 line
From
f8914a14623a79b73f72b2b1ee4cd9b2cb91b735Mon Sep 17 00:00:00 2001From: Christian Lamparter <[email protected]>
Date: Mon, 25 Mar 2019 13:50:19 +0100
Subject: [PATCH for-4.19-stable] ath10k: restore QCA9880-AR1A (v1) detection
To: [email protected],
[email protected]
Cc: Kalle Valo <[email protected]>This patch restores the old behavior that read
thechip_idon the QCA988x before resetting the
chip. This needs to be done in this order since
the unsupported QCA988x AR1A chips fall off the
bus when resetted. Otherwise the next MMIO Op
after the reset causes a BUS ERROR and panic.Cc [email protected] # 4.19Fixes 1a7fecb766c8 ("ath10k: reset chip before reading chip_id in probe")Signed-off-by Christian Lamparter <[email protected]>
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Queued up for all branches, thanks!
This broke the 4.4 build :(
And it broke the 4.9 build :(
And 4.14.y :(
And it broke the 4.19.y build! Ugh, Christian, did you test build this?
confused,
greg k-h