[PATCH 2/7] scsi/scsi_transport_iscsi: Update ep_connect to include iface.

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

 



Update the ep_connect function to include the iface in the parameters
passed to the driver. Since we have to make a change, also change the
dst_addr to sockaddr_storage so that it is future proof and a static
size.

Signed-off-by: Robert LeBlanc <robert@xxxxxxxxxxxxx>
---
 drivers/scsi/scsi_transport_iscsi.c | 9 ++++++---
 include/scsi/scsi_transport_iscsi.h | 5 +++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index a424eaeafeb0..64157a1d62e6 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -34,6 +34,7 @@
 #include <scsi/iscsi_if.h>
 #include <scsi/scsi_cmnd.h>
 #include <scsi/scsi_bsg_iscsi.h>
+#include <linux/inet.h>
 
 #define ISCSI_TRANSPORT_VERSION "2.0-870"
 
@@ -2794,7 +2795,8 @@ static int iscsi_if_ep_connect(struct iscsi_transport *transport,
 			       struct iscsi_uevent *ev, int msg_type)
 {
 	struct iscsi_endpoint *ep;
-	struct sockaddr *dst_addr;
+	struct sockaddr_storage *dst_addr;
+	struct iface_rec *iface;
 	struct Scsi_Host *shost = NULL;
 	int non_blocking, err = 0;
 
@@ -2813,8 +2815,9 @@ static int iscsi_if_ep_connect(struct iscsi_transport *transport,
 	} else
 		non_blocking = ev->u.ep_connect.non_blocking;
 
-	dst_addr = (struct sockaddr *)((char*)ev + sizeof(*ev));
-	ep = transport->ep_connect(shost, dst_addr, non_blocking);
+	dst_addr = (struct sockaddr_storage *)((char*)ev + sizeof(*ev));
+	iface = (struct iface_rec *)((char*)ev + sizeof(*ev) + sizeof(*dst_addr));
+	ep = transport->ep_connect(shost, dst_addr, non_blocking, iface);
 	if (IS_ERR(ep)) {
 		err = PTR_ERR(ep);
 		goto release_host;
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index 26fe284daf9a..c146e90e912b 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -133,8 +133,9 @@ struct iscsi_transport {
 
 	void (*session_recovery_timedout) (struct iscsi_cls_session *session);
 	struct iscsi_endpoint *(*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 (*ep_poll) (struct iscsi_endpoint *ep, int timeout_ms);
 	void (*ep_disconnect) (struct iscsi_endpoint *ep);
 	int (*tgt_dscvr) (struct Scsi_Host *shost, enum iscsi_tgt_dscvr type,
-- 
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