summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx4/mlx4.h
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2012-09-27 20:23:41 +0400
committerRoland Dreier <roland@purestorage.com>2012-10-01 13:10:39 +0400
commit839f12434c7618d326b9d1ece5eca643e5e48d0a (patch)
tree5156372842e84963423bb7a7622e485fec9e2c7f /drivers/net/ethernet/mellanox/mlx4/mlx4.h
parentf3d4c89ee4a8c993cc334a67f84a3fb724a1dd35 (diff)
downloadlinux-839f12434c7618d326b9d1ece5eca643e5e48d0a.tar.xz
mlx4_core: Stash PCI ID driver_data in mlx4_priv structure
That way we can check flags later on, when we've finished with the pci_device_id structure. Also convert the "is VF" flag to an enum: "Never do in the preprocessor what can be done in C." Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/mlx4.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mlx4.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4.h b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
index 71eed05426ec..ac58189ae6da 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
@@ -768,6 +768,10 @@ struct _rule_hw {
};
};
+enum {
+ MLX4_PCI_DEV_IS_VF = 1 << 0,
+};
+
struct mlx4_priv {
struct mlx4_dev dev;
@@ -775,6 +779,8 @@ struct mlx4_priv {
struct list_head ctx_list;
spinlock_t ctx_lock;
+ int pci_dev_data;
+
struct list_head pgdir_list;
struct mutex pgdir_mutex;