Bläddra i källkod

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

crash the machine.
tags/v0.9.3
Michael Brown 16 år sedan
förälder
incheckning
f3fcb53faf
1 ändrade filer med 7 tillägg och 4 borttagningar
  1. 7
    4
      src/drivers/net/mlx_ipoib/mt25218.c

+ 7
- 4
src/drivers/net/mlx_ipoib/mt25218.c Visa fil

@@ -225,10 +225,12 @@ arbel_cmd_sw2hw_cq ( struct arbel *arbel, unsigned long cqn,
225 225
 }
226 226
 
227 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 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 236
 static inline int
@@ -421,13 +423,14 @@ static void arbel_destroy_cq ( struct ib_device *ibdev,
421 423
 			       struct ib_completion_queue *cq ) {
422 424
 	struct arbel *arbel = ibdev->dev_priv;
423 425
 	struct arbel_completion_queue *arbel_cq = cq->dev_priv;
426
+	struct arbelprm_completion_queue_context cqctx;
424 427
 	struct arbelprm_cq_ci_db_record *ci_db_rec;
425 428
 	struct arbelprm_cq_arm_db_record *arm_db_rec;
426 429
 	int cqn_offset;
427 430
 	int rc;
428 431
 
429 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 434
 		DBGC ( arbel, "Arbel %p FATAL HW2SW_CQ failed on CQN %#lx: "
432 435
 		       "%s\n", arbel, cq->cqn, strerror ( rc ) );
433 436
 		/* Leak memory and return; at least we avoid corruption */

Laddar…
Avbryt
Spara