Browse Source

qcacld-3.0: Move force break to CE_state

Removing references to global data in the processing of
copy engine interupts.

Change-Id: I4d18198c392aab8c46aa755e2007ba2da0c47a57
CRs-Fixed: 941355
Houston Hoffman 9 years ago
parent
commit
18c7fc529e
4 changed files with 6 additions and 5 deletions
  1. 0 2
      core/hif/inc/hif.h
  2. 2 0
      core/hif/src/ce/ce_internal.h
  3. 2 1
      core/hif/src/ce/ce_main.c
  4. 2 2
      core/hif/src/ce/ce_service.c

+ 0 - 2
core/hif/inc/hif.h

@@ -292,8 +292,6 @@ struct ol_softc {
 	 */
 	cdf_spinlock_t target_lock;
 	unsigned int ce_count;  /* Number of Copy Engines supported */
-	bool force_break;	/* Flag to indicate whether to
-				 * break out the DPC context */
 	unsigned int receive_count;	/* count Num Of Receive Buffers
 					 * handled for one interrupt
 					 * DPC routine */

+ 2 - 0
core/hif/src/ce/ce_internal.h

@@ -129,6 +129,8 @@ struct CE_state {
 	struct CE_ring_state *src_ring;
 	struct CE_ring_state *dest_ring;
 	atomic_t rx_pending;
+	bool force_break;	/* Flag to indicate whether to
+				 * break out the DPC context */
 
 	/* epping */
 	bool timer_inited;

+ 2 - 1
core/hif/src/ce/ce_main.c

@@ -729,6 +729,7 @@ hif_pci_ce_recv_data(struct CE_handle *copyeng, void *ce_context,
 	struct HIF_CE_pipe_info *pipe_info =
 		(struct HIF_CE_pipe_info *)ce_context;
 	struct HIF_CE_state *hif_state = pipe_info->HIF_CE_state;
+	struct CE_state *ce_state = (struct CE_state *) copyeng;
 	struct ol_softc *scn = hif_state->scn;
 	struct HIF_CE_completion_state *compl_state;
 	struct HIF_CE_completion_state *compl_queue_head, *compl_queue_tail;
@@ -780,7 +781,7 @@ hif_pci_ce_recv_data(struct CE_handle *copyeng, void *ce_context,
 		scn->receive_count++;
 		if (cdf_unlikely(hif_max_num_receives_reached(
 				scn->receive_count))) {
-			scn->force_break = 1;
+			ce_state->force_break = 1;
 			break;
 		}
 	} while (ce_completed_recv_next(copyeng, &ce_context, &transfer_context,

+ 2 - 2
core/hif/src/ce/ce_service.c

@@ -1182,7 +1182,7 @@ int ce_per_engine_service(struct ol_softc *scn, unsigned int CE_id)
 
 	/* NAPI: scn variables- thread/multi-processing safety? */
 	scn->receive_count = 0;
-	scn->force_break = 0;
+	CE_state->force_break = 0;
 more_completions:
 	if (CE_state->recv_cb) {
 
@@ -1215,7 +1215,7 @@ more_completions:
 			/* Break the receive processes by
 			 * force if force_break set up
 			 */
-			if (cdf_unlikely(scn->force_break)) {
+			if (cdf_unlikely(CE_state->force_break)) {
 				cdf_atomic_set(&CE_state->rx_pending, 1);
 				CE_ENGINE_INT_STATUS_CLEAR(scn, ctrl_addr,
 					HOST_IS_COPY_COMPLETE_MASK);