qcacmn: dump reo ring when flush cache failed

When delete peer, host will try to flush all frames in REO queue
by sending a cmd through reo ring, but sometimes encounted failure to
send this cmd, dump ring status if ecountered above failure.

Change-Id: I3ea4e96e5999f85398b531ddf4f350e91e798d70
CRs-Fixed: 2167419
这个提交包含在:
Kai Liu
2018-01-12 16:52:26 +08:00
提交者 snandini
父节点 987316d757
当前提交 b8e1241366
修改 3 个文件,包含 31 行新增1 行删除

查看文件

@@ -195,6 +195,12 @@ extern uint32_t hal_srng_get_entrysize(void *hal_soc, int ring_type);
*/ */
uint32_t hal_srng_max_entries(void *hal_soc, int ring_type); uint32_t hal_srng_max_entries(void *hal_soc, int ring_type);
/**
* hal_srng_dump - Dump ring status
* @srng: hal srng pointer
*/
void hal_srng_dump(struct hal_srng *srng);
/** /**
* hal_srng_get_dir - Returns the direction of the ring * hal_srng_get_dir - Returns the direction of the ring
* @hal_soc: Opaque HAL SOC handle * @hal_soc: Opaque HAL SOC handle

查看文件

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -192,6 +192,7 @@ inline int hal_reo_cmd_flush_cache(void *reo_ring, struct hal_soc *soc,
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_DEBUG, QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_DEBUG,
"%s: Out of cmd ring entries\n", __func__); "%s: Out of cmd ring entries\n", __func__);
hal_srng_access_end(soc, reo_ring); hal_srng_access_end(soc, reo_ring);
hal_srng_dump(reo_ring);
return -EBUSY; return -EBUSY;
} }

查看文件

@@ -1330,6 +1330,29 @@ enum hal_srng_dir hal_srng_get_dir(void *hal_soc, int ring_type)
return ring_config->ring_dir; return ring_config->ring_dir;
} }
/**
* hal_srng_dump - Dump ring status
* @srng: hal srng pointer
*/
void hal_srng_dump(struct hal_srng *srng)
{
if (srng->ring_dir == HAL_SRNG_SRC_RING) {
qdf_print("=== SRC RING %d ===", srng->ring_id);
qdf_print("hp %u, reap_hp %u, tp %u, cached tp %u",
srng->u.src_ring.hp,
srng->u.src_ring.reap_hp,
*srng->u.src_ring.tp_addr,
srng->u.src_ring.cached_tp);
} else {
qdf_print("=== DST RING %d ===", srng->ring_id);
qdf_print("tp %u, hp %u, cached tp %u, loop_cnt %u",
srng->u.dst_ring.tp,
*srng->u.dst_ring.hp_addr,
srng->u.dst_ring.cached_hp,
srng->u.dst_ring.loop_cnt);
}
}
/** /**
* hal_get_srng_params - Retreive SRNG parameters for a given ring from HAL * hal_get_srng_params - Retreive SRNG parameters for a given ring from HAL
* *