2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 15:21:32 +00:00

INIT_HCA block now matches.

This commit is contained in:
Michael Brown 2007-09-18 04:20:41 +01:00
parent 57bf8d9905
commit da014080f9
2 changed files with 5 additions and 3 deletions

View File

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

View File

@ -169,7 +169,7 @@ static int arbel_cmd ( struct arbel *arbel, unsigned long command,
DBGC2_HD ( arbel, &hcr, sizeof ( hcr ) );
if ( in_len ) {
DBGC2 ( arbel, "Input:\n" );
DBGC2_HD ( arbel, in, ( ( in_len < 256 ) ? in_len : 256 ) );
DBGC2_HD ( arbel, in, ( ( in_len < 512 ) ? in_len : 512 ) );
}
/* Issue command */
@ -203,7 +203,7 @@ static int arbel_cmd ( struct arbel *arbel, unsigned long command,
memcpy ( out, out_buffer, out_len );
if ( out_len ) {
DBGC2 ( arbel, "Output:\n" );
DBGC2_HD ( arbel, out, ( ( out_len < 256 ) ? out_len : 256 ) );
DBGC2_HD ( arbel, out, ( ( out_len < 512 ) ? out_len : 512 ) );
}
return 0;
@ -1682,7 +1682,7 @@ static int arbel_alloc_icm ( struct arbel *arbel,
icm_offset += icm_usage ( log_num_mtts, arbel->limits.mtt_entry_size );
/* Memory protection table */
log_num_mpts = fls ( arbel->limits.reserved_mrws - 1 );
log_num_mpts = fls ( arbel->limits.reserved_mrws + 1 - 1 );
MLX_FILL_1 ( init_hca, 61,
tpt_parameters.mpt_base_adr_l, icm_offset );
MLX_FILL_1 ( init_hca, 62,
@ -1872,6 +1872,7 @@ static int arbel_probe ( struct pci_device *pci,
goto err_alloc_icm;
/* Initialise HCA */
MLX_FILL_1 ( &init_hca, 74, uar_parameters.log_max_uars, 1 );
if ( ( rc = arbel_cmd_init_hca ( arbel, &init_hca ) ) != 0 ) {
DBGC ( arbel, "Arbel %p could not initialise HCA: %s\n",
arbel, strerror ( rc ) );