Kaynağa Gözat

[Infiniband] Fix event queue doorbell ringing on Arbel

tags/v0.9.4
Michael Brown 16 yıl önce
ebeveyn
işleme
d72bf13b78
2 değiştirilmiş dosya ile 14 ekleme ve 2 silme
  1. 4
    2
      src/drivers/infiniband/arbel.c
  2. 10
    0
      src/drivers/infiniband/arbel.h

+ 4
- 2
src/drivers/infiniband/arbel.c Dosyayı Görüntüle

@@ -1410,6 +1410,7 @@ static void arbel_poll_eq ( struct ib_device *ibdev ) {
1410 1410
 	struct arbel *arbel = ib_get_drvdata ( ibdev );
1411 1411
 	struct arbel_event_queue *arbel_eq = &arbel->eq;
1412 1412
 	union arbelprm_event_entry *eqe;
1413
+	union arbelprm_eq_doorbell_register db_reg;
1413 1414
 	unsigned int eqe_idx_mask;
1414 1415
 	unsigned int event_type;
1415 1416
 
@@ -1445,10 +1446,11 @@ static void arbel_poll_eq ( struct ib_device *ibdev ) {
1445 1446
 		arbel_eq->next_idx++;
1446 1447
 
1447 1448
 		/* Ring doorbell */
1449
+		MLX_FILL_1 ( &db_reg.ci, 0, ci, arbel_eq->next_idx );
1448 1450
 		DBGCP ( arbel, "Ringing doorbell %08lx with %08lx\n",
1449 1451
 			virt_to_phys ( arbel_eq->doorbell ),
1450
-			arbel_eq->next_idx );
1451
-		writel ( arbel_eq->next_idx, arbel_eq->doorbell );
1452
+			db_reg.dword[0] );
1453
+		writel ( db_reg.dword[0], arbel_eq->doorbell );
1452 1454
 	}
1453 1455
 }
1454 1456
 

+ 10
- 0
src/drivers/infiniband/arbel.h Dosyayı Görüntüle

@@ -122,6 +122,10 @@ struct arbelprm_event_mask_st {
122 122
 	pseudo_bit_t reserved2[0x00016];
123 123
 } __attribute__ (( packed ));
124 124
 
125
+struct arbelprm_eq_set_ci_st {
126
+	pseudo_bit_t ci[0x00020];
127
+} __attribute__ (( packed ));
128
+
125 129
 struct arbelprm_port_state_change_event_st {
126 130
 	pseudo_bit_t reserved[0x00020];
127 131
 	struct arbelprm_port_state_change_st data;
@@ -140,6 +144,7 @@ struct MLX_DECLARE_STRUCT ( arbelprm_cq_arm_db_record );
140 144
 struct MLX_DECLARE_STRUCT ( arbelprm_cq_ci_db_record );
141 145
 struct MLX_DECLARE_STRUCT ( arbelprm_event_mask );
142 146
 struct MLX_DECLARE_STRUCT ( arbelprm_event_queue_entry );
147
+struct MLX_DECLARE_STRUCT ( arbelprm_eq_set_ci );
143 148
 struct MLX_DECLARE_STRUCT ( arbelprm_eqc );
144 149
 struct MLX_DECLARE_STRUCT ( arbelprm_hca_command_register );
145 150
 struct MLX_DECLARE_STRUCT ( arbelprm_init_hca );
@@ -214,6 +219,11 @@ union arbelprm_doorbell_register {
214 219
 	uint32_t dword[2];
215 220
 } __attribute__ (( packed ));
216 221
 
222
+union arbelprm_eq_doorbell_register {
223
+	struct arbelprm_eq_set_ci ci;
224
+	uint32_t dword[1];
225
+} __attribute__ (( packed ));
226
+
217 227
 union arbelprm_mad {
218 228
 	struct arbelprm_mad_ifc ifc;
219 229
 	union ib_mad mad;

Loading…
İptal
Kaydet