Message ID | 20101108104244.GA7521@mtldesk30 (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c index 1a1657c..c7efba3 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c @@ -93,6 +93,13 @@ static int ipoib_set_coalesce(struct net_device *dev, coal->rx_max_coalesced_frames > 0xffff) return -EINVAL; + if (coal->rx_max_coalesced_frames | coal->rx_coalesce_usecs) { + if (!coal->rx_max_coalesced_frames) + coal->rx_max_coalesced_frames = 0xffff; + else if (!coal->rx_coalesce_usecs) + coal->rx_coalesce_usecs = 0xffff; + } + ret = ib_modify_cq(priv->recv_cq, coal->rx_max_coalesced_frames, coal->rx_coalesce_usecs); if (ret && ret != -ENOSYS) {