From patchwork Mon Nov 8 07:37:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Or Gerlitz X-Patchwork-Id: 307782 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oA87bgcY024153 for ; Mon, 8 Nov 2010 07:37:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751566Ab0KHHhl (ORCPT ); Mon, 8 Nov 2010 02:37:41 -0500 Received: from fwil.voltaire.com ([193.47.165.2]:27046 "EHLO exil.voltaire.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751278Ab0KHHhl (ORCPT ); Mon, 8 Nov 2010 02:37:41 -0500 Received: from [172.25.5.141] ([172.25.5.141]) by exil.voltaire.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 8 Nov 2010 09:37:38 +0200 Date: Mon, 8 Nov 2010 09:37:38 +0200 (IST) From: Or Gerlitz To: Eli Cohen , Roland Dreier cc: linux-rdma Subject: re: Fix IPoIB to conform to ethtool definitions Message-ID: MIME-Version: 1.0 X-OriginalArrivalTime: 08 Nov 2010 07:37:38.0351 (UTC) FILETIME=[D15A1BF0:01CB7F17] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 08 Nov 2010 07:37:43 +0000 (UTC) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c index e9795f6..e602b7f 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c @@ -78,6 +78,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) {