Browse Source

INIT_HCA block now matches.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
da014080f9
2 changed files with 5 additions and 3 deletions
  1. 1
    0
      src/drivers/net/mlx_ipoib/ib_mt25218.c
  2. 4
    3
      src/drivers/net/mlx_ipoib/mt25218.c

+ 1
- 0
src/drivers/net/mlx_ipoib/ib_mt25218.c View File

@@ -811,6 +811,7 @@ static int setup_hca(__u8 port, void **eq_p)
811 811
 	DBG ( "mpt_base_addr_l = %lx\n", icm_start );
812 812
 	init_hca.mpt_base_addr_l = icm_start;
813 813
 	init_hca.log_mpt_sz = log2_entries;
814
+	DBG ( "log2_entries for mpt = %d\n", log2_entries );
814 815
 	icm_start += (tmp << 12);
815 816
 	icm_size += (tmp << 12);
816 817
 

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

@@ -169,7 +169,7 @@ static int arbel_cmd ( struct arbel *arbel, unsigned long command,
169 169
 	DBGC2_HD ( arbel, &hcr, sizeof ( hcr ) );
170 170
 	if ( in_len ) {
171 171
 		DBGC2 ( arbel, "Input:\n" );
172
-		DBGC2_HD ( arbel, in, ( ( in_len < 256 ) ? in_len : 256 ) );
172
+		DBGC2_HD ( arbel, in, ( ( in_len < 512 ) ? in_len : 512 ) );
173 173
 	}
174 174
 
175 175
 	/* Issue command */
@@ -203,7 +203,7 @@ static int arbel_cmd ( struct arbel *arbel, unsigned long command,
203 203
 	memcpy ( out, out_buffer, out_len );
204 204
 	if ( out_len ) {
205 205
 		DBGC2 ( arbel, "Output:\n" );
206
-		DBGC2_HD ( arbel, out, ( ( out_len < 256 ) ? out_len : 256 ) );
206
+		DBGC2_HD ( arbel, out, ( ( out_len < 512 ) ? out_len : 512 ) );
207 207
 	}
208 208
 
209 209
 	return 0;
@@ -1682,7 +1682,7 @@ static int arbel_alloc_icm ( struct arbel *arbel,
1682 1682
 	icm_offset += icm_usage ( log_num_mtts, arbel->limits.mtt_entry_size );
1683 1683
 
1684 1684
 	/* Memory protection table */
1685
-	log_num_mpts = fls ( arbel->limits.reserved_mrws - 1 );
1685
+	log_num_mpts = fls ( arbel->limits.reserved_mrws + 1 - 1 );
1686 1686
 	MLX_FILL_1 ( init_hca, 61,
1687 1687
 		     tpt_parameters.mpt_base_adr_l, icm_offset );
1688 1688
 	MLX_FILL_1 ( init_hca, 62,
@@ -1872,6 +1872,7 @@ static int arbel_probe ( struct pci_device *pci,
1872 1872
 		goto err_alloc_icm;
1873 1873
 
1874 1874
 	/* Initialise HCA */
1875
+	MLX_FILL_1 ( &init_hca, 74, uar_parameters.log_max_uars, 1 );
1875 1876
 	if ( ( rc = arbel_cmd_init_hca ( arbel, &init_hca ) ) != 0 ) {
1876 1877
 		DBGC ( arbel, "Arbel %p could not initialise HCA: %s\n",
1877 1878
 		       arbel, strerror ( rc ) );

Loading…
Cancel
Save