diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2014-04-23 20:30:04 +0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2014-04-24 10:20:50 +0400 |
commit | 7710cd2e240f507ec70897258b945c30e2ccb83a (patch) | |
tree | 0c6da342130a123f27ee8336b05e2b0b21d0b8d1 /drivers/net/wireless/ath/ath10k/pci.c | |
parent | 6a4f6e1d295f4aa2e26056a859b76ccc769e75a5 (diff) | |
download | linux-7710cd2e240f507ec70897258b945c30e2ccb83a.tar.xz |
ath10k: don't wait for device init if it crashed
When warm resetting it's possible for device to
crash during initialization. Instead of waiting 3
seconds just return failure as soon as
FW_IND_EVENT_PENDING is set.
This speeds up device bootup and recovery in some
cases.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/pci.c')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/pci.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index cd3b00cbc920..66b1f3017f2b 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -2452,6 +2452,10 @@ static int ath10k_pci_wait_for_target_init(struct ath10k *ar) if (val == 0xffffffff) continue; + /* the device has crashed so don't bother trying anymore */ + if (val & FW_IND_EVENT_PENDING) + break; + if (val & FW_IND_INITIALIZED) break; @@ -2470,6 +2474,12 @@ static int ath10k_pci_wait_for_target_init(struct ath10k *ar) goto out; } + if (val & FW_IND_EVENT_PENDING) { + ath10k_warn("device has crashed during init\n"); + ret = -ECOMM; + goto out; + } + if (!(val & FW_IND_INITIALIZED)) { ath10k_err("failed to receive initialized event from target: %08x\n", val); |