Browse Source

[hermon] Force link speed to SDR

SDR link comes up much faster than other speeds.

Signed-off-by: Itay Gazit <itaygazit@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Itay Gazit 14 years ago
parent
commit
0e878b30fe

+ 5
- 2
src/drivers/infiniband/hermon.c View File

1969
 
1969
 
1970
 	/* Set port parameters */
1970
 	/* Set port parameters */
1971
 	memset ( &set_port, 0, sizeof ( set_port ) );
1971
 	memset ( &set_port, 0, sizeof ( set_port ) );
1972
-	MLX_FILL_7 ( &set_port.ib, 0,
1972
+	MLX_FILL_8 ( &set_port.ib, 0,
1973
 		     mmc, 1,
1973
 		     mmc, 1,
1974
 		     mvc, 1,
1974
 		     mvc, 1,
1975
 		     mp, 1,
1975
 		     mp, 1,
1976
 		     mg, 1,
1976
 		     mg, 1,
1977
 		     mtu_cap, IB_MTU_2048,
1977
 		     mtu_cap, IB_MTU_2048,
1978
 		     vl_cap, IB_VL_0,
1978
 		     vl_cap, IB_VL_0,
1979
-		     rcm, 1 );
1979
+		     rcm, 1,
1980
+		     lss, 1 );
1980
 	MLX_FILL_2 ( &set_port.ib, 10,
1981
 	MLX_FILL_2 ( &set_port.ib, 10,
1981
 		     max_pkey, 1,
1982
 		     max_pkey, 1,
1982
 		     max_gid, 1 );
1983
 		     max_gid, 1 );
1984
+	MLX_FILL_1 ( &set_port.ib, 28,
1985
+		     link_speed_supported, 1 );
1983
 	if ( ( rc = hermon_cmd_set_port ( hermon, 0, ibdev->port,
1986
 	if ( ( rc = hermon_cmd_set_port ( hermon, 0, ibdev->port,
1984
 					  &set_port ) ) != 0 ) {
1987
 					  &set_port ) ) != 0 ) {
1985
 		DBGC ( hermon, "Hermon %p port %d could not set port: %s\n",
1988
 		DBGC ( hermon, "Hermon %p port %d could not set port: %s\n",

+ 45
- 3
src/drivers/infiniband/hermon.h View File

228
 	pseudo_bit_t mp[0x00001];
228
 	pseudo_bit_t mp[0x00001];
229
 	pseudo_bit_t mvc[0x00001];
229
 	pseudo_bit_t mvc[0x00001];
230
 	pseudo_bit_t mmc[0x00001];
230
 	pseudo_bit_t mmc[0x00001];
231
-	pseudo_bit_t reserved2[0x00009];
231
+	pseudo_bit_t reserved2[0x00004];
232
+	pseudo_bit_t lws[0x00001];
233
+	pseudo_bit_t lss[0x00001];
234
+	pseudo_bit_t reserved3[0x00003];
232
 /* -------------- */
235
 /* -------------- */
233
 	pseudo_bit_t capability_mask[0x00020];
236
 	pseudo_bit_t capability_mask[0x00020];
234
 /* -------------- */
237
 /* -------------- */
246
 /* -------------- */
249
 /* -------------- */
247
 	pseudo_bit_t egress_sniff_qpn[0x00018];
250
 	pseudo_bit_t egress_sniff_qpn[0x00018];
248
 	pseudo_bit_t egress_sniff_mode[0x00002];
251
 	pseudo_bit_t egress_sniff_mode[0x00002];
249
-	pseudo_bit_t reserved3[0x00006];
252
+	pseudo_bit_t reserved4[0x00006];
250
 /* -------------- */
253
 /* -------------- */
251
 	pseudo_bit_t ingress_sniff_qpn[0x00018];
254
 	pseudo_bit_t ingress_sniff_qpn[0x00018];
252
 	pseudo_bit_t ingress_sniff_mode[0x00002];
255
 	pseudo_bit_t ingress_sniff_mode[0x00002];
253
-	pseudo_bit_t reserved4[0x00006];
256
+	pseudo_bit_t reserved5[0x00006];
254
 /* -------------- */
257
 /* -------------- */
255
 	pseudo_bit_t max_gid[0x00010];
258
 	pseudo_bit_t max_gid[0x00010];
256
 	pseudo_bit_t max_pkey[0x00010];
259
 	pseudo_bit_t max_pkey[0x00010];
260
+/* -------------- */
261
+	pseudo_bit_t reserved6[0x00020];
262
+/* -------------- */
263
+	pseudo_bit_t reserved7[0x00020];
264
+/* -------------- */
265
+	pseudo_bit_t reserved8[0x00020];
266
+/* -------------- */
267
+	pseudo_bit_t reserved9[0x00020];
268
+/* -------------- */
269
+	pseudo_bit_t reserved10[0x00020];
270
+/* -------------- */
271
+	pseudo_bit_t reserved11[0x00020];
272
+/* -------------- */
273
+	pseudo_bit_t reserved12[0x00020];
274
+/* -------------- */
275
+	pseudo_bit_t reserved13[0x00020];
276
+/* -------------- */
277
+	pseudo_bit_t reserved14[0x00020];
278
+/* -------------- */
279
+	pseudo_bit_t reserved15[0x00020];
280
+/* -------------- */
281
+	pseudo_bit_t reserved16[0x00020];
282
+/* -------------- */
283
+	pseudo_bit_t reserved17[0x00020];
284
+/* -------------- */
285
+	pseudo_bit_t reserved18[0x00020];
286
+/* -------------- */
287
+	pseudo_bit_t reserved19[0x00020];
288
+/* -------------- */
289
+	pseudo_bit_t reserved20[0x00020];
290
+/* -------------- */
291
+	pseudo_bit_t reserved21[0x00020];
292
+/* -------------- */
293
+	pseudo_bit_t reserved22[0x00020];
294
+/* -------------- */
295
+	pseudo_bit_t link_width_supported[0x00004];
296
+	pseudo_bit_t link_speed_supported[0x00004];
297
+	pseudo_bit_t reserved23[0x00018];
298
+/* -------------- */
257
 } __attribute__ (( packed ));
299
 } __attribute__ (( packed ));
258
 
300
 
259
 struct hermonprm_query_port_cap_st {
301
 struct hermonprm_query_port_cap_st {

+ 12
- 0
src/drivers/infiniband/mlx_bitops.h View File

110
 	( MLX_ASSEMBLE_1 ( _structure_st, _index, _field, _value ) |	     \
110
 	( MLX_ASSEMBLE_1 ( _structure_st, _index, _field, _value ) |	     \
111
 	  MLX_ASSEMBLE_6 ( _structure_st, _index, __VA_ARGS__ ) )
111
 	  MLX_ASSEMBLE_6 ( _structure_st, _index, __VA_ARGS__ ) )
112
 
112
 
113
+#define MLX_ASSEMBLE_8( _structure_st, _index, _field, _value, ... )	     \
114
+	( MLX_ASSEMBLE_1 ( _structure_st, _index, _field, _value ) |	     \
115
+	  MLX_ASSEMBLE_7 ( _structure_st, _index, __VA_ARGS__ ) )
116
+
113
 /*
117
 /*
114
  * Build native-endian (positive) dword bitmasks from named fields
118
  * Build native-endian (positive) dword bitmasks from named fields
115
  *
119
  *
143
 	( MLX_MASK_1 ( _structure_st, _index, _field ) |		     \
147
 	( MLX_MASK_1 ( _structure_st, _index, _field ) |		     \
144
 	  MLX_MASK_6 ( _structure_st, _index, __VA_ARGS__ ) )
148
 	  MLX_MASK_6 ( _structure_st, _index, __VA_ARGS__ ) )
145
 
149
 
150
+#define MLX_MASK_8( _structure_st, _index, _field, ... )		     \
151
+	( MLX_MASK_1 ( _structure_st, _index, _field ) |		     \
152
+	  MLX_MASK_7 ( _structure_st, _index, __VA_ARGS__ ) )
153
+
146
 /*
154
 /*
147
  * Populate big-endian dwords from named fields and values
155
  * Populate big-endian dwords from named fields and values
148
  *
156
  *
183
 	MLX_FILL ( _ptr, _index, MLX_ASSEMBLE_7 ( MLX_PSEUDO_STRUCT ( _ptr ),\
191
 	MLX_FILL ( _ptr, _index, MLX_ASSEMBLE_7 ( MLX_PSEUDO_STRUCT ( _ptr ),\
184
 						  _index, __VA_ARGS__ ) )
192
 						  _index, __VA_ARGS__ ) )
185
 
193
 
194
+#define MLX_FILL_8( _ptr, _index, ... )					     \
195
+	MLX_FILL ( _ptr, _index, MLX_ASSEMBLE_8 ( MLX_PSEUDO_STRUCT ( _ptr ),\
196
+						  _index, __VA_ARGS__ ) )
197
+
186
 /*
198
 /*
187
  * Modify big-endian dword using named field and value
199
  * Modify big-endian dword using named field and value
188
  *
200
  *

Loading…
Cancel
Save