aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
diff options
context:
space:
mode:
authorKamal Heib <kamalheib1@gmail.com>2018-07-31 09:02:36 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-07-31 17:03:46 -0600
commit26e551c5aec572442c4ad7109ff4350f427cd39d (patch)
tree994eac4d48100034faea4b798d1c7576b066883f /drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
parentrdma/cxgb4: Simplify a structure initialization (diff)
downloadlinux-dev-26e551c5aec572442c4ad7109ff4350f427cd39d.tar.xz
linux-dev-26e551c5aec572442c4ad7109ff4350f427cd39d.zip
RDMA: Fix return code check in rdma_set_cq_moderation
The proper return code is "-EOPNOTSUPP" when the modify_cq() callback is not supported, all drivers should generate this and all users should check for it when detecting not supported functionality. Signed-off-by: Kamal Heib <kamalheib1@gmail.com> Acked-by: Leon Romanovsky <leonro@mellanox.com> (for mlx5) Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to '')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_ethtool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
index 2706bf26cbac..83429925dfc6 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
@@ -102,7 +102,7 @@ static int ipoib_set_coalesce(struct net_device *dev,
ret = rdma_set_cq_moderation(priv->recv_cq,
coal->rx_max_coalesced_frames,
coal->rx_coalesce_usecs);
- if (ret && ret != -ENOSYS) {
+ if (ret && ret != -EOPNOTSUPP) {
ipoib_warn(priv, "failed modifying CQ (%d)\n", ret);
return ret;
}