Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5329bdda authored by Arun Kumar Khandavalli's avatar Arun Kumar Khandavalli
Browse files

qcacmn: get the data during the issue with the bus

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.

Change-Id: I7387d63d9205d24fd881824b9a9fac48a7816c73
CRs-Fixed: 2833331
parent 60cb1248
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -384,9 +384,10 @@ void hif_dummy_config_irq_affinity(struct hif_softc *scn)
 * @data: hang event data buffer
 * @offset: offset at which data needs to be written
 *
 * Return: None
 * Return: bool
 */
void hif_dummy_log_bus_info(struct hif_softc *scn, uint8_t *data,
bool hif_dummy_log_bus_info(struct hif_softc *scn, uint8_t *data,
			    unsigned int *offset)
{
	return false;
}
+1 −1
Original line number Diff line number Diff line
@@ -60,5 +60,5 @@ int hif_dummy_bus_reset_resume(struct hif_softc *hif_ctx);
int hif_dummy_map_ce_to_irq(struct hif_softc *scn, int ce_id);
int hif_dummy_addr_in_boundary(struct hif_softc *scn, uint32_t offset);
void hif_dummy_config_irq_affinity(struct hif_softc *scn);
void hif_dummy_log_bus_info(struct hif_softc *scn, uint8_t *data,
bool hif_dummy_log_bus_info(struct hif_softc *scn, uint8_t *data,
			    unsigned int *offset);
+4 −2
Original line number Diff line number Diff line
@@ -534,10 +534,12 @@ void hif_config_irq_affinity(struct hif_softc *hif_sc)
}

#ifdef HIF_BUS_LOG_INFO
void hif_log_bus_info(struct hif_softc *hif_sc, uint8_t *data,
bool hif_log_bus_info(struct hif_softc *hif_sc, uint8_t *data,
		      unsigned int *offset)
{
	if (hif_sc->bus_ops.hif_log_bus_info)
		hif_sc->bus_ops.hif_log_bus_info(hif_sc, data, offset);
		return hif_sc->bus_ops.hif_log_bus_info(hif_sc, data, offset);

	return false;
}
#endif
+5 −4
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ struct hif_bus_ops {
	int (*hif_addr_in_boundary)(struct hif_softc *scn, uint32_t offset);
	bool (*hif_needs_bmi)(struct hif_softc *hif_sc);
	void (*hif_config_irq_affinity)(struct hif_softc *hif_sc);
	void (*hif_log_bus_info)(struct hif_softc *scn, uint8_t *data,
	bool (*hif_log_bus_info)(struct hif_softc *scn, uint8_t *data,
				 unsigned int *offset);
};

@@ -251,15 +251,16 @@ void hif_config_irq_affinity(struct hif_softc *hif_sc);
 * @data: hang event data buffer
 * @offset: offset at which data needs to be written
 *
 * Return:  None
 * Return: true if bus_id is invalid else false
 */
void hif_log_bus_info(struct hif_softc *scn, uint8_t *data,
bool hif_log_bus_info(struct hif_softc *scn, uint8_t *data,
		      unsigned int *offset);
#else
static inline
void hif_log_bus_info(struct hif_softc *scn, uint8_t *data,
bool hif_log_bus_info(struct hif_softc *scn, uint8_t *data,
		      unsigned int *offset)
{
	return false;
}
#endif
#endif /* _MULTIBUS_H_ */
+6 −2
Original line number Diff line number Diff line
@@ -546,6 +546,7 @@ int hif_recovery_notifier_cb(struct notifier_block *block, unsigned long state,
	struct qdf_notifer_data *notif_data = data;
	qdf_notif_block *notif_block;
	struct hif_softc *hif_handle;
	bool bus_id_invalid;

	if (!data || !block)
		return -EINVAL;
@@ -556,8 +557,11 @@ int hif_recovery_notifier_cb(struct notifier_block *block, unsigned long state,
	if (!hif_handle)
		return -EINVAL;

	hif_log_bus_info(hif_handle, notif_data->hang_data,
	bus_id_invalid = hif_log_bus_info(hif_handle, notif_data->hang_data,
					  &notif_data->offset);
	if (bus_id_invalid)
		return NOTIFY_STOP_MASK;

	hif_log_ce_info(hif_handle, notif_data->hang_data,
			&notif_data->offset);

Loading