Browse Source

[Infiniband] Fix event queue doorbell ringing on Arbel

tags/v0.9.4
Michael Brown 16 years ago
parent
commit
d72bf13b78
2 changed files with 14 additions and 2 deletions
  1. 4
    2
      src/drivers/infiniband/arbel.c
  2. 10
    0
      src/drivers/infiniband/arbel.h

+ 4
- 2
src/drivers/infiniband/arbel.c View File

1410
 	struct arbel *arbel = ib_get_drvdata ( ibdev );
1410
 	struct arbel *arbel = ib_get_drvdata ( ibdev );
1411
 	struct arbel_event_queue *arbel_eq = &arbel->eq;
1411
 	struct arbel_event_queue *arbel_eq = &arbel->eq;
1412
 	union arbelprm_event_entry *eqe;
1412
 	union arbelprm_event_entry *eqe;
1413
+	union arbelprm_eq_doorbell_register db_reg;
1413
 	unsigned int eqe_idx_mask;
1414
 	unsigned int eqe_idx_mask;
1414
 	unsigned int event_type;
1415
 	unsigned int event_type;
1415
 
1416
 
1445
 		arbel_eq->next_idx++;
1446
 		arbel_eq->next_idx++;
1446
 
1447
 
1447
 		/* Ring doorbell */
1448
 		/* Ring doorbell */
1449
+		MLX_FILL_1 ( &db_reg.ci, 0, ci, arbel_eq->next_idx );
1448
 		DBGCP ( arbel, "Ringing doorbell %08lx with %08lx\n",
1450
 		DBGCP ( arbel, "Ringing doorbell %08lx with %08lx\n",
1449
 			virt_to_phys ( arbel_eq->doorbell ),
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 View File

122
 	pseudo_bit_t reserved2[0x00016];
122
 	pseudo_bit_t reserved2[0x00016];
123
 } __attribute__ (( packed ));
123
 } __attribute__ (( packed ));
124
 
124
 
125
+struct arbelprm_eq_set_ci_st {
126
+	pseudo_bit_t ci[0x00020];
127
+} __attribute__ (( packed ));
128
+
125
 struct arbelprm_port_state_change_event_st {
129
 struct arbelprm_port_state_change_event_st {
126
 	pseudo_bit_t reserved[0x00020];
130
 	pseudo_bit_t reserved[0x00020];
127
 	struct arbelprm_port_state_change_st data;
131
 	struct arbelprm_port_state_change_st data;
140
 struct MLX_DECLARE_STRUCT ( arbelprm_cq_ci_db_record );
144
 struct MLX_DECLARE_STRUCT ( arbelprm_cq_ci_db_record );
141
 struct MLX_DECLARE_STRUCT ( arbelprm_event_mask );
145
 struct MLX_DECLARE_STRUCT ( arbelprm_event_mask );
142
 struct MLX_DECLARE_STRUCT ( arbelprm_event_queue_entry );
146
 struct MLX_DECLARE_STRUCT ( arbelprm_event_queue_entry );
147
+struct MLX_DECLARE_STRUCT ( arbelprm_eq_set_ci );
143
 struct MLX_DECLARE_STRUCT ( arbelprm_eqc );
148
 struct MLX_DECLARE_STRUCT ( arbelprm_eqc );
144
 struct MLX_DECLARE_STRUCT ( arbelprm_hca_command_register );
149
 struct MLX_DECLARE_STRUCT ( arbelprm_hca_command_register );
145
 struct MLX_DECLARE_STRUCT ( arbelprm_init_hca );
150
 struct MLX_DECLARE_STRUCT ( arbelprm_init_hca );
214
 	uint32_t dword[2];
219
 	uint32_t dword[2];
215
 } __attribute__ (( packed ));
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
 union arbelprm_mad {
227
 union arbelprm_mad {
218
 	struct arbelprm_mad_ifc ifc;
228
 	struct arbelprm_mad_ifc ifc;
219
 	union ib_mad mad;
229
 	union ib_mad mad;

Loading…
Cancel
Save