Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751825AbdFFSJM (ORCPT ); Tue, 6 Jun 2017 14:09:12 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36340 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751476AbdFFSHc (ORCPT ); Tue, 6 Jun 2017 14:07:32 -0400 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3476 Lines: 100 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" -- 2.11.0