Ver Fonte

qcacld-3.0: register callbacks for bus failure register dump

Whenever there is a recovery triggered, if there is a
failure in reading the bus id collect the bus specific
registers to understand the reason for the failures.
Register the callbacks for updating the reason code and register
dump.

Change-Id: I4eb5327a806691737f605d3d3c83d2c28d1fe935
CRs-Fixed: 2835341
Arun Kumar Khandavalli há 4 anos atrás
pai
commit
c9364b98d6
2 ficheiros alterados com 23 adições e 0 exclusões
  1. 20 0
      core/cds/src/cds_api.c
  2. 3 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 20 - 0
core/cds/src/cds_api.c

@@ -223,6 +223,22 @@ static QDF_STATUS cds_wmi_send_recv_qmi(void *buf, uint32_t len, void * cb_ctx,
 	return QDF_STATUS_SUCCESS;
 }
 
+/**
+ * cds_update_recovery_reason() - update the recovery reason code
+ * @reason: recovery reason
+ *
+ * Return: None
+ */
+static void cds_update_recovery_reason(enum qdf_hang_reason recovery_reason)
+{
+	if (!gp_cds_context) {
+		cds_err("gp_cds_context is null");
+		return;
+	}
+
+	gp_cds_context->recovery_reason = recovery_reason;
+}
+
 QDF_STATUS cds_init(void)
 {
 	QDF_STATUS status;
@@ -246,6 +262,8 @@ QDF_STATUS cds_init(void)
 	qdf_register_drv_connected_callback(cds_is_drv_connected);
 	qdf_register_drv_supported_callback(cds_is_drv_supported);
 	qdf_register_wmi_send_recv_qmi_callback(cds_wmi_send_recv_qmi);
+	qdf_register_recovery_reason_update(cds_update_recovery_reason);
+	qdf_register_get_bus_reg_dump(pld_get_bus_reg_dump);
 
 	return QDF_STATUS_SUCCESS;
 
@@ -267,6 +285,8 @@ void cds_deinit(void)
 	if (!gp_cds_context)
 		return;
 
+	qdf_register_get_bus_reg_dump(NULL);
+	qdf_register_recovery_reason_update(NULL);
 	qdf_register_recovering_state_query_callback(NULL);
 	qdf_register_fw_down_callback(NULL);
 	qdf_register_is_driver_unloading_callback(NULL);

+ 3 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -1125,6 +1125,9 @@ hdd_convert_hang_reason(enum qdf_hang_reason reason)
 	case QDF_SUSPEND_NO_CREDIT:
 		ret_val = QCA_WLAN_HANG_SUSPEND_NO_CREDIT;
 		break;
+	case QCA_HANG_BUS_FAILURE:
+		ret_val = QCA_WLAN_HANG_BUS_FAILURE;
+		break;
 	case QDF_REASON_UNSPECIFIED:
 	default:
 		ret_val = QCA_WLAN_HANG_REASON_UNSPECIFIED;