|
@@ -59,6 +59,7 @@
|
|
|
#include "ahb_api.h"
|
|
|
#include "wlan_cfg.h"
|
|
|
#include "qdf_hang_event_notifier.h"
|
|
|
+#include "qdf_platform.h"
|
|
|
|
|
|
/* Maximum ms timeout for host to wake up target */
|
|
|
#define PCIE_WAKE_TIMEOUT 1000
|
|
@@ -2352,7 +2353,7 @@ static inline int __hif_check_link_status(struct hif_softc *scn)
|
|
|
|
|
|
|
|
|
#ifdef HIF_BUS_LOG_INFO
|
|
|
-void hif_log_pcie_info(struct hif_softc *scn, uint8_t *data,
|
|
|
+bool hif_log_pcie_info(struct hif_softc *scn, uint8_t *data,
|
|
|
unsigned int *offset)
|
|
|
{
|
|
|
struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(scn);
|
|
@@ -2361,7 +2362,7 @@ void hif_log_pcie_info(struct hif_softc *scn, uint8_t *data,
|
|
|
|
|
|
if (!sc) {
|
|
|
hif_err("HIF Bus Context is Invalid");
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
pfrm_read_config_word(sc->pdev, PCI_DEVICE_ID, &info.dev_id);
|
|
@@ -2371,10 +2372,18 @@ void hif_log_pcie_info(struct hif_softc *scn, uint8_t *data,
|
|
|
size - QDF_HANG_EVENT_TLV_HDR_SIZE);
|
|
|
|
|
|
if (*offset + size > QDF_WLAN_HANG_FW_OFFSET)
|
|
|
- return;
|
|
|
+ return false;
|
|
|
|
|
|
qdf_mem_copy(data + *offset, &info, size);
|
|
|
*offset = *offset + size;
|
|
|
+
|
|
|
+ if (info.dev_id == sc->devid)
|
|
|
+ return false;
|
|
|
+
|
|
|
+ qdf_recovery_reason_update(QCA_HANG_BUS_FAILURE);
|
|
|
+ qdf_get_bus_reg_dump(scn->qdf_dev->dev, data,
|
|
|
+ (QDF_WLAN_HANG_FW_OFFSET - size));
|
|
|
+ return true;
|
|
|
}
|
|
|
#endif
|
|
|
|