From patchwork Wed Jan 29 11:46:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devesh Sharma X-Patchwork-Id: 3550881 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6F7E8C02DC for ; Wed, 29 Jan 2014 11:46:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 86A672018A for ; Wed, 29 Jan 2014 11:46:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9FEF32017E for ; Wed, 29 Jan 2014 11:46:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751144AbaA2Lqp (ORCPT ); Wed, 29 Jan 2014 06:46:45 -0500 Received: from cmexedge1.ext.emulex.com ([138.239.224.99]:16397 "EHLO CMEXEDGE1.ext.emulex.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750970AbaA2Lqo convert rfc822-to-8bit (ORCPT ); Wed, 29 Jan 2014 06:46:44 -0500 Received: from CMEXHTCAS1.ad.emulex.com (138.239.115.217) by CMEXEDGE1.ext.emulex.com (138.239.224.99) with Microsoft SMTP Server (TLS) id 14.3.174.1; Wed, 29 Jan 2014 03:47:03 -0800 Received: from CMEXMB1.ad.emulex.com ([169.254.1.130]) by CMEXHTCAS1.ad.emulex.com ([::1]) with mapi id 14.03.0174.001; Wed, 29 Jan 2014 03:46:43 -0800 From: Devesh Sharma To: Devesh Sharma , "linux-rdma@vger.kernel.org" CC: "roland@kernel.org" Subject: RE: [PATCH 2/2] RDMA/ocrdma: emulex NIC driver ABI version support Thread-Topic: [PATCH 2/2] RDMA/ocrdma: emulex NIC driver ABI version support Thread-Index: AQHO+JcCMJ/7w0YmxUK0pds5w5GS7Zqb3lcg Date: Wed, 29 Jan 2014 11:46:42 +0000 Message-ID: <1449bba3-64c3-465e-9a18-2915f3d45633@CMEXHTCAS1.ad.emulex.com> References: <1387001657-4096-1-git-send-email-devesh.sharma@emulex.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.226.193.57] MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Hi Roland, Please discard this patch. Due to IP based GID changes, this won't apply clean, We are planning to send you a new series of patches on for-next tree please use that instead. -Regards Devesh -----Original Message----- From: linux-rdma-owner@vger.kernel.org [mailto:linux-rdma-owner@vger.kernel.org] On Behalf Of devesh.sharma@emulex.com Sent: Saturday, December 14, 2013 11:44 AM To: linux-rdma@vger.kernel.org Cc: roland@kernel.org; Devesh Sharma Subject: [PATCH 2/2] RDMA/ocrdma: emulex NIC driver ABI version support From: Devesh Sharma Emulex NIC driver support for ABI version support in be_roce.c Signed-off-by: Devesh Sharma --- drivers/net/ethernet/emulex/benet/be_roce.c | 6 ++++++ drivers/net/ethernet/emulex/benet/be_roce.h | 3 +++ 2 files changed, 9 insertions(+), 0 deletions(-) -- 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 -- 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/net/ethernet/emulex/benet/be_roce.c b/drivers/net/ethernet/emulex/benet/be_roce.c index 9cd5415..aa7f943 100644 --- a/drivers/net/ethernet/emulex/benet/be_roce.c +++ b/drivers/net/ethernet/emulex/benet/be_roce.c @@ -35,6 +35,12 @@ static void _be_roce_dev_add(struct be_adapter *adapter) if (!ocrdma_drv) return; + + if (ocrdma_drv->be_abi_version != BE_ROCE_ABI_VERSION) { + dev_warn(&pdev->dev, "Cannot initialize RoCE due to ocrdma ABI mismatch\n"); + return; + } + if (pdev->device == OC_DEVICE_ID5) { /* only msix is supported on these devices */ if (!msix_enabled(adapter)) diff --git a/drivers/net/ethernet/emulex/benet/be_roce.h b/drivers/net/ethernet/emulex/benet/be_roce.h index 2cd1129..1bfb161 100644 --- a/drivers/net/ethernet/emulex/benet/be_roce.h +++ b/drivers/net/ethernet/emulex/benet/be_roce.h @@ -21,6 +21,8 @@ #include #include +#define BE_ROCE_ABI_VERSION 1 + struct ocrdma_dev; enum be_interrupt_mode { @@ -52,6 +54,7 @@ struct be_dev_info { /* ocrdma driver register's the callback functions with nic driver. */ struct ocrdma_driver { unsigned char name[32]; + u32 be_abi_version; struct ocrdma_dev *(*add) (struct be_dev_info *dev_info); void (*remove) (struct ocrdma_dev *); void (*state_change_handler) (struct ocrdma_dev *, u32 new_state); -- 1.7.1