Browse Source

Don't use the mailboxless version of the HW2SW_CQ command; it seems to

crash the machine.
tags/v0.9.3
Michael Brown 18 years ago
parent
commit
f3fcb53faf
1 changed files with 7 additions and 4 deletions
  1. 7
    4
      src/drivers/net/mlx_ipoib/mt25218.c

+ 7
- 4
src/drivers/net/mlx_ipoib/mt25218.c View File

225
 }
225
 }
226
 
226
 
227
 static inline int
227
 static inline int
228
-arbel_cmd_hw2sw_cq ( struct arbel *arbel, unsigned long cqn ) {
228
+arbel_cmd_hw2sw_cq ( struct arbel *arbel, unsigned long cqn,
229
+		     struct arbelprm_completion_queue_context *cqctx) {
229
 	return arbel_cmd ( arbel,
230
 	return arbel_cmd ( arbel,
230
-			   ARBEL_HCR_VOID_CMD ( ARBEL_HCR_HW2SW_CQ ),
231
-			   1, NULL, cqn, NULL );
231
+			   ARBEL_HCR_OUT_CMD ( ARBEL_HCR_HW2SW_CQ,
232
+					       1, sizeof ( *cqctx ) ),
233
+			   0, NULL, cqn, cqctx );
232
 }
234
 }
233
 
235
 
234
 static inline int
236
 static inline int
421
 			       struct ib_completion_queue *cq ) {
423
 			       struct ib_completion_queue *cq ) {
422
 	struct arbel *arbel = ibdev->dev_priv;
424
 	struct arbel *arbel = ibdev->dev_priv;
423
 	struct arbel_completion_queue *arbel_cq = cq->dev_priv;
425
 	struct arbel_completion_queue *arbel_cq = cq->dev_priv;
426
+	struct arbelprm_completion_queue_context cqctx;
424
 	struct arbelprm_cq_ci_db_record *ci_db_rec;
427
 	struct arbelprm_cq_ci_db_record *ci_db_rec;
425
 	struct arbelprm_cq_arm_db_record *arm_db_rec;
428
 	struct arbelprm_cq_arm_db_record *arm_db_rec;
426
 	int cqn_offset;
429
 	int cqn_offset;
427
 	int rc;
430
 	int rc;
428
 
431
 
429
 	/* Take ownership back from hardware */
432
 	/* Take ownership back from hardware */
430
-	if ( ( rc = arbel_cmd_hw2sw_cq ( arbel, cq->cqn ) ) != 0 ) {
433
+	if ( ( rc = arbel_cmd_hw2sw_cq ( arbel, cq->cqn, &cqctx ) ) != 0 ) {
431
 		DBGC ( arbel, "Arbel %p FATAL HW2SW_CQ failed on CQN %#lx: "
434
 		DBGC ( arbel, "Arbel %p FATAL HW2SW_CQ failed on CQN %#lx: "
432
 		       "%s\n", arbel, cq->cqn, strerror ( rc ) );
435
 		       "%s\n", arbel, cq->cqn, strerror ( rc ) );
433
 		/* Leak memory and return; at least we avoid corruption */
436
 		/* Leak memory and return; at least we avoid corruption */

Loading…
Cancel
Save