IB/mlx5: Report Scatter FCS device capability when supported
authorMajd Dibbiny <majd@mellanox.com>
Sun, 17 Apr 2016 14:19:38 +0000 (17:19 +0300)
committerDoug Ledford <dledford@redhat.com>
Fri, 13 May 2016 23:40:28 +0000 (19:40 -0400)
Report Scatter FCS support when the Firmware supports as well.

Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/main.c

index 6ad0489cb3c5bfaf14170874971af77166576784..dbb3d66e62a12de5ab6a8d315bebd6c7278574c0 100644 (file)
@@ -517,6 +517,10 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
                props->device_cap_flags |= IB_DEVICE_UD_TSO;
        }
 
+       if (MLX5_CAP_GEN(dev->mdev, eth_net_offloads) &&
+           MLX5_CAP_ETH(dev->mdev, scatter_fcs))
+               props->device_cap_flags |= IB_DEVICE_RAW_SCATTER_FCS;
+
        props->vendor_part_id      = mdev->pdev->device;
        props->hw_ver              = mdev->pdev->revision;