mlx4_core: Disable memory windows for virtual functions
authorShani Michaeli <shanim@mellanox.com>
Wed, 6 Feb 2013 16:19:10 +0000 (16:19 +0000)
committerRoland Dreier <roland@purestorage.com>
Mon, 25 Feb 2013 18:44:31 +0000 (10:44 -0800)
commitcc1ade94eeaa235b28fb139d4ba20b697be36768
treeeec68d01eacf570003af591581b8445d2bfde66d
parentc89d127128dba62458e956388fef7e5d728e1ded
mlx4_core: Disable memory windows for virtual functions

Do not enable memory windows allocation for virtual functions.

In addition, add a few safety checks, such as:

* Verifying the PD of a new MPT matches the VF.
* Making sure binding memory window isn't enabled for FMRs, and
  that new memory windows are not FMR themselves.

Signed-off-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Shani Michaeli <shanim@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/net/ethernet/mellanox/mlx4/fw.c
drivers/net/ethernet/mellanox/mlx4/mlx4.h
drivers/net/ethernet/mellanox/mlx4/mr.c
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c