mlx4_core: Save/restore default port IB capability mask
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Sat, 29 Nov 2008 05:29:46 +0000 (21:29 -0800)
committerRoland Dreier <rolandd@cisco.com>
Sat, 29 Nov 2008 05:29:46 +0000 (21:29 -0800)
commit9a5aa622dd4cd22b5e0fe83e4a9c0c768d4e2dea
tree95e975a4959a890bd1050645b04488272aa4643c
parent4ffaf869c7780bbdfc11291e5fd4b61dde662b1c
mlx4_core: Save/restore default port IB capability mask

Commit 7ff93f8b ("mlx4_core: Multiple port type support") introduced
support for different port types.  As part of that support, SET_PORT
is invoked to set the port type during driver startup.  However, as a
side-effect, for IB ports the invocation of this command also sets the
port's capability mask to zero (losing the default value set by FW).

To fix this, get the default ib port capabilities (via a MAD_IFC Port
Info query) during driver startup, and save them for use in the
mlx4_SET_PORT command when setting the port-type to Infiniband.

This patch fixes problems with subnet manager (SM) failover such as
<https://bugs.openfabrics.org/show_bug.cgi?id=1183>, which occurred
because the IsTrapSupported bit in the capability mask was zeroed.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/net/mlx4/main.c
drivers/net/mlx4/mlx4.h
drivers/net/mlx4/port.c
include/linux/mlx4/device.h