]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
mlx4_core: Reserve the correct number of MTT segments
authorRoland Dreier <rolandd@cisco.com>
Wed, 10 Oct 2007 02:59:16 +0000 (19:59 -0700)
committerRoland Dreier <rolandd@cisco.com>
Wed, 10 Oct 2007 02:59:16 +0000 (19:59 -0700)
commitcf78237d7b0e683d172e40b1e85b26ca49a3cdba
tree37ab3ac0744ef2a699649e8949260301dc570f51
parent5b0bf5e25efea77103b0ac7c8057cd56c778ef41
mlx4_core: Reserve the correct number of MTT segments

Taking ilog2(dev->caps.reserved_mtts) to find out the order to pass to
the MTT buddy allocator will do the wrong thing if reserved_mtts is ever
not a power of 2.  Be safe and use fls(dev->caps.reserved_mtts - 1).

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/net/mlx4/mr.c