Blame SOURCES/open-iscsi-2.0.874-7-iscsid-Changes-to-support-the-new-qedi-transport.patch

c487f3
From dc939e78d6dab78f3fcddfada581fa402604bb51 Mon Sep 17 00:00:00 2001
c487f3
From: Nilesh Javali <nilesh.javali@cavium.com>
c487f3
Date: Fri, 11 Nov 2016 08:17:50 +0200
c487f3
Subject: iscsid: Changes to support the new qedi transport
c487f3
c487f3
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
c487f3
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
c487f3
Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
c487f3
---
c487f3
 usr/initiator_common.c |  2 +-
c487f3
 usr/transport.c        | 13 +++++++++++++
c487f3
 usr/transport.h        |  1 +
c487f3
 3 files changed, 15 insertions(+), 1 deletion(-)
c487f3
c487f3
diff --git a/usr/initiator_common.c b/usr/initiator_common.c
c487f3
index 1d1d82251ad4..191e779bb942 100644
c487f3
--- a/usr/initiator_common.c
c487f3
+++ b/usr/initiator_common.c
c487f3
@@ -700,7 +700,7 @@ int iscsi_host_set_net_params(struct iface_rec *iface,
c487f3
 		netdev = hinfo.iface.netdev;
c487f3
 	}
c487f3
 
c487f3
-	if (net_ifup_netdev(netdev))
c487f3
+	if (!t->template->no_netdev && net_ifup_netdev(netdev))
c487f3
 		log_warning("Could not brining up netdev %s. Try running "
c487f3
 			    "'ifup %s' first if login fails.", netdev, netdev);
c487f3
 
c487f3
diff --git a/usr/transport.c b/usr/transport.c
c487f3
index 18b770464608..533ba30a8846 100644
c487f3
--- a/usr/transport.c
c487f3
+++ b/usr/transport.c
c487f3
@@ -114,6 +114,18 @@ struct iscsi_transport_template ocs = {
c487f3
 	.ep_disconnect	= ktransport_ep_disconnect,
c487f3
 };
c487f3
 
c487f3
+struct iscsi_transport_template qedi = {
c487f3
+	.name		= "qedi",
c487f3
+	.set_host_ip	= SET_HOST_IP_REQ,
c487f3
+	.use_boot_info	= 1,
c487f3
+	.bind_ep_required = 1,
c487f3
+	.no_netdev = 1,
c487f3
+	.ep_connect	= ktransport_ep_connect,
c487f3
+	.ep_poll	= ktransport_ep_poll,
c487f3
+	.ep_disconnect	= ktransport_ep_disconnect,
c487f3
+	.set_net_config = uip_broadcast_params,
c487f3
+};
c487f3
+
c487f3
 static struct iscsi_transport_template *iscsi_transport_templates[] = {
c487f3
 	&iscsi_tcp,
c487f3
 	&iscsi_iser,
c487f3
@@ -123,6 +135,7 @@ static struct iscsi_transport_template *iscsi_transport_templates[] = {
c487f3
 	&qla4xxx,
c487f3
 	&be2iscsi,
c487f3
 	&ocs,
c487f3
+	&qedi,
c487f3
 	NULL
c487f3
 };
c487f3
 
c487f3
diff --git a/usr/transport.h b/usr/transport.h
c487f3
index 4d3bdbff67f8..b67776b47288 100644
c487f3
--- a/usr/transport.h
c487f3
+++ b/usr/transport.h
c487f3
@@ -39,6 +39,7 @@ struct iscsi_transport_template {
c487f3
 	uint8_t set_host_ip;
c487f3
 	uint8_t use_boot_info;
c487f3
         uint8_t bind_ep_required;
c487f3
+	uint8_t no_netdev;
c487f3
 	int (*ep_connect) (struct iscsi_conn *conn, int non_blocking);
c487f3
 	int (*ep_poll) (struct iscsi_conn *conn, int timeout_ms);
c487f3
 	void (*ep_disconnect) (struct iscsi_conn *conn);
c487f3
-- 
c487f3
2.9.3
c487f3