Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1659016 > unrolled thread

[PATCH 6/7] scsi/cxgbi: Update cxgbi_ep_connect to accept iface and sockaddr_storage.

Started byRobert LeBlanc <robert@leblancnet.us>
First post2017-06-06 20:10 +0200
Last post2017-06-06 20:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 6/7] scsi/cxgbi: Update cxgbi_ep_connect to accept iface and sockaddr_storage. Robert LeBlanc <robert@leblancnet.us> - 2017-06-06 20:10 +0200

#1659016 — [PATCH 6/7] scsi/cxgbi: Update cxgbi_ep_connect to accept iface and sockaddr_storage.

FromRobert LeBlanc <robert@leblancnet.us>
Date2017-06-06 20:10 +0200
Subject[PATCH 6/7] scsi/cxgbi: Update cxgbi_ep_connect to accept iface and sockaddr_storage.
Message-ID<tPr5w-3PW-31@gated-at.bofh.it>
Update Chelsio iSCSI 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 <robert@leblancnet.us>
---
 drivers/scsi/cxgbi/libcxgbi.c | 15 ++++++++-------
 drivers/scsi/cxgbi/libcxgbi.h |  2 +-
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index bd7d39ecbd24..62f62305be49 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -2499,8 +2499,9 @@ int cxgbi_get_host_param(struct Scsi_Host *shost, enum iscsi_host_param param,
 EXPORT_SYMBOL_GPL(cxgbi_get_host_param);
 
 struct iscsi_endpoint *cxgbi_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)
 {
 	struct iscsi_endpoint *ep;
 	struct cxgbi_endpoint *cep;
@@ -2520,15 +2521,15 @@ struct iscsi_endpoint *cxgbi_ep_connect(struct Scsi_Host *shost,
 		}
 	}
 
-	if (dst_addr->sa_family == AF_INET) {
-		csk = cxgbi_check_route(dst_addr);
+	if (dst_addr->ss_family == AF_INET) {
+		csk = cxgbi_check_route((struct sockaddr *)dst_addr);
 #if IS_ENABLED(CONFIG_IPV6)
-	} else if (dst_addr->sa_family == AF_INET6) {
-		csk = cxgbi_check_route6(dst_addr);
+	} else if (dst_addr->ss_family == AF_INET6) {
+		csk = cxgbi_check_route6((struct sockaddr *)dst_addr);
 #endif
 	} else {
 		pr_info("address family 0x%x NOT supported.\n",
-			dst_addr->sa_family);
+			dst_addr->ss_family);
 		err = -EAFNOSUPPORT;
 		return (struct iscsi_endpoint *)ERR_PTR(err);
 	}
diff --git a/drivers/scsi/cxgbi/libcxgbi.h b/drivers/scsi/cxgbi/libcxgbi.h
index 18e0ea83d361..e2e0c4dc7abc 100644
--- a/drivers/scsi/cxgbi/libcxgbi.h
+++ b/drivers/scsi/cxgbi/libcxgbi.h
@@ -596,7 +596,7 @@ int cxgbi_set_host_param(struct Scsi_Host *,
 			enum iscsi_host_param, char *, int);
 int cxgbi_get_host_param(struct Scsi_Host *, enum iscsi_host_param, char *);
 struct iscsi_endpoint *cxgbi_ep_connect(struct Scsi_Host *,
-			struct sockaddr *, int);
+			struct sockaddr_storage *, int, struct iface_rec *);
 int cxgbi_ep_poll(struct iscsi_endpoint *, int);
 void cxgbi_ep_disconnect(struct iscsi_endpoint *);
 
-- 
2.11.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web