diff options
author | Yishai Hadas <yishaih@mellanox.com> | 2015-01-25 16:59:35 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-25 14:43:13 -0800 |
commit | 872bf2fb69d90e3619befee842fc26db39d8e475 (patch) | |
tree | cd57553d6b75b48bf75a9aa6c4358fbed88e7b4a /include/linux | |
parent | 7aee42c6764bae75d0eb2f674f0874193de90c05 (diff) |
net/mlx4_core: Maintain a persistent memory for mlx4 device
Maintain a persistent memory that should survive reset flow/PCI error.
This comes as a preparation for coming series to support above flows.
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mlx4/device.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index f1e41b33462..1069ce65e8b 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h @@ -744,8 +744,15 @@ struct mlx4_vf_dev { u8 n_ports; }; -struct mlx4_dev { +struct mlx4_dev_persistent { struct pci_dev *pdev; + struct mlx4_dev *dev; + int nvfs[MLX4_MAX_PORTS + 1]; + int num_vfs; +}; + +struct mlx4_dev { + struct mlx4_dev_persistent *persist; unsigned long flags; unsigned long num_slaves; struct mlx4_caps caps; @@ -754,13 +761,11 @@ struct mlx4_dev { struct radix_tree_root qp_table_tree; u8 rev_id; char board_id[MLX4_BOARD_ID_LEN]; - int num_vfs; int numa_node; int oper_log_mgm_entry_size; u64 regid_promisc_array[MLX4_MAX_PORTS + 1]; u64 regid_allmulti_array[MLX4_MAX_PORTS + 1]; struct mlx4_vf_dev *dev_vfs; - int nvfs[MLX4_MAX_PORTS + 1]; }; struct mlx4_eqe { |