From patchwork Mon Oct 12 09:26:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sagi Grimberg X-Patchwork-Id: 7373621 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 344029F302 for ; Mon, 12 Oct 2015 09:26:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 53EAC2058E for ; Mon, 12 Oct 2015 09:26:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 581A32055B for ; Mon, 12 Oct 2015 09:26:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751346AbbJLJ0M (ORCPT ); Mon, 12 Oct 2015 05:26:12 -0400 Received: from mail-lb0-f170.google.com ([209.85.217.170]:36410 "EHLO mail-lb0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750858AbbJLJ0M (ORCPT ); Mon, 12 Oct 2015 05:26:12 -0400 Received: by lbcao8 with SMTP id ao8so136969553lbc.3 for ; Mon, 12 Oct 2015 02:26:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=L4z1tFq7FWqSsGXHyyJXwOILzO/G9LjAWgNZ/lotpkI=; b=H8Bp15qcZTENUJXGJmzscHuNYzoUXZdKMyKmboW5Zx/7W8b32l7p8ALMwGzgMTEixK cjLX6rcPn1zprsDJT2t6ajQJS6Y00LHhV+zncyXBrC98/iCS/QDBAkEbkN3TBsAUlqow 4g3ZugbRzX5+az2TTb1Eldq3j15/xeUCitC32pw3+aDUV6p3ggLCz7+tVoccuy77la+R yxI2TsQ4NSpF+NlJYNF8ihBjjQiMnE2m3x+NAWAE8tjM0v0S8vNy2osCzc38xsFjUn47 Fh2NfQsOD7apnks/SAmSPawaSc2EF/LfWchO4bYEIwe3GAIvord30eCwi96qHDxVqJNp hMVw== X-Gm-Message-State: ALoCoQmLEQRYk6Umn1E/aN5+6gteSSv5ZbWrkZL1gbCu3Kze7cUvjF1BCdMz0+C9yJBuyZMIN7St X-Received: by 10.112.172.165 with SMTP id bd5mr11860955lbc.51.1444641970246; Mon, 12 Oct 2015 02:26:10 -0700 (PDT) Received: from [10.223.0.123] ([193.47.165.251]) by smtp.googlemail.com with ESMTPSA id ar7sm2690600lbc.24.2015.10.12.02.26.08 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Oct 2015 02:26:09 -0700 (PDT) Subject: Re: merge struct ib_device_attr into struct ib_device V2 To: Christoph Hellwig , linux-rdma@vger.kernel.org References: <1444633078-27166-1-git-send-email-hch@lst.de> From: Sagi Grimberg Message-ID: <561B7CAE.3040505@dev.mellanox.co.il> Date: Mon, 12 Oct 2015 12:26:06 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1444633078-27166-1-git-send-email-hch@lst.de> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 10/12/2015 9:57 AM, Christoph Hellwig wrote: > This patch gets rid of struct ib_device_attr and cleans up drivers nicely. > > It goes on top of my send_wr cleanups and the memory registration udpates > from Sagi. > > Changes since V1: > - rebased on top of the Sagi's latest reg_api.6 branch > Christoph, First go with this looks OK for mlx4. mlx5 needs the below incremental patch to be folded in. we need dev->ib_dev.max_pkeys set when get_port_caps() is called. --- -- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 67b979f..5b73322 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -1321,6 +1321,10 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) dev->mdev = mdev; + err = mlx5_ib_init_device_flags(&dev->ib_dev); + if (err) + goto err_dealloc; + err = get_port_caps(dev); if (err) goto err_dealloc; @@ -1433,10 +1437,6 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev) if (err) goto err_rsrc; - err = mlx5_ib_init_device_flags(&dev->ib_dev); - if (err) - goto err_rsrc; - err = ib_register_device(&dev->ib_dev, NULL); if (err) goto err_odp;