From patchwork Mon Nov 8 10:42:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 307962 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 oA8Agnlk011492 for ; Mon, 8 Nov 2010 10:42:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754179Ab0KHKms (ORCPT ); Mon, 8 Nov 2010 05:42:48 -0500 Received: from mail-fx0-f46.google.com ([209.85.161.46]:37022 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753503Ab0KHKms (ORCPT ); Mon, 8 Nov 2010 05:42:48 -0500 Received: by fxm16 with SMTP id 16so3872380fxm.19 for ; Mon, 08 Nov 2010 02:42:46 -0800 (PST) Received: by 10.223.74.10 with SMTP id s10mr3604888faj.77.1289212966800; Mon, 08 Nov 2010 02:42:46 -0800 (PST) Received: from localhost ([82.166.227.17]) by mx.google.com with ESMTPS id d20sm2041743fav.14.2010.11.08.02.42.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 08 Nov 2010 02:42:46 -0800 (PST) Date: Mon, 8 Nov 2010 12:42:44 +0200 From: Eli Cohen To: Roland Dreier Cc: RDMA list Subject: [PATCH] IPoIB: Fix IPoIB to conform to ethtool definitions Message-ID: <20101108104244.GA7521@mtldesk30> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) 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 10:42:50 +0000 (UTC) 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) {