ath10k: enable early device dumps
authorMichal Kazior <michal.kazior@tieto.com>
Wed, 14 May 2014 13:56:16 +0000 (16:56 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 16 May 2014 13:49:36 +0000 (16:49 +0300)
This can be useful for early initialization
debugging, i.e. ROM crashes.

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 21a32ad4c09cbe97af1e8de2c7cd628570042028..33e87557a7dd7ed010578efed440d03d20ca84c2 100644 (file)
@@ -2241,10 +2241,7 @@ static void ath10k_pci_early_irq_tasklet(unsigned long data)
        if (fw_ind & FW_IND_EVENT_PENDING) {
                ath10k_pci_write32(ar, FW_INDICATOR_ADDRESS,
                                   fw_ind & ~FW_IND_EVENT_PENDING);
-
-               /* Some structures are unavailable during early boot or at
-                * driver teardown so just print that the device has crashed. */
-               ath10k_warn("device crashed - no diagnostics available\n");
+               ath10k_pci_hif_dump_area(ar);
        }
 
        ath10k_pci_sleep(ar);
@@ -2521,6 +2518,9 @@ static int ath10k_pci_wait_for_target_init(struct ath10k *ar)
 
        if (val & FW_IND_EVENT_PENDING) {
                ath10k_warn("device has crashed during init\n");
+               ath10k_pci_write32(ar, FW_INDICATOR_ADDRESS,
+                                  val & ~FW_IND_EVENT_PENDING);
+               ath10k_pci_hif_dump_area(ar);
                ret = -ECOMM;
                goto out;
        }