summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Kazior2014-04-23 18:30:03 +0200
committerKalle Valo2014-04-24 08:18:38 +0200
commit6a4f6e1d295f4aa2e26056a859b76ccc769e75a5 (patch)
tree7dcf6f468c999b43a6478a835b3a99e962cd8a8d
parentb43: remove list of IEEE 802.11 devices (diff)
downloadkernel-qcow2-linux-6a4f6e1d295f4aa2e26056a859b76ccc769e75a5.tar.gz
kernel-qcow2-linux-6a4f6e1d295f4aa2e26056a859b76ccc769e75a5.tar.xz
kernel-qcow2-linux-6a4f6e1d295f4aa2e26056a859b76ccc769e75a5.zip
ath10k: differentiate between target init failures
This just makes it easier to tell apart different kinds of bringup failure. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath10k/pci.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index bf1083d52e61..cd3b00cbc920 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2464,7 +2464,13 @@ static int ath10k_pci_wait_for_target_init(struct ath10k *ar)
mdelay(10);
} while (time_before(jiffies, timeout));
- if (val == 0xffffffff || !(val & FW_IND_INITIALIZED)) {
+ if (val == 0xffffffff) {
+ ath10k_err("failed to read device register, device is gone\n");
+ ret = -EIO;
+ goto out;
+ }
+
+ if (!(val & FW_IND_INITIALIZED)) {
ath10k_err("failed to receive initialized event from target: %08x\n",
val);
ret = -ETIMEDOUT;