From patchwork Wed Jan 19 04:27:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Dillow X-Patchwork-Id: 488141 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 p0J50ubR026308 for ; Wed, 19 Jan 2011 05:01:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750879Ab1ASFBM (ORCPT ); Wed, 19 Jan 2011 00:01:12 -0500 Received: from emroute4.ornl.gov ([160.91.86.27]:64328 "EHLO emroute4.ornl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750751Ab1ASFBM (ORCPT ); Wed, 19 Jan 2011 00:01:12 -0500 Received: from emroute4.ornl.gov ([127.0.0.1]) by emroute4.ornl.gov (PMDF V6.5-x5 #31823) with ESMTP id <0LF900BAS5POBU@emroute4.ornl.gov> for linux-rdma@vger.kernel.org; Tue, 18 Jan 2011 23:27:25 -0500 (EST) Received: from CONVERSION-DAEMON.emroute4.ornl.gov by emroute4.ornl.gov (PMDF V6.5-x5 #31823) id <0LF900C015POX9@emroute4.ornl.gov> for linux-rdma@vger.kernel.org; Tue, 18 Jan 2011 23:27:24 -0500 (EST) Received: from lap75545.ornl.gov (lap75545.ornl.gov [160.91.210.54]) by emroute4.ornl.gov (PMDF V6.5-x5 #31823) with ESMTPS id <0LF900A9U5PONY@emroute4.ornl.gov> for linux-rdma@vger.kernel.org; Tue, 18 Jan 2011 23:27:24 -0500 (EST) Received: from lap75545.ornl.gov (localhost.localdomain [127.0.0.1]) by lap75545.ornl.gov (8.14.4/8.14.3) with ESMTP id p0J4ROKu026190 for ; Tue, 18 Jan 2011 23:27:24 -0500 Received: (from dad@localhost) by lap75545.ornl.gov (8.14.4/8.14.4/Submit) id p0J4ROPf026187 for linux-rdma@vger.kernel.org; Tue, 18 Jan 2011 23:27:24 -0500 Date: Tue, 18 Jan 2011 23:27:15 -0500 From: David Dillow Subject: [RFC 1/8] IB/srp: always avoid non-zero offsets into an FMR In-reply-to: <1295411242-26148-1-git-send-email-dillowda@ornl.gov> To: linux-rdma@vger.kernel.org Message-id: <1295411242-26148-2-git-send-email-dillowda@ornl.gov> X-Mailer: git-send-email 1.7.3.4 References: <1295411242-26148-1-git-send-email-dillowda@ornl.gov> 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]); Wed, 19 Jan 2011 05:01:14 +0000 (UTC) diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 83664ed..197e26c 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -72,12 +72,6 @@ module_param(topspin_workarounds, int, 0444); MODULE_PARM_DESC(topspin_workarounds, "Enable workarounds for Topspin/Cisco SRP target bugs if != 0"); -static int mellanox_workarounds = 1; - -module_param(mellanox_workarounds, int, 0444); -MODULE_PARM_DESC(mellanox_workarounds, - "Enable workarounds for Mellanox SRP target bugs if != 0"); - static void srp_add_one(struct ib_device *device); static void srp_remove_one(struct ib_device *device); static void srp_recv_completion(struct ib_cq *cq, void *target_ptr); @@ -114,14 +108,6 @@ static int srp_target_is_topspin(struct srp_target_port *target) !memcmp(&target->ioc_guid, cisco_oui, sizeof cisco_oui)); } -static int srp_target_is_mellanox(struct srp_target_port *target) -{ - static const u8 mellanox_oui[3] = { 0x00, 0x02, 0xc9 }; - - return mellanox_workarounds && - !memcmp(&target->ioc_guid, mellanox_oui, sizeof mellanox_oui); -} - static struct srp_iu *srp_alloc_iu(struct srp_host *host, size_t size, gfp_t gfp_mask, enum dma_data_direction direction) @@ -662,8 +648,7 @@ static int srp_map_fmr(struct srp_target_port *target, struct scatterlist *scat, if (!dev->fmr_pool) return -ENODEV; - if (srp_target_is_mellanox(target) && - (ib_sg_dma_address(ibdev, &scat[0]) & ~dev->fmr_page_mask)) + if (ib_sg_dma_address(ibdev, &scat[0]) & ~dev->fmr_page_mask) return -EINVAL; len = page_cnt = 0;