|
@@ -762,6 +762,8 @@ static void __cam_req_mgr_flush_req_slot(
|
|
|
|
|
|
/* Reset input queue slot */
|
|
/* Reset input queue slot */
|
|
slot->req_id = -1;
|
|
slot->req_id = -1;
|
|
|
|
+ slot->bubble_times = 0;
|
|
|
|
+ slot->internal_recovered = false;
|
|
slot->skip_idx = 1;
|
|
slot->skip_idx = 1;
|
|
slot->recover = 0;
|
|
slot->recover = 0;
|
|
slot->additional_timeout = 0;
|
|
slot->additional_timeout = 0;
|
|
@@ -825,6 +827,8 @@ static void __cam_req_mgr_reset_req_slot(struct cam_req_mgr_core_link *link,
|
|
|
|
|
|
/* Reset input queue slot */
|
|
/* Reset input queue slot */
|
|
slot->req_id = -1;
|
|
slot->req_id = -1;
|
|
|
|
+ slot->bubble_times = 0;
|
|
|
|
+ slot->internal_recovered = false;
|
|
slot->skip_idx = 0;
|
|
slot->skip_idx = 0;
|
|
slot->recover = 0;
|
|
slot->recover = 0;
|
|
slot->additional_timeout = 0;
|
|
slot->additional_timeout = 0;
|
|
@@ -3423,6 +3427,7 @@ int cam_req_mgr_process_error(void *priv, void *data)
|
|
/* Bring processing pointer to bubbled req id */
|
|
/* Bring processing pointer to bubbled req id */
|
|
__cam_req_mgr_tbl_set_all_skip_cnt(&link->req.l_tbl);
|
|
__cam_req_mgr_tbl_set_all_skip_cnt(&link->req.l_tbl);
|
|
in_q->rd_idx = idx;
|
|
in_q->rd_idx = idx;
|
|
|
|
+ in_q->slot[idx].bubble_times++;
|
|
in_q->slot[idx].status = CRM_SLOT_STATUS_REQ_ADDED;
|
|
in_q->slot[idx].status = CRM_SLOT_STATUS_REQ_ADDED;
|
|
if (link->sync_link[0]) {
|
|
if (link->sync_link[0]) {
|
|
in_q->slot[idx].sync_mode = 0;
|
|
in_q->slot[idx].sync_mode = 0;
|
|
@@ -3431,6 +3436,21 @@ int cam_req_mgr_process_error(void *priv, void *data)
|
|
in_q->slot[idx].sync_mode = 0;
|
|
in_q->slot[idx].sync_mode = 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * We need do internal recovery for back to back bubble, but if
|
|
|
|
+ * the request had been internal recovered, we won't recover
|
|
|
|
+ * it again.
|
|
|
|
+ */
|
|
|
|
+ if ((in_q->slot[idx].bubble_times >= REQ_MAXIMUM_BUBBLE_TIMES) &&
|
|
|
|
+ !in_q->slot[idx].internal_recovered) {
|
|
|
|
+ link->try_for_internal_recovery = true;
|
|
|
|
+ /* Notify all devices in the link about the error */
|
|
|
|
+ __cam_req_mgr_send_evt(err_info->req_id,
|
|
|
|
+ CAM_REQ_MGR_LINK_EVT_STALLED, CRM_KMD_ERR_FATAL, link);
|
|
|
|
+ in_q->slot[idx].internal_recovered = true;
|
|
|
|
+ link->try_for_internal_recovery = false;
|
|
|
|
+ }
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* Reset till last applied, even if there are scheduling delays
|
|
* Reset till last applied, even if there are scheduling delays
|
|
* we start fresh from the request on which bubble has
|
|
* we start fresh from the request on which bubble has
|