[PATCH 7/7] scsi/qla4xxx: Update qla4xxx_ep_connect to accept iface and sockaddr_storage.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <robert@xxxxxxxxxxxxx>
---
 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;
 }
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux