]> git.baikalelectronics.ru Git - kernel.git/commit
mlx4_core: Do not map BF area if capability is 0
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Sun, 19 Feb 2012 21:38:52 +0000 (21:38 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Feb 2012 00:26:34 +0000 (19:26 -0500)
commit4c59b2264b2e1b9b717a00906e410d874912c0d3
treeff046bf821c203c6ef99359010bb795473716d82
parentc1f877c5b37b56b9756867b670a6ff3975f09da3
mlx4_core: Do not map BF area if capability is 0

BF can be disabled in some cases, the capability field, bf_reg_size is set
to zero in this case. Don't map the BF area in this case, it would cause
failures.  In addition, leaving the BF area unmapped
also alerts the ETH driver to not use BF.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/main.c