]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mlx4_core: sysfs, fix usage of log_num_mtt module parameter
authorYishai Hadas <yishaih@mellanox.com>
Mon, 22 Apr 2013 11:36:43 +0000 (14:36 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 7 Jul 2015 21:45:11 +0000 (14:45 -0700)
commit462eb7b80251d8704de201c88f7f5294b0b4e822
tree7d65be3e1af88a6fea6619ea7794badb21408c4e
parent98006b31802021b65b0546ec695172f80c8d637a
mlx4_core: sysfs, fix usage of log_num_mtt module parameter

When was auto calculated based on RAM size it wrongly includes
also log_mtts_per_seg.

It's wrong in 2 ways:
First, log_mtts_per_seg should be added by the application itself,
no reason to a have total in log_num_mtt itself.
Second, in case that an extra  NIC exists it may get an invalid
value as it depends on a larger value.
Specifically, it may cause an overflow and later leads on to
kernel panic via mlx4_buddy_init.

Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
(Ported from Mellanox OFED 2.4)

Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
drivers/net/ethernet/mellanox/mlx4/main.c