From patchwork Wed Jan 20 20:45:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 74125 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0KLNO2d009254 for ; Wed, 20 Jan 2010 21:23:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754612Ab0ATVXN (ORCPT ); Wed, 20 Jan 2010 16:23:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754725Ab0ATVXM (ORCPT ); Wed, 20 Jan 2010 16:23:12 -0500 Received: from suva.vyatta.com ([76.74.103.44]:53912 "EHLO suva.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754726Ab0ATVXJ (ORCPT ); Wed, 20 Jan 2010 16:23:09 -0500 X-Greylist: delayed 1814 seconds by postgrey-1.27 at vger.kernel.org; Wed, 20 Jan 2010 16:23:08 EST Received: from suva.vyatta.com (suva [127.0.0.1]) by suva.vyatta.com (8.13.7/8.13.7) with ESMTP id o0KKqLog001073; Wed, 20 Jan 2010 12:52:21 -0800 Received: (from shemminger@localhost) by suva.vyatta.com (8.13.7/8.13.7/Submit) id o0KKqGcX001070; Wed, 20 Jan 2010 12:52:16 -0800 Message-Id: <20100120204559.518399582@vyatta.com> References: <20100120204459.820265084@vyatta.com> User-Agent: quilt/0.46-1 Date: Wed, 20 Jan 2010 12:45:10 -0800 From: Stephen Hemminger To: David Miller , Jarek Poplawski , Roland Dreier Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org Subject: [PATCH 11/11] ipoib: fix DMA sync_single length error Content-Disposition: inline; filename=ipoib.patch Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c 2010-01-20 12:02:29.269388203 -0800 +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c 2010-01-20 12:24:37.828137536 -0800 @@ -624,11 +624,15 @@ void ipoib_cm_handle_rx_wc(struct net_de small_skb = dev_alloc_skb(dlen + 12); if (small_skb) { skb_reserve(small_skb, 12); - ib_dma_sync_single_for_cpu(priv->ca, rx_ring[wr_id].mapping[0], - dlen, DMA_FROM_DEVICE); + ib_dma_sync_single_for_cpu(priv->ca, + rx_ring[wr_id].mapping[0], + IPOIB_CM_HEAD_SIZE, + DMA_FROM_DEVICE); skb_copy_from_linear_data(skb, small_skb->data, dlen); - ib_dma_sync_single_for_device(priv->ca, rx_ring[wr_id].mapping[0], - dlen, DMA_FROM_DEVICE); + ib_dma_sync_single_for_device(priv->ca, + rx_ring[wr_id].mapping[0], + IPOIB_CM_HEAD_SIZE, + DMA_FROM_DEVICE); skb_put(small_skb, dlen); skb = small_skb; goto copied;