aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/main.c
diff options
context:
space:
mode:
authorShlomo Pongratz <shlomop@mellanox.com>2012-04-29 10:04:25 -0400
committerRoland Dreier <roland@purestorage.com>2012-05-08 14:54:32 -0400
commitb3416f4476f39f76fd5ca238e8332ba9b8f059d9 (patch)
treeabe8502067df86eba56d32d37f75f6e434acda27 /drivers/net/ethernet/mellanox/mlx4/main.c
parentc0c1d3d761c32ece93b1c99d200591415e3cbf7c (diff)
mlx4_core: Add second capabilities flags field
This patch adds a 64-bit flags2 features member to struct mlx4_dev to export further features of the hardware. The original flags field tracks features whose support bits are advertised by the firmware in offsets 0x40 and 0x44 of the query device capabilities command. flags2 will track features whose support bits are scattered at various offsets. RSS support is the first feature to be exported through flags2. RSS capabilities are located at offset 0x2e. The size of the RSS indirection table is also given in this offset. Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/main.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index 8bb05b46db86..bb04a8208780 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -272,10 +272,12 @@ static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
272 dev->caps.max_msg_sz = dev_cap->max_msg_sz; 272 dev->caps.max_msg_sz = dev_cap->max_msg_sz;
273 dev->caps.page_size_cap = ~(u32) (dev_cap->min_page_sz - 1); 273 dev->caps.page_size_cap = ~(u32) (dev_cap->min_page_sz - 1);
274 dev->caps.flags = dev_cap->flags; 274 dev->caps.flags = dev_cap->flags;
275 dev->caps.flags2 = dev_cap->flags2;
275 dev->caps.bmme_flags = dev_cap->bmme_flags; 276 dev->caps.bmme_flags = dev_cap->bmme_flags;
276 dev->caps.reserved_lkey = dev_cap->reserved_lkey; 277 dev->caps.reserved_lkey = dev_cap->reserved_lkey;
277 dev->caps.stat_rate_support = dev_cap->stat_rate_support; 278 dev->caps.stat_rate_support = dev_cap->stat_rate_support;
278 dev->caps.max_gso_sz = dev_cap->max_gso_sz; 279 dev->caps.max_gso_sz = dev_cap->max_gso_sz;
280 dev->caps.max_rss_tbl_sz = dev_cap->max_rss_tbl_sz;
279 281
280 /* Sense port always allowed on supported devices for ConnectX1 and 2 */ 282 /* Sense port always allowed on supported devices for ConnectX1 and 2 */
281 if (dev->pdev->device != 0x1003) 283 if (dev->pdev->device != 0x1003)