From patchwork Mon Dec 10 14:32:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10721387 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5EF1913BF for ; Mon, 10 Dec 2018 14:33:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FC962A53B for ; Mon, 10 Dec 2018 14:33:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4384B2A9B3; Mon, 10 Dec 2018 14:33:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E72D42AA7C for ; Mon, 10 Dec 2018 14:33:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727990AbeLJOdc (ORCPT ); Mon, 10 Dec 2018 09:33:32 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:42440 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727999AbeLJOdc (ORCPT ); Mon, 10 Dec 2018 09:33:32 -0500 Received: by mail-wr1-f66.google.com with SMTP id q18so10696340wrx.9 for ; Mon, 10 Dec 2018 06:33:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=g2FFcAiFViuiHiShiH+fAOZeER6O+66B0q7mHq2JeSw=; b=IahjRmzdc06+rfFO8IZl8eCYXAh01rS4f0LoAgf3B1TNo5MEIin7wFUz+CWPbA9i/J M32QOQPjzAsHIoSj+h3Qr/cYPIRbkKL3a3CWquI7HfaXFnwkTFOC8/IdCMi1QzcD8oLC okod3CZuUVQK85u0+AT0wQzM/yGAqxd6Ol4TJ54lA0U4pm5VNh2eHZiP/aIXoXDoBmKF 8snc5qYERaXj8jocIRyARVy8sSAjnQE7ZRP8Vs3UFaJk2jB5T4pHbVoOjWVqOgKyeM3z POsYaT8gTsnksxhzNY8M+wvBFH2IXbxfGqaCb4N50JAaWmXy1nLG4MPzLL8E4HgGr2iM pRBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=g2FFcAiFViuiHiShiH+fAOZeER6O+66B0q7mHq2JeSw=; b=rJ+3fI2hoVl5FffEUQkC23bgRRfHkQPgIfS9iL+1utLzE5sruylhY613TukPZdVzoN PEJiP2/iuQDkckr3HGnU+ky54xTYNbGyoPRG659tMP25tJicAKfxXbkW6p97pU6n9ynU WUWGPllvnoahwGgdYt6siAtU+JV8jdw8EIr1M/HON5ceM0Tmr66VGu4cmiGCxOZ/KVG7 fSMpgi0AS/uItsOAWaRuXCZpEgnsm2H7RSHrPcR02nXQpcPFxQsm+N5F6FpQbUJT6QMu Z9gVBI91EaIRSvi1s5201Lo1QF+fexO/4lNct0qFdLloAgeh9sWsAscRTat5BFfhGrRt dHdQ== X-Gm-Message-State: AA+aEWYJ9z324q9ylpauMLr2fDb/uTMath8CtHQeDTogxHouyrATLPxT X25m5M2U2nj0uf3TtjZa1tw= X-Google-Smtp-Source: AFSGD/VbvUEvTXCVh7I4WWz1khHk91JbNHlQQBhH51mscmxZV4L+gStuXOKxmnWEoe3eHZF+BUSE3g== X-Received: by 2002:a5d:6450:: with SMTP id d16mr10140991wrw.64.1544452410617; Mon, 10 Dec 2018 06:33:30 -0800 (PST) Received: from kheib-workstation.redhat.com ([192.116.94.216]) by smtp.gmail.com with ESMTPSA id p74sm14279172wmd.29.2018.12.10.06.33.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Dec 2018 06:33:30 -0800 (PST) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe Cc: linux-rdma@vger.kernel.org, kamalheib1@gmail.com Subject: [PATCH rdma-next v4 13/18] RDMA/qib: Initialize ib_device_ops struct Date: Mon, 10 Dec 2018 16:32:33 +0200 Message-Id: <20181210143238.10775-14-kamalheib1@gmail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181210143238.10775-1-kamalheib1@gmail.com> References: <20181210143238.10775-1-kamalheib1@gmail.com> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib --- drivers/infiniband/hw/qib/qib_verbs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_verbs.c b/drivers/infiniband/hw/qib/qib_verbs.c index 8914abdd7584..611a6b5ef83f 100644 --- a/drivers/infiniband/hw/qib/qib_verbs.c +++ b/drivers/infiniband/hw/qib/qib_verbs.c @@ -1493,6 +1493,11 @@ static void qib_fill_device_attr(struct qib_devdata *dd) dd->verbs_dev.rdi.wc_opcode = ib_qib_wc_opcode; } +static const struct ib_device_ops qib_dev_ops = { + .modify_device = qib_modify_device, + .process_mad = qib_process_mad, +}; + /** * qib_register_ib_device - register our device with the infiniband core * @dd: the device data structure @@ -1555,8 +1560,6 @@ int qib_register_ib_device(struct qib_devdata *dd) ibdev->node_guid = ppd->guid; ibdev->phys_port_cnt = dd->num_pports; ibdev->dev.parent = &dd->pcidev->dev; - ibdev->modify_device = qib_modify_device; - ibdev->process_mad = qib_process_mad; snprintf(ibdev->node_desc, sizeof(ibdev->node_desc), "Intel Infiniband HCA %s", init_utsname()->nodename); @@ -1624,6 +1627,7 @@ int qib_register_ib_device(struct qib_devdata *dd) } rdma_set_device_sysfs_group(&dd->verbs_dev.rdi.ibdev, &qib_attr_group); + ib_set_device_ops(ibdev, &qib_dev_ops); ret = rvt_register_device(&dd->verbs_dev.rdi, RDMA_DRIVER_QIB); if (ret) goto err_tx;