mlx4_core: enable changing default max HCA resource limits.
Enable module-initialization time modification of default HCA
maximum resource limits via module parameters, as is done in
mthca.
Specify the log of the parameter value, rather than the value
itself to avoid the hidden side-effect of rounding up values
to next power-of-2.
For mtt's, there is a heuristic in place to configure twice
the number of MTTs required to cover host memory. This heuristic
is modified slightly to guarantee a minimum of 2^20 mtt's, and is
used when the user does not set the log_num_mtts module parameter.
If the log_num_mtt's module parameter is set by the user, the
value set for log_num_mtts will be used as-is (instead of the
heuristic).
V2: Adapted for rebase to kernel 3.7-rc4
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il> Reviewed-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
(Ported from Mellanox OFED 2.4)