From patchwork Tue Jun 6 18:07:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert LeBlanc X-Patchwork-Id: 9769473 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 9AAC060353 for ; Tue, 6 Jun 2017 18:08:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99200284EE for ; Tue, 6 Jun 2017 18:08:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8DBAD28503; Tue, 6 Jun 2017 18:08:29 +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 3B820284EE for ; Tue, 6 Jun 2017 18:08:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751691AbdFFSIF (ORCPT ); Tue, 6 Jun 2017 14:08:05 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:33538 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751670AbdFFSHe (ORCPT ); Tue, 6 Jun 2017 14:07:34 -0400 Received: by mail-pg0-f65.google.com with SMTP id a70so5387603pge.0 for ; Tue, 06 Jun 2017 11:07:33 -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=KHp3b/C/6JurgcJVTDi7LwF8q+M/bPLY+S8ZHR7+4Xc=; b=XtvYQIg7qFFwxHM6uQvS8l+EbYw+IYdf/2cst/8Kjo+1OvzE/sBEJcBq6IWf5JDgqJ 2TITRodvU8HT0wsgOophwLedjiRZeG/xrOzPDPC/kFHxZpL22cqWcscKW6m/TwslEaPA a3te03C8DMmBop/aFFMJev5fEJM0ARCDD346jQOCFUZzAV2uLX8Vc3CRpZHnoQhcE1Km ZoRzywKssx+ank0dJaoub66Vnvzt6bZD40rrbjErhUot99gHR56vyMHKILfr07cNMjjb j+WWas4xsVDjG8mNGHi69rS9Wm0hgenP/8mgp9i0dETFsKIdR0m1dGrvfsd0v4gz2KX7 QPnQ== 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=KHp3b/C/6JurgcJVTDi7LwF8q+M/bPLY+S8ZHR7+4Xc=; b=OQ9bZtdi1H8CwbzXg8SNFIEDQ9zCfHjsq+qNlbV9uERt7jMTerBkc3NJniEkAkdo7k 89SY+giPr+MqUxOHkiuRtu+uGdJ4IDOlPm86NiwyaUpsGlRTSLI2ncTfyT5oZPhYw+So RMm5+xCxFe+a/9VAM8x+wmyCtWLV8QVVCQMfpjCN+akSVHvOI934JQzQjRar2r+MgYdR fde59bAUmPLlgqeX2UmrUPcl9yWK3XtnNcRd+8dq64Rx/b4IIX3cFOb1q0zbQCkXxbkY CtNW++rsuIuk0/nXyFrKoNO4KXQ8OZnMQ+uycncKmvvC0H2QWz9P+GgNc8V3oleac34W IYsQ== X-Gm-Message-State: AODbwcAFldBlVuIaw4/50Ac8UkOK/ay19lN6Wj/K52GGOQ0J67jCV0Ce eeCyNaeHKvde8KJ3 X-Received: by 10.84.209.205 with SMTP id y71mr23265548plh.191.1496772453150; Tue, 06 Jun 2017 11:07:33 -0700 (PDT) Received: from rleblanc-pc ([2604:ba00:2:1:1043:d22c:d907:91b1]) by smtp.gmail.com with ESMTPSA id d75sm67331649pfj.75.2017.06.06.11.07.29 (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-0001Jy-FF; 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 7/7] scsi/qla4xxx: Update qla4xxx_ep_connect to accept iface and sockaddr_storage. Date: Tue, 6 Jun 2017 12:07:17 -0600 Message-Id: <20170606180717.5007-8-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 QLogic ISP4XXX and ISP82XX drivers 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/qla4xxx/ql4_os.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 64c6fa563fdb..4fccb580bd48 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -119,8 +119,9 @@ static int qla4xxx_get_iface_param(struct iscsi_iface *iface, int param, char *buf); static enum blk_eh_timer_return qla4xxx_eh_cmd_timed_out(struct scsi_cmnd *sc); static struct iscsi_endpoint *qla4xxx_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); static int qla4xxx_ep_poll(struct iscsi_endpoint *ep, int timeout_ms); static void qla4xxx_ep_disconnect(struct iscsi_endpoint *ep); static int qla4xxx_get_ep_param(struct iscsi_endpoint *ep, @@ -1656,8 +1657,8 @@ static int qla4xxx_get_iface_param(struct iscsi_iface *iface, } static struct iscsi_endpoint * -qla4xxx_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr, - int non_blocking) +qla4xxx_ep_connect(struct Scsi_Host *shost, struct sockaddr_storage *dst_addr, + int non_blocking, struct iface_rec *iface) { int ret; struct iscsi_endpoint *ep; @@ -1681,12 +1682,12 @@ qla4xxx_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr, qla_ep = ep->dd_data; memset(qla_ep, 0, sizeof(struct qla_endpoint)); - if (dst_addr->sa_family == AF_INET) { + if (dst_addr->ss_family == AF_INET) { memcpy(&qla_ep->dst_addr, dst_addr, sizeof(struct sockaddr_in)); addr = (struct sockaddr_in *)&qla_ep->dst_addr; DEBUG2(ql4_printk(KERN_INFO, ha, "%s: %pI4\n", __func__, (char *)&addr->sin_addr)); - } else if (dst_addr->sa_family == AF_INET6) { + } else if (dst_addr->ss_family == AF_INET6) { memcpy(&qla_ep->dst_addr, dst_addr, sizeof(struct sockaddr_in6)); addr6 = (struct sockaddr_in6 *)&qla_ep->dst_addr; @@ -6569,7 +6570,7 @@ static struct iscsi_endpoint *qla4xxx_get_ep_fwdb(struct scsi_qla_host *ha, addr->sin_port = htons(le16_to_cpu(fw_ddb_entry->port)); } - ep = qla4xxx_ep_connect(ha->host, (struct sockaddr *)dst_addr, 0); + ep = qla4xxx_ep_connect(ha->host, dst_addr, 0, NULL); vfree(dst_addr); return ep; }