]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath10k: differentiate between target init failures
authorMichal Kazior <michal.kazior@tieto.com>
Wed, 23 Apr 2014 16:30:03 +0000 (19:30 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 24 Apr 2014 06:18:38 +0000 (09:18 +0300)
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>
drivers/net/wireless/ath/ath10k/pci.c

index bf1083d52e61d5f4c29bc6e649f357bf74c7ad51..cd3b00cbc920e2b21a9257158a29a6772db2c676 100644 (file)
@@ -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;