From patchwork Tue Mar 22 12:51:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Dillow X-Patchwork-Id: 652581 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 p2MCpHH9002765 for ; Tue, 22 Mar 2011 12:51:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755979Ab1CVMvY (ORCPT ); Tue, 22 Mar 2011 08:51:24 -0400 Received: from emroute1.ornl.gov ([160.91.4.119]:52239 "EHLO emroute1.ornl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755975Ab1CVMvX (ORCPT ); Tue, 22 Mar 2011 08:51:23 -0400 Received: from emroute1.ornl.gov ([127.0.0.1]) by emroute1.ornl.gov (PMDF V6.5-x6 #31890) with ESMTP id <0LIG0030HMDK2H@emroute1.ornl.gov> for linux-rdma@vger.kernel.org; Tue, 22 Mar 2011 08:51:20 -0400 (EDT) Received: from CONVERSION-DAEMON.emroute1.ornl.gov by emroute1.ornl.gov (PMDF V6.5-x6 #31890) id <0LIG00301MDK2Q@emroute1.ornl.gov>; Tue, 22 Mar 2011 08:51:20 -0400 (EDT) Received: from [160.91.88.155] (dyn091088155.dz.ornl.gov [160.91.88.155]) by emroute1.ornl.gov (PMDF V6.5-x6 #31890) with ESMTP id <0LIG00MFPMDJ0E@emroute1.ornl.gov>; Tue, 22 Mar 2011 08:51:20 -0400 (EDT) Date: Tue, 22 Mar 2011 08:51:19 -0400 From: David Dillow Subject: Re: IB: increase DMA max_segment_size on Mellanox hardware In-reply-to: <4D885748.6060600@mellanox.com> To: Or Gerlitz Cc: linux-rdma@vger.kernel.org, Roland Dreier , Eli Cohen Message-id: <1300798279.21813.6.camel@lap75545.ornl.gov> Organization: Oak Ridge National Laboratory MIME-version: 1.0 X-Mailer: Evolution 2.32.2 (2.32.2-1.fc14) Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 8BIT References: <1295230184.2574.26.camel@obelisk.thedillows.org> <4D885748.6060600@mellanox.com> 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.6 (demeter1.kernel.org [140.211.167.41]); Tue, 22 Mar 2011 12:51:27 +0000 (UTC) diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index 8a40cd5..f24b79b 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c @@ -1043,6 +1043,9 @@ static int __mthca_init_one(struct pci_dev *pdev, int hca_type) } } + /* We can handle large RDMA requests, so allow larger segments. */ + dma_set_max_seg_size(&pdev->dev, 1024 * 1024 * 1024); + mdev = (struct mthca_dev *) ib_alloc_device(sizeof *mdev); if (!mdev) { dev_err(&pdev->dev, "Device struct alloc failed, " diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index 2765a3c..c835011 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c @@ -1109,6 +1109,9 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id) } } + /* Allow large DMA segments, up to the firmware limit of 1 GB */ + dma_set_max_seg_size(&pdev->dev, 1024 * 1024 * 1024); + priv = kzalloc(sizeof *priv, GFP_KERNEL); if (!priv) { dev_err(&pdev->dev, "Device struct alloc failed, "