From patchwork Tue Jun 6 18:07:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert LeBlanc X-Patchwork-Id: 9769509 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C2D1D60353 for ; Tue, 6 Jun 2017 18:09:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2DC926E39 for ; Tue, 6 Jun 2017 18:09:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7A0927F9A; Tue, 6 Jun 2017 18:09:42 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 6030926E39 for ; Tue, 6 Jun 2017 18:09:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751812AbdFFSJK (ORCPT ); Tue, 6 Jun 2017 14:09:10 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36339 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751598AbdFFSHc (ORCPT ); Tue, 6 Jun 2017 14:07:32 -0400 Received: by mail-pf0-f194.google.com with SMTP id y7so6456704pfd.3 for ; Tue, 06 Jun 2017 11:07:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leblancnet-us.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kt2MJX8Sm4e1aulvBMVK6ISeOfkPKHLIbOdANAl8W/E=; b=STGSwMvigIjTih6yqStop4KMCskasiPbz/2mwGuJ5F6mMxxi8zhspS/T2GZKxgkgkQ 9oXWNj09k+pROktr7HD6J3r0Vj6LZvQ5y3fPvcGNEDMoZy3KDBGgLAUPfBdDJT/f9n6q Ufqti1HwLx5LAYScwX7UE1tWWa6aRQbYzMsVbrCkAJ7I5SIdTexeGeZ2cxDDeQRqPPlI UxpVrIe7kHo0joSspLy28sid2uaE1eTe/XmnWNITr/X91TPmi3HeOjy/F6i8roWUgy8S CFjosOm+kml3g1AS9x2IRFUdYgmCoudxyglhUpJoVMMPJlDz9s5tk0Qs1Zq0ghNNdItM 4rwQ== 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; bh=kt2MJX8Sm4e1aulvBMVK6ISeOfkPKHLIbOdANAl8W/E=; b=YUziPG/Dd+4Vzu2Sx4Mizq5uvjOcHHm1I7kyEnIS50kWSNpsJyrscNYlrWJzftzxQE HAi7CDdimHL23ohx9U/i/UXiiwwn/aeNatFC3LWcKuCZZm293Zzuk8IFnW8Qg2w96r3S HzZUaZfU27Du1G+1e7DCXc2Lk0GpYs0E/LJLcr23puTqgE1ZTcwQsFG2mPT+LtXD0+Gb Z/xCiBkZ8hQRFT8Yrm43Xrre1JvCjQYZTIZ/7vvYogPZRNJiakgoX/+arBzOTZCkx3Mh 7nCrhRMIIPnmuihdg7HPlBgqzBmWmFyFY84gbHHov92YntquUgQ6aKYtACRvU9M+lU7C JMCw== X-Gm-Message-State: AODbwcBrWxbqSgeedBGqgzOKYaeOsk3O3HnFBRVlE5s/u3CmpP/0sBOc ftGXTH/PdVa+KERF X-Received: by 10.84.217.141 with SMTP id p13mr22776411pli.271.1496772451264; Tue, 06 Jun 2017 11:07:31 -0700 (PDT) Received: from rleblanc-pc ([2604:ba00:2:1:1043:d22c:d907:91b1]) by smtp.gmail.com with ESMTPSA id 6sm16305878pfh.57.2017.06.06.11.07.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Jun 2017 11:07:29 -0700 (PDT) Received: from rleblanc by rleblanc-pc with local (Exim 4.89) (envelope-from ) id 1dIIt6-0001Jm-AE; Tue, 06 Jun 2017 12:07:28 -0600 From: Robert LeBlanc To: lduncan@suse.com Cc: cleech@redhat.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, ogerlitz@mellanox.com, sagi@grimberg.me, roid@mellanox.com, dledford@redhat.com, sean.hefty@intel.com, hal.rosenstock@gmail.com, linux-rdma@vger.kernel.org, subbu.seetharaman@broadcom.com, ketan.mukadam@broadcom.com, jitendra.bhivare@broadcom.com, QLogic-Storage-Upstream@qlogic.com, varun@chelsio.com, Robert LeBlanc Subject: [PATCH 4/7] scsi/be2iscsi: Update beiscsi_ep_connect to accept iface and sockaddr_storage. Date: Tue, 6 Jun 2017 12:07:14 -0600 Message-Id: <20170606180717.5007-5-robert@leblancnet.us> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170606180717.5007-1-robert@leblancnet.us> References: <20170606180717.5007-1-robert@leblancnet.us> 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 Update Emulex BladeEngine driver to accept the session iface for creating the iSCSI connection. Also accept dst_addr as sockaddr_storage instead of sockaddr. Signed-off-by: Robert LeBlanc --- drivers/scsi/be2iscsi/be_cmds.c | 1 + drivers/scsi/be2iscsi/be_iscsi.c | 8 +++++--- drivers/scsi/be2iscsi/be_iscsi.h | 5 +++-- drivers/scsi/be2iscsi/be_main.c | 1 + drivers/scsi/be2iscsi/be_mgmt.c | 1 + 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c index a79a5e72c777..6617f2add9c6 100644 --- a/drivers/scsi/be2iscsi/be_cmds.c +++ b/drivers/scsi/be2iscsi/be_cmds.c @@ -13,6 +13,7 @@ */ #include +#include #include "be_main.h" #include "be.h" diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c index 97dca4681784..90adf20dc373 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.c +++ b/drivers/scsi/be2iscsi/be_iscsi.c @@ -12,6 +12,7 @@ * */ +#include #include #include #include @@ -1161,8 +1162,8 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep, * This routines first asks chip to create a connection and then allocates an EP */ struct iscsi_endpoint * -beiscsi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr, - int non_blocking) +beiscsi_ep_connect(struct Scsi_Host *shost, struct sockaddr_storage *dst_addr, + int non_blocking, struct iface_rec *iface) { struct beiscsi_hba *phba; struct beiscsi_endpoint *beiscsi_ep; @@ -1198,7 +1199,8 @@ beiscsi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr, beiscsi_ep = ep->dd_data; beiscsi_ep->phba = phba; beiscsi_ep->openiscsi_ep = ep; - ret = beiscsi_open_conn(ep, NULL, dst_addr, non_blocking); + ret = beiscsi_open_conn(ep, NULL, (struct sockaddr *)dst_addr, + non_blocking); if (ret) { beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG, "BS_%d : Failed in beiscsi_open_conn\n"); diff --git a/drivers/scsi/be2iscsi/be_iscsi.h b/drivers/scsi/be2iscsi/be_iscsi.h index b9d459a21f25..68616f81a12f 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.h +++ b/drivers/scsi/be2iscsi/be_iscsi.h @@ -68,8 +68,9 @@ int beiscsi_set_param(struct iscsi_cls_conn *cls_conn, int beiscsi_conn_start(struct iscsi_cls_conn *cls_conn); struct iscsi_endpoint *beiscsi_ep_connect(struct Scsi_Host *shost, - struct sockaddr *dst_addr, - int non_blocking); + struct sockaddr_storage *dst_addr, + int non_blocking, + struct iface_rec *iface); int beiscsi_ep_poll(struct iscsi_endpoint *ep, int timeout_ms); diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index f862332261f8..aab7772e2678 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c index c73775368d09..926afa4ddb9d 100644 --- a/drivers/scsi/be2iscsi/be_mgmt.c +++ b/drivers/scsi/be2iscsi/be_mgmt.c @@ -13,6 +13,7 @@ */ #include +#include #include #include #include "be_mgmt.h"