From patchwork Mon Dec 10 19:09:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10722287 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 8973D69B1 for ; Mon, 10 Dec 2018 19:10:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A7892A7EE for ; Mon, 10 Dec 2018 19:10:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EB682AD4E; Mon, 10 Dec 2018 19:10:51 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB 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 16B2D2A87C for ; Mon, 10 Dec 2018 19:10:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729249AbeLJTKu (ORCPT ); Mon, 10 Dec 2018 14:10:50 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:50492 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729269AbeLJTKk (ORCPT ); Mon, 10 Dec 2018 14:10:40 -0500 Received: by mail-wm1-f68.google.com with SMTP id n190so12188622wmd.0 for ; Mon, 10 Dec 2018 11:10:38 -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=EIadmlK8uOSzVNycNcIRSiqhj5q9xae6P+PuwpuYaB+SxIbhWSu+eBjWV8/2wa+JaG D1JBQJfo7TOYOIhPY6L34kT2vezg/+pB579YFG07LryCvcmiju4cuJTmrAeV21FEEsfz 5ZzuiML4McdStcTVVDJaRVpPBsyUZQI991FtPwua7qvTFAT5kLQeK797B8umEj0Os0bD sVNaZJ8qqeiqcwZMmTYLfziSSUfiq+QrWuY9ql9VaAkEVEyGA9AoiPXO+U+2ePKU3527 nO7gSleceokgqPHpWij43CxCzSXiofXVsGGpCvuiMPRzh9NCokXLnnYOOSlMH9ZGsCy0 Cepg== 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=gGU1nZhx2x4uWx6ceFf9EBcN6jh6lNKbnUeOkcRGfrlUYM+8MHKtOt1nh/voUliX2V zE0O9u2zvysa80D/MsHRTQE82AISwNhv/yFY4V9K8FAwyw+JW47kumava060o4wX1E3z jVBq6TRXyfTd6HjsShjPVNiGLTLmVM/TaMcR41RUrtHb7mD+LlCoFDwWCezhvAB0gXiA 6QK5Hd6J/2pWL1p0KsXQEJ1aaEUlIN+VWdjY6EUVa9GgvILTIPB+2gskVlHVtKKrwDD+ xXN28qRYHp8Hw8X35dMBlj4flpw2it6G40zYeVmNcQgnA3nRUOLQ+zjx0zC5P/TOpvrS 6q4g== X-Gm-Message-State: AA+aEWa2oSN+YEcoC67Q5V+vgtuCGT66ItCjqbGhWjoPLbTySuTSLw4E V2QZQJzVI4IHBiDiGMj7ej0P3EFf X-Google-Smtp-Source: AFSGD/V6dxN4y8z2ImT1FCucvdXQNO2NFwbiiPKjHly8cgFK1FHtVWRbm/pwR7S6dS2+Kzb2jv1nKg== X-Received: by 2002:a7b:cb96:: with SMTP id m22mr12172787wmi.39.1544469037557; Mon, 10 Dec 2018 11:10:37 -0800 (PST) Received: from kheib-workstation.redhat.com (bzq-109-64-38-215.red.bezeqint.net. [109.64.38.215]) by smtp.gmail.com with ESMTPSA id o5sm33847657wmg.25.2018.12.10.11.10.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Dec 2018 11:10:37 -0800 (PST) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe Cc: linux-rdma@vger.kernel.org, kamalheib1@gmail.com Subject: [PATCH rdma-next v5 15/20] RDMA/qib: Initialize ib_device_ops struct Date: Mon, 10 Dec 2018 21:09:43 +0200 Message-Id: <20181210190948.6892-16-kamalheib1@gmail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181210190948.6892-1-kamalheib1@gmail.com> References: <20181210190948.6892-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;