All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] qla4xxx: Updates for scsi "misc" branch
@ 2013-05-09 10:02 vikas.chaudhary
  2013-05-09 10:02 ` [PATCH 1/8] iscsi_transport: Remove net param enum numbers vikas.chaudhary
                   ` (8 more replies)
  0 siblings, 9 replies; 17+ messages in thread
From: vikas.chaudhary @ 2013-05-09 10:02 UTC (permalink / raw)
  To: jbottomley, michaelc
  Cc: linux-scsi, vikas.chaudhary, lalit.chandivade, ravi.anand

From: Vikas Chaudhary <vikas.chaudhary@qlogic.com>

James,

Following patches are to display additional iSCSI connection and session
parameters to sysfs as well allow setting and display of additional Network
parameter for iSCSI interface.

Please apply these patches to the scsi tree "misc" branch at your
earliest convenience.

Adheer Chandravanshi (3):
      scsi_transport_iscsi: Exporting new attrs for iscsi session and connection in sysfs
      libiscsi: Exporting new attrs for iscsi session and connection in sysfs
      qla4xxx: Exporting new attrs for iscsi session and connection in sysfs

Harish Zunjarrao (3):
      iscsi_transport: Remove net param enum numbers
      iscsi_transport: Additional parameters for net settings
      qla4xxx: Additional parameters for net settings

Manish Rangankar (1):
      qla4xxx: Add support to allow flashnode multi-session login.

Vikas Chaudhary (1):
      qla4xxx: Update driver version to 5.03.00-k10

Thanks,
Vikas.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/8] iscsi_transport: Remove net param enum numbers
  2013-05-09 10:02 [PATCH 0/8] qla4xxx: Updates for scsi "misc" branch vikas.chaudhary
@ 2013-05-09 10:02 ` vikas.chaudhary
  2013-05-09 10:02 ` [PATCH 2/8] iscsi_transport: Additional parameters for net settings vikas.chaudhary
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: vikas.chaudhary @ 2013-05-09 10:02 UTC (permalink / raw)
  To: jbottomley, michaelc
  Cc: linux-scsi, vikas.chaudhary, lalit.chandivade, ravi.anand,
	Harish Zunjarrao

From: Harish Zunjarrao <harish.zunjarrao@qlogic.com>

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 include/scsi/iscsi_if.h | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h
index fe7f06c..2bc5d1c 100644
--- a/include/scsi/iscsi_if.h
+++ b/include/scsi/iscsi_if.h
@@ -377,25 +377,25 @@ struct iscsi_path {
 /* iSCSI network params */
 enum iscsi_net_param {
 	ISCSI_NET_PARAM_IPV4_ADDR		= 1,
-	ISCSI_NET_PARAM_IPV4_SUBNET		= 2,
-	ISCSI_NET_PARAM_IPV4_GW			= 3,
-	ISCSI_NET_PARAM_IPV4_BOOTPROTO		= 4,
-	ISCSI_NET_PARAM_MAC			= 5,
-	ISCSI_NET_PARAM_IPV6_LINKLOCAL		= 6,
-	ISCSI_NET_PARAM_IPV6_ADDR		= 7,
-	ISCSI_NET_PARAM_IPV6_ROUTER		= 8,
-	ISCSI_NET_PARAM_IPV6_ADDR_AUTOCFG	= 9,
-	ISCSI_NET_PARAM_IPV6_LINKLOCAL_AUTOCFG	= 10,
-	ISCSI_NET_PARAM_IPV6_ROUTER_AUTOCFG	= 11,
-	ISCSI_NET_PARAM_IFACE_ENABLE		= 12,
-	ISCSI_NET_PARAM_VLAN_ID			= 13,
-	ISCSI_NET_PARAM_VLAN_PRIORITY		= 14,
-	ISCSI_NET_PARAM_VLAN_ENABLED		= 15,
-	ISCSI_NET_PARAM_VLAN_TAG		= 16,
-	ISCSI_NET_PARAM_IFACE_TYPE		= 17,
-	ISCSI_NET_PARAM_IFACE_NAME		= 18,
-	ISCSI_NET_PARAM_MTU			= 19,
-	ISCSI_NET_PARAM_PORT			= 20,
+	ISCSI_NET_PARAM_IPV4_SUBNET,
+	ISCSI_NET_PARAM_IPV4_GW,
+	ISCSI_NET_PARAM_IPV4_BOOTPROTO,
+	ISCSI_NET_PARAM_MAC,
+	ISCSI_NET_PARAM_IPV6_LINKLOCAL,
+	ISCSI_NET_PARAM_IPV6_ADDR,
+	ISCSI_NET_PARAM_IPV6_ROUTER,
+	ISCSI_NET_PARAM_IPV6_ADDR_AUTOCFG,
+	ISCSI_NET_PARAM_IPV6_LINKLOCAL_AUTOCFG,
+	ISCSI_NET_PARAM_IPV6_ROUTER_AUTOCFG,
+	ISCSI_NET_PARAM_IFACE_ENABLE,
+	ISCSI_NET_PARAM_VLAN_ID,
+	ISCSI_NET_PARAM_VLAN_PRIORITY,
+	ISCSI_NET_PARAM_VLAN_ENABLED,
+	ISCSI_NET_PARAM_VLAN_TAG,
+	ISCSI_NET_PARAM_IFACE_TYPE,
+	ISCSI_NET_PARAM_IFACE_NAME,
+	ISCSI_NET_PARAM_MTU,
+	ISCSI_NET_PARAM_PORT,
 };
 
 enum iscsi_conn_state {
-- 
1.8.2.GIT



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/8] iscsi_transport: Additional parameters for net settings
  2013-05-09 10:02 [PATCH 0/8] qla4xxx: Updates for scsi "misc" branch vikas.chaudhary
  2013-05-09 10:02 ` [PATCH 1/8] iscsi_transport: Remove net param enum numbers vikas.chaudhary
@ 2013-05-09 10:02 ` vikas.chaudhary
  2013-05-28  8:49   ` Mike Christie
  2013-05-09 10:02 ` [PATCH 3/8] qla4xxx: " vikas.chaudhary
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: vikas.chaudhary @ 2013-05-09 10:02 UTC (permalink / raw)
  To: jbottomley, michaelc
  Cc: linux-scsi, vikas.chaudhary, lalit.chandivade, ravi.anand,
	Harish Zunjarrao

From: Harish Zunjarrao <harish.zunjarrao@qlogic.com>

Added support to display and update additional network parameters
through iscsiadm

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 drivers/scsi/scsi_transport_iscsi.c | 331 +++++++++++++++++++++++++++++++++++-
 include/scsi/iscsi_if.h             |  78 +++++++++
 include/scsi/scsi_transport_iscsi.h |   3 +
 3 files changed, 411 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 133926b..315c8b6 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -306,11 +306,38 @@ show_##type##_##name(struct device *dev, struct device_attribute *attr,	\
 	iscsi_iface_attr_show(type, name, ISCSI_NET_PARAM, param)	\
 static ISCSI_IFACE_ATTR(type, name, S_IRUGO, show_##type##_##name, NULL);
 
-/* generic read only ipvi4 attribute */
+/* generic read only ipv4 attribute */
 iscsi_iface_net_attr(ipv4_iface, ipaddress, ISCSI_NET_PARAM_IPV4_ADDR);
 iscsi_iface_net_attr(ipv4_iface, gateway, ISCSI_NET_PARAM_IPV4_GW);
 iscsi_iface_net_attr(ipv4_iface, subnet, ISCSI_NET_PARAM_IPV4_SUBNET);
 iscsi_iface_net_attr(ipv4_iface, bootproto, ISCSI_NET_PARAM_IPV4_BOOTPROTO);
+iscsi_iface_net_attr(ipv4_iface, dhcp_dns_address_enabled,
+		     ISCSI_NET_PARAM_IPV4_DHCP_DNS_ADDR_EN);
+iscsi_iface_net_attr(ipv4_iface, dhcp_slp_da_info_enabled,
+		     ISCSI_NET_PARAM_IPV4_DHCP_SLP_DA_EN);
+iscsi_iface_net_attr(ipv4_iface, dhcp_req_isns_info_enabled,
+		     ISCSI_NET_PARAM_IPV4_DHCP_REQ_ISNS_INFO_EN);
+iscsi_iface_net_attr(ipv4_iface, tos_enabled, ISCSI_NET_PARAM_IPV4_TOS_EN);
+iscsi_iface_net_attr(ipv4_iface, tos, ISCSI_NET_PARAM_IPV4_TOS);
+iscsi_iface_net_attr(ipv4_iface, grat_arp_enabled,
+		     ISCSI_NET_PARAM_IPV4_GRAT_ARP_EN);
+iscsi_iface_net_attr(ipv4_iface, dhcp_alt_client_id_enabled,
+		     ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID_EN);
+iscsi_iface_net_attr(ipv4_iface, dhcp_alt_client_id,
+		     ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID);
+iscsi_iface_net_attr(ipv4_iface, dhcp_req_vendor_id_enabled,
+		     ISCSI_NET_PARAM_IPV4_DHCP_REQ_VENDOR_ID_EN);
+iscsi_iface_net_attr(ipv4_iface, dhcp_use_vendor_id_enabled,
+		     ISCSI_NET_PARAM_IPV4_DHCP_USE_VENDOR_ID_EN);
+iscsi_iface_net_attr(ipv4_iface, dhcp_vendor_id,
+		     ISCSI_NET_PARAM_IPV4_DHCP_VENDOR_ID);
+iscsi_iface_net_attr(ipv4_iface, dhcp_learn_iqn_enabled,
+		     ISCSI_NET_PARAM_IPV4_DHCP_LEARN_IQN_EN);
+iscsi_iface_net_attr(ipv4_iface, fragmentation_enabled,
+		     ISCSI_NET_PARAM_IPV4_FRAGMENT_EN);
+iscsi_iface_net_attr(ipv4_iface, incoming_forwarding_enabled,
+		     ISCSI_NET_PARAM_IPV4_IN_FORWARD_EN);
+iscsi_iface_net_attr(ipv4_iface, ttl, ISCSI_NET_PARAM_IPV4_TTL);
 
 /* generic read only ipv6 attribute */
 iscsi_iface_net_attr(ipv6_iface, ipaddress, ISCSI_NET_PARAM_IPV6_ADDR);
@@ -320,6 +347,27 @@ iscsi_iface_net_attr(ipv6_iface, ipaddr_autocfg,
 		     ISCSI_NET_PARAM_IPV6_ADDR_AUTOCFG);
 iscsi_iface_net_attr(ipv6_iface, link_local_autocfg,
 		     ISCSI_NET_PARAM_IPV6_LINKLOCAL_AUTOCFG);
+iscsi_iface_net_attr(ipv6_iface, link_local_state,
+		     ISCSI_NET_PARAM_IPV6_LINKLOCAL_STATE);
+iscsi_iface_net_attr(ipv6_iface, router_state,
+		     ISCSI_NET_PARAM_IPV6_ROUTER_STATE);
+iscsi_iface_net_attr(ipv6_iface, grat_neighbor_adv_enabled,
+		     ISCSI_NET_PARAM_IPV6_GRAT_NEIGHBOR_ADV_EN);
+iscsi_iface_net_attr(ipv6_iface, mld_enabled, ISCSI_NET_PARAM_IPV6_MLD_EN);
+iscsi_iface_net_attr(ipv6_iface, flow_label, ISCSI_NET_PARAM_IPV6_FLOW_LABEL);
+iscsi_iface_net_attr(ipv6_iface, traffic_class,
+		     ISCSI_NET_PARAM_IPV6_TRAFFIC_CLASS);
+iscsi_iface_net_attr(ipv6_iface, hop_limit, ISCSI_NET_PARAM_IPV6_HOP_LIMIT);
+iscsi_iface_net_attr(ipv6_iface, nd_reachable_tmo,
+		     ISCSI_NET_PARAM_IPV6_ND_REACHABLE_TMO);
+iscsi_iface_net_attr(ipv6_iface, nd_rexmit_time,
+		     ISCSI_NET_PARAM_IPV6_ND_REXMIT_TIME);
+iscsi_iface_net_attr(ipv6_iface, nd_stale_tmo,
+		     ISCSI_NET_PARAM_IPV6_ND_STALE_TMO);
+iscsi_iface_net_attr(ipv6_iface, dup_addr_det_cnt,
+		     ISCSI_NET_PARAM_IPV6_DUP_ADDR_DET_CNT);
+iscsi_iface_net_attr(ipv6_iface, router_adv_link_mtu,
+		     ISCSI_NET_PARAM_IPV6_RTR_ADV_LINK_MTU);
 
 /* common read only iface attribute */
 iscsi_iface_net_attr(iface, enabled, ISCSI_NET_PARAM_IFACE_ENABLE);
@@ -328,6 +376,51 @@ iscsi_iface_net_attr(iface, vlan_priority, ISCSI_NET_PARAM_VLAN_PRIORITY);
 iscsi_iface_net_attr(iface, vlan_enabled, ISCSI_NET_PARAM_VLAN_ENABLED);
 iscsi_iface_net_attr(iface, mtu, ISCSI_NET_PARAM_MTU);
 iscsi_iface_net_attr(iface, port, ISCSI_NET_PARAM_PORT);
+iscsi_iface_net_attr(iface, ipaddress_state, ISCSI_NET_PARAM_IPADDR_STATE);
+iscsi_iface_net_attr(iface, delayed_ack_enabled,
+		     ISCSI_NET_PARAM_DELAYED_ACK_EN);
+iscsi_iface_net_attr(iface, isns_enabled, ISCSI_NET_PARAM_ISNS_EN);
+iscsi_iface_net_attr(iface, isns_address, ISCSI_NET_PARAM_ISNS_ADDR);
+iscsi_iface_net_attr(iface, isns_port, ISCSI_NET_PARAM_ISNS_PORT);
+iscsi_iface_net_attr(iface, nagle_enabled, ISCSI_NET_PARAM_NAGLE_EN);
+iscsi_iface_net_attr(iface, tcp_window_scale_enabled,
+		     ISCSI_NET_PARAM_TCP_WIN_SCALE_EN);
+iscsi_iface_net_attr(iface, tcp_window_scale, ISCSI_NET_PARAM_TCP_WIN_SCALE);
+iscsi_iface_net_attr(iface, tcp_timer_scale, ISCSI_NET_PARAM_TCP_TIMER_SCALE);
+iscsi_iface_net_attr(iface, tcp_timestamp_enabled,
+		     ISCSI_NET_PARAM_TCP_TIMESTAMP_EN);
+iscsi_iface_net_attr(iface, cache_id, ISCSI_NET_PARAM_CACHE_ID);
+iscsi_iface_net_attr(iface, def_tmf_timeout, ISCSI_NET_PARAM_DEF_TMF_TMO);
+iscsi_iface_net_attr(iface, def_hdr_dgst_enabled,
+		     ISCSI_NET_PARAM_DEF_HDRDGST_EN);
+iscsi_iface_net_attr(iface, def_data_dgst_enabled,
+		     ISCSI_NET_PARAM_DEF_DATADGST_EN);
+iscsi_iface_net_attr(iface, def_immediate_data_enabled,
+		     ISCSI_NET_PARAM_DEF_IMM_DATA_EN);
+iscsi_iface_net_attr(iface, def_initial_r2t_enabled,
+		     ISCSI_NET_PARAM_DEF_INITIAL_R2T_EN);
+iscsi_iface_net_attr(iface, def_data_seq_inorder_enabled,
+		     ISCSI_NET_PARAM_DEF_DATASEQ_INORDER_EN);
+iscsi_iface_net_attr(iface, def_data_pdu_inorder_enabled,
+		     ISCSI_NET_PARAM_DEF_PDU_INORDER_EN);
+iscsi_iface_net_attr(iface, def_erl, ISCSI_NET_PARAM_DEF_ERL);
+iscsi_iface_net_attr(iface, def_max_recv_dlen,
+		     ISCSI_NET_PARAM_DEF_MAX_RECV_DLENGTH);
+iscsi_iface_net_attr(iface, def_first_burst, ISCSI_NET_PARAM_DEF_FIRST_BURST);
+iscsi_iface_net_attr(iface, def_max_r2t, ISCSI_NET_PARAM_DEF_MAX_R2T);
+iscsi_iface_net_attr(iface, def_max_burst, ISCSI_NET_PARAM_DEF_MAX_BURST);
+iscsi_iface_net_attr(iface, def_chap_auth_enabled,
+		     ISCSI_NET_PARAM_DEF_CHAP_AUTH_EN);
+iscsi_iface_net_attr(iface, def_bidi_chap_enabled,
+		     ISCSI_NET_PARAM_DEF_BIDI_CHAP_EN);
+iscsi_iface_net_attr(iface, def_strict_login_comp_enabled,
+		     ISCSI_NET_PARAM_DEF_STRICT_LOGIN_COMP_EN);
+iscsi_iface_net_attr(iface, def_discovery_auth_enabled,
+		     ISCSI_NET_PARAM_DEF_DISCOVERY_AUTH_EN);
+iscsi_iface_net_attr(iface, def_discovery_logout_enabled,
+		     ISCSI_NET_PARAM_DEF_DISCOVERY_LOGOUT_EN);
+iscsi_iface_net_attr(iface, def_iscsi_name, ISCSI_NET_PARAM_DEF_ISCSI_NAME);
+iscsi_iface_net_attr(iface, redirect_enabled, ISCSI_NET_PARAM_REDIRECT_EN);
 
 static umode_t iscsi_iface_attr_is_visible(struct kobject *kobj,
 					  struct attribute *attr, int i)
@@ -349,6 +442,66 @@ static umode_t iscsi_iface_attr_is_visible(struct kobject *kobj,
 		param = ISCSI_NET_PARAM_MTU;
 	else if (attr == &dev_attr_iface_port.attr)
 		param = ISCSI_NET_PARAM_PORT;
+	else if (attr == &dev_attr_iface_ipaddress_state.attr)
+		param = ISCSI_NET_PARAM_IPADDR_STATE;
+	else if (attr == &dev_attr_iface_delayed_ack_enabled.attr)
+		param = ISCSI_NET_PARAM_DELAYED_ACK_EN;
+	else if (attr == &dev_attr_iface_isns_enabled.attr)
+		param = ISCSI_NET_PARAM_ISNS_EN;
+	else if (attr == &dev_attr_iface_isns_address.attr)
+		param = ISCSI_NET_PARAM_ISNS_ADDR;
+	else if (attr == &dev_attr_iface_isns_port.attr)
+		param = ISCSI_NET_PARAM_ISNS_PORT;
+	else if (attr == &dev_attr_iface_nagle_enabled.attr)
+		param = ISCSI_NET_PARAM_NAGLE_EN;
+	else if (attr == &dev_attr_iface_tcp_window_scale_enabled.attr)
+		param = ISCSI_NET_PARAM_TCP_WIN_SCALE_EN;
+	else if (attr == &dev_attr_iface_tcp_window_scale.attr)
+		param = ISCSI_NET_PARAM_TCP_WIN_SCALE;
+	else if (attr == &dev_attr_iface_tcp_timer_scale.attr)
+		param = ISCSI_NET_PARAM_TCP_TIMER_SCALE;
+	else if (attr == &dev_attr_iface_tcp_timestamp_enabled.attr)
+		param = ISCSI_NET_PARAM_TCP_TIMESTAMP_EN;
+	else if (attr == &dev_attr_iface_cache_id.attr)
+		param = ISCSI_NET_PARAM_CACHE_ID;
+	else if (attr == &dev_attr_iface_def_tmf_timeout.attr)
+		param = ISCSI_NET_PARAM_DEF_TMF_TMO;
+	else if (attr == &dev_attr_iface_def_hdr_dgst_enabled.attr)
+		param = ISCSI_NET_PARAM_DEF_HDRDGST_EN;
+	else if (attr == &dev_attr_iface_def_data_dgst_enabled.attr)
+		param = ISCSI_NET_PARAM_DEF_DATADGST_EN;
+	else if (attr == &dev_attr_iface_def_immediate_data_enabled.attr)
+		param = ISCSI_NET_PARAM_DEF_IMM_DATA_EN;
+	else if (attr == &dev_attr_iface_def_initial_r2t_enabled.attr)
+		param = ISCSI_NET_PARAM_DEF_INITIAL_R2T_EN;
+	else if (attr == &dev_attr_iface_def_data_seq_inorder_enabled.attr)
+		param = ISCSI_NET_PARAM_DEF_DATASEQ_INORDER_EN;
+	else if (attr == &dev_attr_iface_def_data_pdu_inorder_enabled.attr)
+		param = ISCSI_NET_PARAM_DEF_PDU_INORDER_EN;
+	else if (attr == &dev_attr_iface_def_erl.attr)
+		param = ISCSI_NET_PARAM_DEF_ERL;
+	else if (attr == &dev_attr_iface_def_max_recv_dlen.attr)
+		param = ISCSI_NET_PARAM_DEF_MAX_RECV_DLENGTH;
+	else if (attr == &dev_attr_iface_def_first_burst.attr)
+		param = ISCSI_NET_PARAM_DEF_FIRST_BURST;
+	else if (attr == &dev_attr_iface_def_max_r2t.attr)
+		param = ISCSI_NET_PARAM_DEF_MAX_R2T;
+	else if (attr == &dev_attr_iface_def_max_burst.attr)
+		param = ISCSI_NET_PARAM_DEF_MAX_BURST;
+	else if (attr == &dev_attr_iface_def_chap_auth_enabled.attr)
+		param = ISCSI_NET_PARAM_DEF_CHAP_AUTH_EN;
+	else if (attr == &dev_attr_iface_def_bidi_chap_enabled.attr)
+		param = ISCSI_NET_PARAM_DEF_BIDI_CHAP_EN;
+	else if (attr == &dev_attr_iface_def_strict_login_comp_enabled.attr)
+		param = ISCSI_NET_PARAM_DEF_STRICT_LOGIN_COMP_EN;
+	else if (attr == &dev_attr_iface_def_discovery_auth_enabled.attr)
+		param = ISCSI_NET_PARAM_DEF_DISCOVERY_AUTH_EN;
+	else if (attr == &dev_attr_iface_def_discovery_logout_enabled.attr)
+		param = ISCSI_NET_PARAM_DEF_DISCOVERY_LOGOUT_EN;
+	else if (attr == &dev_attr_iface_def_iscsi_name.attr)
+		param = ISCSI_NET_PARAM_DEF_ISCSI_NAME;
+	else if (attr == &dev_attr_iface_redirect_enabled.attr)
+		param = ISCSI_NET_PARAM_REDIRECT_EN;
 	else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV4) {
 		if (attr == &dev_attr_ipv4_iface_ipaddress.attr)
 			param = ISCSI_NET_PARAM_IPV4_ADDR;
@@ -358,6 +511,45 @@ static umode_t iscsi_iface_attr_is_visible(struct kobject *kobj,
 			param = ISCSI_NET_PARAM_IPV4_SUBNET;
 		else if (attr == &dev_attr_ipv4_iface_bootproto.attr)
 			param = ISCSI_NET_PARAM_IPV4_BOOTPROTO;
+		else if (attr ==
+			 &dev_attr_ipv4_iface_dhcp_dns_address_enabled.attr)
+			param = ISCSI_NET_PARAM_IPV4_DHCP_DNS_ADDR_EN;
+		else if (attr ==
+			 &dev_attr_ipv4_iface_dhcp_slp_da_info_enabled.attr)
+			param = ISCSI_NET_PARAM_IPV4_DHCP_SLP_DA_EN;
+		else if (attr ==
+			 &dev_attr_ipv4_iface_dhcp_req_isns_info_enabled.attr)
+			param = ISCSI_NET_PARAM_IPV4_DHCP_REQ_ISNS_INFO_EN;
+		else if (attr == &dev_attr_ipv4_iface_tos_enabled.attr)
+			param = ISCSI_NET_PARAM_IPV4_TOS_EN;
+		else if (attr == &dev_attr_ipv4_iface_tos.attr)
+			param = ISCSI_NET_PARAM_IPV4_TOS;
+		else if (attr == &dev_attr_ipv4_iface_grat_arp_enabled.attr)
+			param = ISCSI_NET_PARAM_IPV4_GRAT_ARP_EN;
+		else if (attr ==
+			 &dev_attr_ipv4_iface_dhcp_alt_client_id_enabled.attr)
+			param = ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID_EN;
+		else if (attr == &dev_attr_ipv4_iface_dhcp_alt_client_id.attr)
+			param = ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID;
+		else if (attr ==
+			 &dev_attr_ipv4_iface_dhcp_req_vendor_id_enabled.attr)
+			param = ISCSI_NET_PARAM_IPV4_DHCP_REQ_VENDOR_ID_EN;
+		else if (attr ==
+			 &dev_attr_ipv4_iface_dhcp_use_vendor_id_enabled.attr)
+			param = ISCSI_NET_PARAM_IPV4_DHCP_USE_VENDOR_ID_EN;
+		else if (attr == &dev_attr_ipv4_iface_dhcp_vendor_id.attr)
+			param = ISCSI_NET_PARAM_IPV4_DHCP_VENDOR_ID;
+		else if (attr ==
+			 &dev_attr_ipv4_iface_dhcp_learn_iqn_enabled.attr)
+			param = ISCSI_NET_PARAM_IPV4_DHCP_LEARN_IQN_EN;
+		else if (attr ==
+			 &dev_attr_ipv4_iface_fragmentation_enabled.attr)
+			param = ISCSI_NET_PARAM_IPV4_FRAGMENT_EN;
+		else if (attr ==
+			 &dev_attr_ipv4_iface_incoming_forwarding_enabled.attr)
+			param = ISCSI_NET_PARAM_IPV4_IN_FORWARD_EN;
+		else if (attr == &dev_attr_ipv4_iface_ttl.attr)
+			param = ISCSI_NET_PARAM_IPV4_TTL;
 		else
 			return 0;
 	} else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV6) {
@@ -371,6 +563,31 @@ static umode_t iscsi_iface_attr_is_visible(struct kobject *kobj,
 			param = ISCSI_NET_PARAM_IPV6_ADDR_AUTOCFG;
 		else if (attr == &dev_attr_ipv6_iface_link_local_autocfg.attr)
 			param = ISCSI_NET_PARAM_IPV6_LINKLOCAL_AUTOCFG;
+		else if (attr == &dev_attr_ipv6_iface_link_local_state.attr)
+			param = ISCSI_NET_PARAM_IPV6_LINKLOCAL_STATE;
+		else if (attr == &dev_attr_ipv6_iface_router_state.attr)
+			param = ISCSI_NET_PARAM_IPV6_ROUTER_STATE;
+		else if (attr ==
+			 &dev_attr_ipv6_iface_grat_neighbor_adv_enabled.attr)
+			param = ISCSI_NET_PARAM_IPV6_GRAT_NEIGHBOR_ADV_EN;
+		else if (attr == &dev_attr_ipv6_iface_mld_enabled.attr)
+			param = ISCSI_NET_PARAM_IPV6_MLD_EN;
+		else if (attr == &dev_attr_ipv6_iface_flow_label.attr)
+			param = ISCSI_NET_PARAM_IPV6_FLOW_LABEL;
+		else if (attr == &dev_attr_ipv6_iface_traffic_class.attr)
+			param = ISCSI_NET_PARAM_IPV6_TRAFFIC_CLASS;
+		else if (attr == &dev_attr_ipv6_iface_hop_limit.attr)
+			param = ISCSI_NET_PARAM_IPV6_HOP_LIMIT;
+		else if (attr == &dev_attr_ipv6_iface_nd_reachable_tmo.attr)
+			param = ISCSI_NET_PARAM_IPV6_ND_REACHABLE_TMO;
+		else if (attr == &dev_attr_ipv6_iface_nd_rexmit_time.attr)
+			param = ISCSI_NET_PARAM_IPV6_ND_REXMIT_TIME;
+		else if (attr == &dev_attr_ipv6_iface_nd_stale_tmo.attr)
+			param = ISCSI_NET_PARAM_IPV6_ND_STALE_TMO;
+		else if (attr == &dev_attr_ipv6_iface_dup_addr_det_cnt.attr)
+			param = ISCSI_NET_PARAM_IPV6_DUP_ADDR_DET_CNT;
+		else if (attr == &dev_attr_ipv6_iface_router_adv_link_mtu.attr)
+			param = ISCSI_NET_PARAM_IPV6_RTR_ADV_LINK_MTU;
 		else
 			return 0;
 	} else {
@@ -397,6 +614,63 @@ static struct attribute *iscsi_iface_attrs[] = {
 	&dev_attr_ipv6_iface_link_local_autocfg.attr,
 	&dev_attr_iface_mtu.attr,
 	&dev_attr_iface_port.attr,
+	&dev_attr_iface_ipaddress_state.attr,
+	&dev_attr_iface_delayed_ack_enabled.attr,
+	&dev_attr_iface_isns_enabled.attr,
+	&dev_attr_iface_isns_address.attr,
+	&dev_attr_iface_isns_port.attr,
+	&dev_attr_iface_nagle_enabled.attr,
+	&dev_attr_iface_tcp_window_scale_enabled.attr,
+	&dev_attr_iface_tcp_window_scale.attr,
+	&dev_attr_iface_tcp_timer_scale.attr,
+	&dev_attr_iface_tcp_timestamp_enabled.attr,
+	&dev_attr_iface_cache_id.attr,
+	&dev_attr_ipv4_iface_dhcp_dns_address_enabled.attr,
+	&dev_attr_ipv4_iface_dhcp_slp_da_info_enabled.attr,
+	&dev_attr_ipv4_iface_dhcp_req_isns_info_enabled.attr,
+	&dev_attr_ipv4_iface_tos_enabled.attr,
+	&dev_attr_ipv4_iface_tos.attr,
+	&dev_attr_ipv4_iface_grat_arp_enabled.attr,
+	&dev_attr_ipv4_iface_dhcp_alt_client_id_enabled.attr,
+	&dev_attr_ipv4_iface_dhcp_alt_client_id.attr,
+	&dev_attr_ipv4_iface_dhcp_req_vendor_id_enabled.attr,
+	&dev_attr_ipv4_iface_dhcp_use_vendor_id_enabled.attr,
+	&dev_attr_ipv4_iface_dhcp_vendor_id.attr,
+	&dev_attr_ipv4_iface_dhcp_learn_iqn_enabled.attr,
+	&dev_attr_ipv4_iface_fragmentation_enabled.attr,
+	&dev_attr_ipv4_iface_incoming_forwarding_enabled.attr,
+	&dev_attr_ipv4_iface_ttl.attr,
+	&dev_attr_ipv6_iface_link_local_state.attr,
+	&dev_attr_ipv6_iface_router_state.attr,
+	&dev_attr_ipv6_iface_grat_neighbor_adv_enabled.attr,
+	&dev_attr_ipv6_iface_mld_enabled.attr,
+	&dev_attr_ipv6_iface_flow_label.attr,
+	&dev_attr_ipv6_iface_traffic_class.attr,
+	&dev_attr_ipv6_iface_hop_limit.attr,
+	&dev_attr_ipv6_iface_nd_reachable_tmo.attr,
+	&dev_attr_ipv6_iface_nd_rexmit_time.attr,
+	&dev_attr_ipv6_iface_nd_stale_tmo.attr,
+	&dev_attr_ipv6_iface_dup_addr_det_cnt.attr,
+	&dev_attr_ipv6_iface_router_adv_link_mtu.attr,
+	&dev_attr_iface_def_tmf_timeout.attr,
+	&dev_attr_iface_def_hdr_dgst_enabled.attr,
+	&dev_attr_iface_def_data_dgst_enabled.attr,
+	&dev_attr_iface_def_immediate_data_enabled.attr,
+	&dev_attr_iface_def_initial_r2t_enabled.attr,
+	&dev_attr_iface_def_data_seq_inorder_enabled.attr,
+	&dev_attr_iface_def_data_pdu_inorder_enabled.attr,
+	&dev_attr_iface_def_erl.attr,
+	&dev_attr_iface_def_max_recv_dlen.attr,
+	&dev_attr_iface_def_first_burst.attr,
+	&dev_attr_iface_def_max_r2t.attr,
+	&dev_attr_iface_def_max_burst.attr,
+	&dev_attr_iface_def_chap_auth_enabled.attr,
+	&dev_attr_iface_def_bidi_chap_enabled.attr,
+	&dev_attr_iface_def_strict_login_comp_enabled.attr,
+	&dev_attr_iface_def_discovery_auth_enabled.attr,
+	&dev_attr_iface_def_discovery_logout_enabled.attr,
+	&dev_attr_iface_def_iscsi_name.attr,
+	&dev_attr_iface_redirect_enabled.attr,
 	NULL,
 };
 
@@ -405,6 +679,61 @@ static struct attribute_group iscsi_iface_group = {
 	.is_visible = iscsi_iface_attr_is_visible,
 };
 
+/* convert iscsi_ipaddress_state values to ascii string name */
+static const struct {
+	enum iscsi_ipaddress_state	value;
+	char				*name;
+} iscsi_ipaddress_state_names[] = {
+	{ISCSI_IPDDRESS_STATE_UNCONFIGURED,	"Unconfigured" },
+	{ISCSI_IPDDRESS_STATE_ACQUIRING,	"Acquiring" },
+	{ISCSI_IPDDRESS_STATE_TENTATIVE,	"Tentative" },
+	{ISCSI_IPDDRESS_STATE_VALID,		"Valid" },
+	{ISCSI_IPDDRESS_STATE_DISABLING,	"Disabling" },
+	{ISCSI_IPDDRESS_STATE_INVALID,		"Invalid" },
+	{ISCSI_IPDDRESS_STATE_DEPRECATED,	"Deprecated" },
+};
+
+char *iscsi_get_ipaddress_state_name(enum iscsi_ipaddress_state port_state)
+{
+	int i;
+	char *state = NULL;
+
+	for (i = 0; i < ARRAY_SIZE(iscsi_ipaddress_state_names); i++) {
+		if (iscsi_ipaddress_state_names[i].value == port_state) {
+			state = iscsi_ipaddress_state_names[i].name;
+			break;
+		}
+	}
+	return state;
+}
+EXPORT_SYMBOL_GPL(iscsi_get_ipaddress_state_name);
+
+/* convert iscsi_router_state values to ascii string name */
+static const struct {
+	enum iscsi_router_state	value;
+	char			*name;
+} iscsi_router_state_names[] = {
+	{ISCSI_ROUTER_STATE_UNKNOWN,		"Unknown" },
+	{ISCSI_ROUTER_STATE_ADVERTISED,		"Advertised" },
+	{ISCSI_ROUTER_STATE_MANUAL,		"Manual" },
+	{ISCSI_ROUTER_STATE_STALE,		"Stale" },
+};
+
+char *iscsi_get_router_state_name(enum iscsi_router_state router_state)
+{
+	int i;
+	char *state = NULL;
+
+	for (i = 0; i < ARRAY_SIZE(iscsi_router_state_names); i++) {
+		if (iscsi_router_state_names[i].value & router_state) {
+			state = iscsi_router_state_names[i].name;
+			break;
+		}
+	}
+	return state;
+}
+EXPORT_SYMBOL_GPL(iscsi_get_router_state_name);
+
 struct iscsi_iface *
 iscsi_create_iface(struct Scsi_Host *shost, struct iscsi_transport *transport,
 		   uint32_t iface_type, uint32_t iface_num, int dd_size)
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h
index 2bc5d1c..c2ee3b3 100644
--- a/include/scsi/iscsi_if.h
+++ b/include/scsi/iscsi_if.h
@@ -374,6 +374,10 @@ struct iscsi_path {
 #define ISCSI_VLAN_DISABLE	0x01
 #define ISCSI_VLAN_ENABLE	0x02
 
+/* iscsi generic enable/disabled setting for various features */
+#define ISCSI_NET_PARAM_DISABLE		0x01
+#define ISCSI_NET_PARAM_ENABLE		0x02
+
 /* iSCSI network params */
 enum iscsi_net_param {
 	ISCSI_NET_PARAM_IPV4_ADDR		= 1,
@@ -396,6 +400,80 @@ enum iscsi_net_param {
 	ISCSI_NET_PARAM_IFACE_NAME,
 	ISCSI_NET_PARAM_MTU,
 	ISCSI_NET_PARAM_PORT,
+	ISCSI_NET_PARAM_IPADDR_STATE,
+	ISCSI_NET_PARAM_IPV6_LINKLOCAL_STATE,
+	ISCSI_NET_PARAM_IPV6_ROUTER_STATE,
+	ISCSI_NET_PARAM_DELAYED_ACK_EN,
+	ISCSI_NET_PARAM_ISNS_EN,
+	ISCSI_NET_PARAM_ISNS_ADDR,
+	ISCSI_NET_PARAM_ISNS_PORT,
+	ISCSI_NET_PARAM_NAGLE_EN,
+	ISCSI_NET_PARAM_TCP_WIN_SCALE_EN,
+	ISCSI_NET_PARAM_TCP_WIN_SCALE,
+	ISCSI_NET_PARAM_TCP_TIMER_SCALE,
+	ISCSI_NET_PARAM_TCP_TIMESTAMP_EN,
+	ISCSI_NET_PARAM_CACHE_ID,
+	ISCSI_NET_PARAM_IPV4_DHCP_DNS_ADDR_EN,
+	ISCSI_NET_PARAM_IPV4_DHCP_SLP_DA_EN,
+	ISCSI_NET_PARAM_IPV4_DHCP_REQ_ISNS_INFO_EN,
+	ISCSI_NET_PARAM_IPV4_TOS_EN,
+	ISCSI_NET_PARAM_IPV4_TOS,
+	ISCSI_NET_PARAM_IPV4_GRAT_ARP_EN,
+	ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID_EN,
+	ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID,
+	ISCSI_NET_PARAM_IPV4_DHCP_REQ_VENDOR_ID_EN,
+	ISCSI_NET_PARAM_IPV4_DHCP_USE_VENDOR_ID_EN,
+	ISCSI_NET_PARAM_IPV4_DHCP_VENDOR_ID,
+	ISCSI_NET_PARAM_IPV4_DHCP_LEARN_IQN_EN,
+	ISCSI_NET_PARAM_IPV4_FRAGMENT_EN,
+	ISCSI_NET_PARAM_IPV4_IN_FORWARD_EN,
+	ISCSI_NET_PARAM_IPV4_TTL,
+	ISCSI_NET_PARAM_IPV6_GRAT_NEIGHBOR_ADV_EN,
+	ISCSI_NET_PARAM_IPV6_MLD_EN,
+	ISCSI_NET_PARAM_IPV6_FLOW_LABEL,
+	ISCSI_NET_PARAM_IPV6_TRAFFIC_CLASS,
+	ISCSI_NET_PARAM_IPV6_HOP_LIMIT,
+	ISCSI_NET_PARAM_IPV6_ND_REACHABLE_TMO,
+	ISCSI_NET_PARAM_IPV6_ND_REXMIT_TIME,
+	ISCSI_NET_PARAM_IPV6_ND_STALE_TMO,
+	ISCSI_NET_PARAM_IPV6_DUP_ADDR_DET_CNT,
+	ISCSI_NET_PARAM_IPV6_RTR_ADV_LINK_MTU,
+	ISCSI_NET_PARAM_REDIRECT_EN,
+	ISCSI_NET_PARAM_DEF_TMF_TMO,
+	ISCSI_NET_PARAM_DEF_HDRDGST_EN,
+	ISCSI_NET_PARAM_DEF_DATADGST_EN,
+	ISCSI_NET_PARAM_DEF_IMM_DATA_EN,
+	ISCSI_NET_PARAM_DEF_INITIAL_R2T_EN,
+	ISCSI_NET_PARAM_DEF_DATASEQ_INORDER_EN,
+	ISCSI_NET_PARAM_DEF_PDU_INORDER_EN,
+	ISCSI_NET_PARAM_DEF_ERL,
+	ISCSI_NET_PARAM_DEF_MAX_RECV_DLENGTH,
+	ISCSI_NET_PARAM_DEF_FIRST_BURST,
+	ISCSI_NET_PARAM_DEF_MAX_R2T,
+	ISCSI_NET_PARAM_DEF_MAX_BURST,
+	ISCSI_NET_PARAM_DEF_CHAP_AUTH_EN,
+	ISCSI_NET_PARAM_DEF_BIDI_CHAP_EN,
+	ISCSI_NET_PARAM_DEF_STRICT_LOGIN_COMP_EN,
+	ISCSI_NET_PARAM_DEF_DISCOVERY_AUTH_EN,
+	ISCSI_NET_PARAM_DEF_DISCOVERY_LOGOUT_EN,
+	ISCSI_NET_PARAM_DEF_ISCSI_NAME,
+};
+
+enum iscsi_ipaddress_state {
+	ISCSI_IPDDRESS_STATE_UNCONFIGURED,
+	ISCSI_IPDDRESS_STATE_ACQUIRING,
+	ISCSI_IPDDRESS_STATE_TENTATIVE,
+	ISCSI_IPDDRESS_STATE_VALID,
+	ISCSI_IPDDRESS_STATE_DISABLING,
+	ISCSI_IPDDRESS_STATE_INVALID,
+	ISCSI_IPDDRESS_STATE_DEPRECATED,
+};
+
+enum iscsi_router_state {
+	ISCSI_ROUTER_STATE_UNKNOWN,
+	ISCSI_ROUTER_STATE_ADVERTISED,
+	ISCSI_ROUTER_STATE_MANUAL,
+	ISCSI_ROUTER_STATE_STALE,
 };
 
 enum iscsi_conn_state {
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index d0f1602..d6f2420 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -477,4 +477,7 @@ iscsi_find_flashnode_sess(struct Scsi_Host *shost, void *data,
 extern struct device *
 iscsi_find_flashnode_conn(struct iscsi_bus_flash_session *fnode_sess);
 
+extern char *
+iscsi_get_ipaddress_state_name(enum iscsi_ipaddress_state port_state);
+extern char *iscsi_get_router_state_name(enum iscsi_router_state router_state);
 #endif
-- 
1.8.2.GIT



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/8] qla4xxx: Additional parameters for net settings
  2013-05-09 10:02 [PATCH 0/8] qla4xxx: Updates for scsi "misc" branch vikas.chaudhary
  2013-05-09 10:02 ` [PATCH 1/8] iscsi_transport: Remove net param enum numbers vikas.chaudhary
  2013-05-09 10:02 ` [PATCH 2/8] iscsi_transport: Additional parameters for net settings vikas.chaudhary
@ 2013-05-09 10:02 ` vikas.chaudhary
  2013-05-09 10:02 ` [PATCH 4/8] scsi_transport_iscsi: Exporting new attrs for iscsi session and connection in sysfs vikas.chaudhary
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: vikas.chaudhary @ 2013-05-09 10:02 UTC (permalink / raw)
  To: jbottomley, michaelc
  Cc: linux-scsi, vikas.chaudhary, lalit.chandivade, ravi.anand,
	Harish Zunjarrao

From: Harish Zunjarrao <harish.zunjarrao@qlogic.com>

Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_def.h  |   31 ++
 drivers/scsi/qla4xxx/ql4_fw.h   |   53 +-
 drivers/scsi/qla4xxx/ql4_glbl.h |    1 +
 drivers/scsi/qla4xxx/ql4_isr.c  |   32 ++
 drivers/scsi/qla4xxx/ql4_mbx.c  |  119 ++++-
 drivers/scsi/qla4xxx/ql4_os.c   | 1057 +++++++++++++++++++++++++++++++++++++++
 6 files changed, 1283 insertions(+), 10 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
index ddf16a8..fcd4110 100644
--- a/drivers/scsi/qla4xxx/ql4_def.h
+++ b/drivers/scsi/qla4xxx/ql4_def.h
@@ -469,6 +469,37 @@ struct ipaddress_config {
 	uint16_t eth_mtu_size;
 	uint16_t ipv4_port;
 	uint16_t ipv6_port;
+	uint8_t control;
+	uint16_t ipv6_tcp_options;
+	uint8_t isns_addr[IP_ADDR_LEN];
+	uint16_t isns_port;
+	struct in6_addr ipv6_isns_addr;
+	uint8_t tcp_wsf;
+	uint8_t ipv6_tcp_wsf;
+	uint8_t ipv4_tos;
+	uint8_t ipv4_cache_id;
+	uint8_t ipv6_cache_id;
+	uint8_t ipv4_alt_cid_len;
+	uint8_t ipv4_alt_cid[11];
+	uint8_t ipv4_vid_len;
+	uint8_t ipv4_vid[11];
+	uint8_t ipv4_ttl;
+	uint16_t ipv6_flow_lbl;
+	uint8_t ipv6_traffic_class;
+	uint8_t ipv6_hop_limit;
+	uint32_t ipv6_nd_reach_time;
+	uint32_t ipv6_nd_rexmit_timer;
+	uint32_t ipv6_nd_stale_timeout;
+	uint8_t ipv6_dup_addr_detect_count;
+	uint32_t ipv6_gw_advrt_mtu;
+	uint16_t def_timeout;
+	uint8_t abort_timer;
+	uint16_t iscsi_options;
+	uint16_t iscsi_max_pdu_size;
+	uint16_t iscsi_fburst_len;
+	uint16_t iscsi_max_outstnd_r2t;
+	uint16_t iscsi_max_burst_len;
+	uint8_t iscsi_name[224];
 };
 
 #define QL4_CHAP_MAX_NAME_LEN 256
diff --git a/drivers/scsi/qla4xxx/ql4_fw.h b/drivers/scsi/qla4xxx/ql4_fw.h
index c7b8892..79c53eb 100644
--- a/drivers/scsi/qla4xxx/ql4_fw.h
+++ b/drivers/scsi/qla4xxx/ql4_fw.h
@@ -541,6 +541,7 @@ struct addr_ctrl_blk {
 #define  IFCB_VER_MIN			0x01
 #define  IFCB_VER_MAX			0x02
 	uint8_t control;	/* 01 */
+#define	 CTRLOPT_NEW_CONN_DISABLE	0x0002
 
 	uint16_t fw_options;	/* 02-03 */
 #define	 FWOPT_HEARTBEAT_ENABLE		  0x1000
@@ -572,11 +573,42 @@ struct addr_ctrl_blk {
 	uint32_t shdwreg_addr_hi;	/* 2C-2F */
 
 	uint16_t iscsi_opts;	/* 30-31 */
+#define ISCSIOPT_HEADER_DIGEST_ENABLE		0x2000
+#define ISCSIOPT_DATA_DIGEST_ENABLE		0x1000
+#define ISCSIOPT_IMMEDIATE_DATA_ENABLE		0x0800
+#define ISCSIOPT_INITIAL_R2T_ENABLE		0x0400
+#define ISCSIOPT_DATA_SEQ_INORDER_ENABLE	0x0200
+#define ISCSIOPT_DATA_PDU_INORDER_ENABLE	0x0100
+#define ISCSIOPT_CHAP_AUTH_ENABLE		0x0080
+#define ISCSIOPT_SNACK_ENABLE			0x0040
+#define ISCSIOPT_DISCOVERY_LOGOUT_ENABLE	0x0020
+#define ISCSIOPT_BIDI_CHAP_ENABLE		0x0010
+#define ISCSIOPT_DISCOVERY_AUTH_ENABLE		0x0008
+#define ISCSIOPT_STRICT_LOGIN_COMP_ENABLE	0x0004
+#define ISCSIOPT_ERR_RECOVERY_LEVEL_MASK	0x0003
 	uint16_t ipv4_tcp_opts;	/* 32-33 */
+#define TCPOPT_DELAYED_ACK_DISABLE	0x8000
+#define TCPOPT_ISNS_ENABLE		0x4000
 #define TCPOPT_DHCP_ENABLE		0x0200
+#define TCPOPT_DNS_SERVER_IP_ENABLE	0x0100
+#define TCPOPT_SLP_DA_INFO_ENABLE	0x0080
+#define TCPOPT_ISNS_INFO_ENABLE		0x0040
+#define TCPOPT_NAGLE_ALGO_DISABLE	0x0020
+#define TCPOPT_WINDOW_SCALE_DISABLE	0x0010
+#define TCPOPT_TIMER_SCALE		0x000E
+#define TCPOPT_TIMESTAMP_ENABLE		0x0001
 	uint16_t ipv4_ip_opts;	/* 34-35 */
 #define IPOPT_IPV4_PROTOCOL_ENABLE	0x8000
+#define IPOPT_IPV4_TOS_ENABLE		0x4000
 #define IPOPT_VLAN_TAGGING_ENABLE	0x2000
+#define IPOPT_GRAT_ARP_ENABLE		0x1000
+#define IPOPT_ALT_CID_ENABLE		0x0800
+#define IPOPT_REQ_VID_ENABLE		0x0400
+#define IPOPT_USE_VID_ENABLE		0x0200
+#define IPOPT_LEARN_IQN_ENABLE		0x0100
+#define IPOPT_FRAGMENTATION_DISABLE	0x0010
+#define IPOPT_INCOM_FORWARD_ENABLE	0x0008
+#define IPOPT_ARP_REDIRECT_ENABLE	0x0004
 
 	uint16_t iscsi_max_pdu_size;	/* 36-37 */
 	uint8_t ipv4_tos;	/* 38 */
@@ -619,7 +651,9 @@ struct addr_ctrl_blk {
 	uint8_t ipv4_sec_ip_addr[4];	/* D0-D3 */
 	uint8_t ipv4_dhcp_vid_len;	/* D4 */
 	uint8_t ipv4_dhcp_vid[11];	/* D5-DF */
-	uint8_t res11[20];	/* E0-F3 */
+	uint8_t ipv4_isns_addr[4];	/* E0-E3 */
+	uint16_t ipv4_isns_port;		/* E4-E5 */
+	uint8_t res11[14];	/* E6-F3 */
 	uint8_t ipv4_dhcp_alt_cid_len;	/* F4 */
 	uint8_t ipv4_dhcp_alt_cid[11];	/* F5-FF */
 	uint8_t iscsi_name[224];	/* 100-1DF */
@@ -627,15 +661,25 @@ struct addr_ctrl_blk {
 	uint32_t cookie;	/* 200-203 */
 	uint16_t ipv6_port;	/* 204-205 */
 	uint16_t ipv6_opts;	/* 206-207 */
-#define IPV6_OPT_IPV6_PROTOCOL_ENABLE	0x8000
-#define IPV6_OPT_VLAN_TAGGING_ENABLE	0x2000
+#define IPV6_OPT_IPV6_PROTOCOL_ENABLE		0x8000
+#define IPV6_OPT_VLAN_TAGGING_ENABLE		0x2000
+#define IPV6_OPT_GRAT_NEIGHBOR_ADV_ENABLE	0x1000
+#define IPV6_OPT_REDIRECT_ENABLE		0x0004
 
 	uint16_t ipv6_addtl_opts;	/* 208-209 */
+#define IPV6_ADDOPT_IGNORE_ICMP_ECHO_REQ		0x0040
+#define IPV6_ADDOPT_MLD_ENABLE				0x0004
 #define IPV6_ADDOPT_NEIGHBOR_DISCOVERY_ADDR_ENABLE	0x0002 /* Pri ACB
 								  Only */
 #define IPV6_ADDOPT_AUTOCONFIG_LINK_LOCAL_ADDR		0x0001
 
 	uint16_t ipv6_tcp_opts;	/* 20A-20B */
+#define IPV6_TCPOPT_DELAYED_ACK_DISABLE		0x8000
+#define IPV6_TCPOPT_ISNS_ENABLE			0x4000
+#define IPV6_TCPOPT_NAGLE_ALGO_DISABLE		0x0020
+#define IPV6_TCPOPT_WINDOW_SCALE_DISABLE	0x0010
+#define IPV6_TCPOPT_TIMER_SCALE			0x000E
+#define IPV6_TCPOPT_TIMESTAMP_ENABLE		0x0001
 	uint8_t ipv6_tcp_wsf;	/* 20C */
 	uint16_t ipv6_flow_lbl;	/* 20D-20F */
 	uint8_t ipv6_dflt_rtr_addr[16]; /* 210-21F */
@@ -667,7 +711,8 @@ struct addr_ctrl_blk {
 	uint32_t ipv6_nd_stale_timeout;	/* 258-25B */
 	uint8_t ipv6_dup_addr_detect_count;	/* 25C */
 	uint8_t ipv6_cache_id;	/* 25D */
-	uint8_t res13[18];	/* 25E-26F */
+	uint8_t res13[2];	/* 25E-25F */
+	uint8_t ipv6_isns_addr[16];	/* 260-26F */
 	uint32_t ipv6_gw_advrt_mtu;	/* 270-273 */
 	uint8_t res14[140];	/* 274-2FF */
 };
diff --git a/drivers/scsi/qla4xxx/ql4_glbl.h b/drivers/scsi/qla4xxx/ql4_glbl.h
index 4a42800..48d6b5d 100644
--- a/drivers/scsi/qla4xxx/ql4_glbl.h
+++ b/drivers/scsi/qla4xxx/ql4_glbl.h
@@ -266,6 +266,7 @@ int qla4xxx_get_default_ddb(struct scsi_qla_host *ha, uint32_t options,
 			    dma_addr_t dma_addr);
 int qla4xxx_get_uni_chap_at_index(struct scsi_qla_host *ha, char *username,
 				  char *password, uint16_t chap_index);
+uint8_t qla4xxx_set_ipaddr_state(uint8_t fw_ipaddr_state);
 
 extern int ql4xextended_error_logging;
 extern int ql4xdontresethba;
diff --git a/drivers/scsi/qla4xxx/ql4_isr.c b/drivers/scsi/qla4xxx/ql4_isr.c
index 482287f..6d94543 100644
--- a/drivers/scsi/qla4xxx/ql4_isr.c
+++ b/drivers/scsi/qla4xxx/ql4_isr.c
@@ -606,6 +606,36 @@ static int qla4_83xx_loopback_in_progress(struct scsi_qla_host *ha)
 	return rval;
 }
 
+static void qla4xxx_update_ipaddr_state(struct scsi_qla_host *ha,
+					uint32_t ipaddr_idx,
+					uint32_t ipaddr_fw_state)
+{
+	uint8_t ipaddr_state;
+	uint8_t ip_idx;
+
+	ip_idx = ipaddr_idx & 0xF;
+	ipaddr_state = qla4xxx_set_ipaddr_state((uint8_t)ipaddr_fw_state);
+
+	switch (ip_idx) {
+	case 0:
+		ha->ip_config.ipv4_addr_state = ipaddr_state;
+		break;
+	case 1:
+		ha->ip_config.ipv6_link_local_state = ipaddr_state;
+		break;
+	case 2:
+		ha->ip_config.ipv6_addr0_state = ipaddr_state;
+		break;
+	case 3:
+		ha->ip_config.ipv6_addr1_state = ipaddr_state;
+		break;
+	default:
+		ql4_printk(KERN_INFO, ha, "%s: Invalid IPADDR index %d\n",
+			   __func__, ip_idx);
+	}
+}
+
+
 /**
  * qla4xxx_isr_decode_mailbox - decodes mailbox status
  * @ha: Pointer to host adapter structure.
@@ -740,6 +770,8 @@ static void qla4xxx_isr_decode_mailbox(struct scsi_qla_host * ha,
 			    "mbox_sts[3]=%04x\n", ha->host_no, mbox_sts[0],
 			    mbox_sts[2], mbox_sts[3]);
 
+			qla4xxx_update_ipaddr_state(ha, mbox_sts[5],
+						    mbox_sts[3]);
 			/* mbox_sts[2] = Old ACB state
 			 * mbox_sts[3] = new ACB state */
 			if ((mbox_sts[3] == ACB_STATE_VALID) &&
diff --git a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c
index a501bea..1f7909e 100644
--- a/drivers/scsi/qla4xxx/ql4_mbx.c
+++ b/drivers/scsi/qla4xxx/ql4_mbx.c
@@ -417,6 +417,38 @@ qla4xxx_get_ifcb(struct scsi_qla_host *ha, uint32_t *mbox_cmd,
 	return QLA_SUCCESS;
 }
 
+uint8_t qla4xxx_set_ipaddr_state(uint8_t fw_ipaddr_state)
+{
+	uint8_t ipaddr_state;
+
+	switch (fw_ipaddr_state) {
+	case IP_ADDRSTATE_UNCONFIGURED:
+		ipaddr_state = ISCSI_IPDDRESS_STATE_UNCONFIGURED;
+		break;
+	case IP_ADDRSTATE_INVALID:
+		ipaddr_state = ISCSI_IPDDRESS_STATE_INVALID;
+		break;
+	case IP_ADDRSTATE_ACQUIRING:
+		ipaddr_state = ISCSI_IPDDRESS_STATE_ACQUIRING;
+		break;
+	case IP_ADDRSTATE_TENTATIVE:
+		ipaddr_state = ISCSI_IPDDRESS_STATE_TENTATIVE;
+		break;
+	case IP_ADDRSTATE_DEPRICATED:
+		ipaddr_state = ISCSI_IPDDRESS_STATE_DEPRECATED;
+		break;
+	case IP_ADDRSTATE_PREFERRED:
+		ipaddr_state = ISCSI_IPDDRESS_STATE_VALID;
+		break;
+	case IP_ADDRSTATE_DISABLING:
+		ipaddr_state = ISCSI_IPDDRESS_STATE_DISABLING;
+		break;
+	default:
+		ipaddr_state = ISCSI_IPDDRESS_STATE_UNCONFIGURED;
+	}
+	return ipaddr_state;
+}
+
 static void
 qla4xxx_update_local_ip(struct scsi_qla_host *ha,
 			struct addr_ctrl_blk *init_fw_cb)
@@ -424,7 +456,7 @@ qla4xxx_update_local_ip(struct scsi_qla_host *ha,
 	ha->ip_config.tcp_options = le16_to_cpu(init_fw_cb->ipv4_tcp_opts);
 	ha->ip_config.ipv4_options = le16_to_cpu(init_fw_cb->ipv4_ip_opts);
 	ha->ip_config.ipv4_addr_state =
-				le16_to_cpu(init_fw_cb->ipv4_addr_state);
+			qla4xxx_set_ipaddr_state(init_fw_cb->ipv4_addr_state);
 	ha->ip_config.eth_mtu_size =
 				le16_to_cpu(init_fw_cb->eth_mtu_size);
 	ha->ip_config.ipv4_port = le16_to_cpu(init_fw_cb->ipv4_port);
@@ -433,6 +465,8 @@ qla4xxx_update_local_ip(struct scsi_qla_host *ha,
 		ha->ip_config.ipv6_options = le16_to_cpu(init_fw_cb->ipv6_opts);
 		ha->ip_config.ipv6_addl_options =
 				le16_to_cpu(init_fw_cb->ipv6_addtl_opts);
+		ha->ip_config.ipv6_tcp_options =
+				le16_to_cpu(init_fw_cb->ipv6_tcp_opts);
 	}
 
 	/* Save IPv4 Address Info */
@@ -447,17 +481,69 @@ qla4xxx_update_local_ip(struct scsi_qla_host *ha,
 		   sizeof(init_fw_cb->ipv4_gw_addr)));
 
 	ha->ip_config.ipv4_vlan_tag = be16_to_cpu(init_fw_cb->ipv4_vlan_tag);
+	ha->ip_config.control = init_fw_cb->control;
+	memcpy(ha->ip_config.isns_addr, init_fw_cb->ipv4_isns_addr,
+	       min(sizeof(ha->ip_config.isns_addr),
+		   sizeof(init_fw_cb->ipv4_isns_addr)));
+	ha->ip_config.isns_port = le16_to_cpu(init_fw_cb->ipv4_isns_port);
+	ha->ip_config.tcp_wsf = init_fw_cb->ipv4_tcp_wsf;
+	ha->ip_config.ipv4_tos = init_fw_cb->ipv4_tos;
+	ha->ip_config.ipv4_cache_id = init_fw_cb->ipv4_cacheid;
+	ha->ip_config.ipv4_alt_cid_len = init_fw_cb->ipv4_dhcp_alt_cid_len;
+	memcpy(ha->ip_config.ipv4_alt_cid, init_fw_cb->ipv4_dhcp_alt_cid,
+	       min(sizeof(ha->ip_config.ipv4_alt_cid),
+		   sizeof(init_fw_cb->ipv4_dhcp_alt_cid)));
+	ha->ip_config.ipv4_vid_len = init_fw_cb->ipv4_dhcp_vid_len;
+	memcpy(ha->ip_config.ipv4_vid, init_fw_cb->ipv4_dhcp_vid,
+	       min(sizeof(ha->ip_config.ipv4_vid),
+		   sizeof(init_fw_cb->ipv4_dhcp_vid)));
+	ha->ip_config.ipv4_ttl = init_fw_cb->ipv4_ttl;
+	ha->ip_config.def_timeout = le16_to_cpu(init_fw_cb->def_timeout);
+	ha->ip_config.abort_timer = init_fw_cb->abort_timer;
+	ha->ip_config.iscsi_options = le16_to_cpu(init_fw_cb->iscsi_opts);
+	ha->ip_config.iscsi_max_pdu_size =
+				le16_to_cpu(init_fw_cb->iscsi_max_pdu_size);
+	ha->ip_config.iscsi_fburst_len =
+				le16_to_cpu(init_fw_cb->iscsi_fburst_len);
+	ha->ip_config.iscsi_max_outstnd_r2t =
+				le16_to_cpu(init_fw_cb->iscsi_max_outstnd_r2t);
+	ha->ip_config.iscsi_max_burst_len =
+				le16_to_cpu(init_fw_cb->iscsi_max_burst_len);
+	memcpy(ha->ip_config.iscsi_name, init_fw_cb->iscsi_name,
+	       min(sizeof(ha->ip_config.iscsi_name),
+		   sizeof(init_fw_cb->iscsi_name)));
 
 	if (is_ipv6_enabled(ha)) {
 		/* Save IPv6 Address */
 		ha->ip_config.ipv6_link_local_state =
-			le16_to_cpu(init_fw_cb->ipv6_lnk_lcl_addr_state);
+		  qla4xxx_set_ipaddr_state(init_fw_cb->ipv6_lnk_lcl_addr_state);
 		ha->ip_config.ipv6_addr0_state =
-				le16_to_cpu(init_fw_cb->ipv6_addr0_state);
+			qla4xxx_set_ipaddr_state(init_fw_cb->ipv6_addr0_state);
 		ha->ip_config.ipv6_addr1_state =
-				le16_to_cpu(init_fw_cb->ipv6_addr1_state);
-		ha->ip_config.ipv6_default_router_state =
-				le16_to_cpu(init_fw_cb->ipv6_dflt_rtr_state);
+			qla4xxx_set_ipaddr_state(init_fw_cb->ipv6_addr1_state);
+
+		switch (le16_to_cpu(init_fw_cb->ipv6_dflt_rtr_state)) {
+		case IPV6_RTRSTATE_UNKNOWN:
+			ha->ip_config.ipv6_default_router_state =
+						ISCSI_ROUTER_STATE_UNKNOWN;
+			break;
+		case IPV6_RTRSTATE_MANUAL:
+			ha->ip_config.ipv6_default_router_state =
+						ISCSI_ROUTER_STATE_MANUAL;
+			break;
+		case IPV6_RTRSTATE_ADVERTISED:
+			ha->ip_config.ipv6_default_router_state =
+						ISCSI_ROUTER_STATE_ADVERTISED;
+			break;
+		case IPV6_RTRSTATE_STALE:
+			ha->ip_config.ipv6_default_router_state =
+						ISCSI_ROUTER_STATE_STALE;
+			break;
+		default:
+			ha->ip_config.ipv6_default_router_state =
+						ISCSI_ROUTER_STATE_UNKNOWN;
+		}
+
 		ha->ip_config.ipv6_link_local_addr.in6_u.u6_addr8[0] = 0xFE;
 		ha->ip_config.ipv6_link_local_addr.in6_u.u6_addr8[1] = 0x80;
 
@@ -478,6 +564,27 @@ qla4xxx_update_local_ip(struct scsi_qla_host *ha,
 		ha->ip_config.ipv6_vlan_tag =
 				be16_to_cpu(init_fw_cb->ipv6_vlan_tag);
 		ha->ip_config.ipv6_port = le16_to_cpu(init_fw_cb->ipv6_port);
+		ha->ip_config.ipv6_cache_id = init_fw_cb->ipv6_cache_id;
+		memcpy(&ha->ip_config.ipv6_isns_addr,
+		       init_fw_cb->ipv6_isns_addr,
+		       min(sizeof(ha->ip_config.ipv6_isns_addr),
+			   sizeof(init_fw_cb->ipv6_isns_addr)));
+		ha->ip_config.ipv6_flow_lbl =
+				le16_to_cpu(init_fw_cb->ipv6_flow_lbl);
+		ha->ip_config.ipv6_traffic_class =
+				init_fw_cb->ipv6_traffic_class;
+		ha->ip_config.ipv6_hop_limit = init_fw_cb->ipv6_hop_limit;
+		ha->ip_config.ipv6_nd_reach_time =
+				le32_to_cpu(init_fw_cb->ipv6_nd_reach_time);
+		ha->ip_config.ipv6_nd_rexmit_timer =
+				le32_to_cpu(init_fw_cb->ipv6_nd_rexmit_timer);
+		ha->ip_config.ipv6_nd_stale_timeout =
+				le32_to_cpu(init_fw_cb->ipv6_nd_stale_timeout);
+		ha->ip_config.ipv6_dup_addr_detect_count =
+					init_fw_cb->ipv6_dup_addr_detect_count;
+		ha->ip_config.ipv6_gw_advrt_mtu =
+				le32_to_cpu(init_fw_cb->ipv6_gw_advrt_mtu);
+		ha->ip_config.ipv6_tcp_wsf = init_fw_cb->ipv6_tcp_wsf;
 	}
 }
 
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 4d231c1..3313358 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -399,6 +399,63 @@ static umode_t qla4_attr_is_visible(int param_type, int param)
 		case ISCSI_NET_PARAM_VLAN_ENABLED:
 		case ISCSI_NET_PARAM_MTU:
 		case ISCSI_NET_PARAM_PORT:
+		case ISCSI_NET_PARAM_IPADDR_STATE:
+		case ISCSI_NET_PARAM_IPV6_LINKLOCAL_STATE:
+		case ISCSI_NET_PARAM_IPV6_ROUTER_STATE:
+		case ISCSI_NET_PARAM_DELAYED_ACK_EN:
+		case ISCSI_NET_PARAM_ISNS_EN:
+		case ISCSI_NET_PARAM_ISNS_ADDR:
+		case ISCSI_NET_PARAM_ISNS_PORT:
+		case ISCSI_NET_PARAM_NAGLE_EN:
+		case ISCSI_NET_PARAM_TCP_WIN_SCALE_EN:
+		case ISCSI_NET_PARAM_TCP_WIN_SCALE:
+		case ISCSI_NET_PARAM_TCP_TIMER_SCALE:
+		case ISCSI_NET_PARAM_TCP_TIMESTAMP_EN:
+		case ISCSI_NET_PARAM_CACHE_ID:
+		case ISCSI_NET_PARAM_IPV4_DHCP_DNS_ADDR_EN:
+		case ISCSI_NET_PARAM_IPV4_DHCP_SLP_DA_EN:
+		case ISCSI_NET_PARAM_IPV4_DHCP_REQ_ISNS_INFO_EN:
+		case ISCSI_NET_PARAM_IPV4_TOS_EN:
+		case ISCSI_NET_PARAM_IPV4_TOS:
+		case ISCSI_NET_PARAM_IPV4_GRAT_ARP_EN:
+		case ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID_EN:
+		case ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID:
+		case ISCSI_NET_PARAM_IPV4_DHCP_REQ_VENDOR_ID_EN:
+		case ISCSI_NET_PARAM_IPV4_DHCP_USE_VENDOR_ID_EN:
+		case ISCSI_NET_PARAM_IPV4_DHCP_VENDOR_ID:
+		case ISCSI_NET_PARAM_IPV4_DHCP_LEARN_IQN_EN:
+		case ISCSI_NET_PARAM_IPV4_FRAGMENT_EN:
+		case ISCSI_NET_PARAM_IPV4_IN_FORWARD_EN:
+		case ISCSI_NET_PARAM_REDIRECT_EN:
+		case ISCSI_NET_PARAM_IPV4_TTL:
+		case ISCSI_NET_PARAM_IPV6_GRAT_NEIGHBOR_ADV_EN:
+		case ISCSI_NET_PARAM_IPV6_MLD_EN:
+		case ISCSI_NET_PARAM_IPV6_FLOW_LABEL:
+		case ISCSI_NET_PARAM_IPV6_TRAFFIC_CLASS:
+		case ISCSI_NET_PARAM_IPV6_HOP_LIMIT:
+		case ISCSI_NET_PARAM_IPV6_ND_REACHABLE_TMO:
+		case ISCSI_NET_PARAM_IPV6_ND_REXMIT_TIME:
+		case ISCSI_NET_PARAM_IPV6_ND_STALE_TMO:
+		case ISCSI_NET_PARAM_IPV6_DUP_ADDR_DET_CNT:
+		case ISCSI_NET_PARAM_IPV6_RTR_ADV_LINK_MTU:
+		case ISCSI_NET_PARAM_DEF_TMF_TMO:
+		case ISCSI_NET_PARAM_DEF_HDRDGST_EN:
+		case ISCSI_NET_PARAM_DEF_DATADGST_EN:
+		case ISCSI_NET_PARAM_DEF_IMM_DATA_EN:
+		case ISCSI_NET_PARAM_DEF_INITIAL_R2T_EN:
+		case ISCSI_NET_PARAM_DEF_DATASEQ_INORDER_EN:
+		case ISCSI_NET_PARAM_DEF_PDU_INORDER_EN:
+		case ISCSI_NET_PARAM_DEF_ERL:
+		case ISCSI_NET_PARAM_DEF_MAX_RECV_DLENGTH:
+		case ISCSI_NET_PARAM_DEF_FIRST_BURST:
+		case ISCSI_NET_PARAM_DEF_MAX_R2T:
+		case ISCSI_NET_PARAM_DEF_MAX_BURST:
+		case ISCSI_NET_PARAM_DEF_CHAP_AUTH_EN:
+		case ISCSI_NET_PARAM_DEF_BIDI_CHAP_EN:
+		case ISCSI_NET_PARAM_DEF_STRICT_LOGIN_COMP_EN:
+		case ISCSI_NET_PARAM_DEF_DISCOVERY_AUTH_EN:
+		case ISCSI_NET_PARAM_DEF_DISCOVERY_LOGOUT_EN:
+		case ISCSI_NET_PARAM_DEF_ISCSI_NAME:
 			return S_IRUGO;
 		default:
 			return 0;
@@ -758,6 +815,339 @@ static int qla4xxx_get_iface_param(struct iscsi_iface *iface,
 		else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV6)
 			len = sprintf(buf, "%d\n", ha->ip_config.ipv6_port);
 		break;
+	case ISCSI_NET_PARAM_IPADDR_STATE:
+		if (iface->iface_type == ISCSI_IFACE_TYPE_IPV4) {
+			len = sprintf(buf, "%s\n",
+				      iscsi_get_ipaddress_state_name(
+						ha->ip_config.ipv4_addr_state));
+		} else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV6) {
+			if (iface->iface_num == 0)
+				len = sprintf(buf, "%s\n",
+					      iscsi_get_ipaddress_state_name(
+					      ha->ip_config.ipv6_addr0_state));
+			else if (iface->iface_num == 1)
+				len = sprintf(buf, "%s\n",
+					      iscsi_get_ipaddress_state_name(
+					      ha->ip_config.ipv6_addr1_state));
+		}
+		break;
+	case ISCSI_NET_PARAM_IPV6_LINKLOCAL_STATE:
+		len = sprintf(buf, "%s\n",
+			      iscsi_get_ipaddress_state_name(
+					ha->ip_config.ipv6_link_local_state));
+		break;
+	case ISCSI_NET_PARAM_IPV6_ROUTER_STATE:
+		len = sprintf(buf, "%s\n",
+			      iscsi_get_router_state_name(
+				ha->ip_config.ipv6_default_router_state));
+		break;
+	case ISCSI_NET_PARAM_DELAYED_ACK_EN:
+		if (iface->iface_type == ISCSI_IFACE_TYPE_IPV4)
+			len = sprintf(buf, "%s\n",
+				      (ha->ip_config.tcp_options &
+				       TCPOPT_DELAYED_ACK_DISABLE) ?
+				      "disabled" : "enabled");
+		else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV6)
+			len = sprintf(buf, "%s\n",
+				      (ha->ip_config.ipv6_tcp_options &
+				       IPV6_TCPOPT_DELAYED_ACK_DISABLE) ?
+				      "disabled" : "enabled");
+		break;
+	case ISCSI_NET_PARAM_ISNS_EN:
+		if (iface->iface_type == ISCSI_IFACE_TYPE_IPV4)
+			len = sprintf(buf, "%s\n",
+				      (ha->ip_config.tcp_options &
+				       TCPOPT_ISNS_ENABLE) ?
+				      "enabled" : "disabled");
+		else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV6)
+			len = sprintf(buf, "%s\n",
+				      (ha->ip_config.ipv6_tcp_options &
+				       IPV6_TCPOPT_ISNS_ENABLE) ?
+				      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_ISNS_ADDR:
+		if (iface->iface_type == ISCSI_IFACE_TYPE_IPV4)
+			len = sprintf(buf, "%pI4\n", &ha->ip_config.isns_addr);
+		else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV6)
+			len = sprintf(buf, "%pI6\n",
+				      &ha->ip_config.ipv6_isns_addr);
+		break;
+	case ISCSI_NET_PARAM_ISNS_PORT:
+		len = sprintf(buf, "%d\n", ha->ip_config.isns_port);
+		break;
+	case ISCSI_NET_PARAM_NAGLE_EN:
+		if (iface->iface_type == ISCSI_IFACE_TYPE_IPV4)
+			len = sprintf(buf, "%s\n",
+				      (ha->ip_config.tcp_options &
+				       TCPOPT_NAGLE_ALGO_DISABLE) ?
+				      "disabled" : "enabled");
+		else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV6)
+			len = sprintf(buf, "%s\n",
+				      (ha->ip_config.ipv6_tcp_options &
+				       IPV6_TCPOPT_NAGLE_ALGO_DISABLE) ?
+				      "disabled" : "enabled");
+		break;
+	case ISCSI_NET_PARAM_TCP_WIN_SCALE_EN:
+		if (iface->iface_type == ISCSI_IFACE_TYPE_IPV4)
+			len = sprintf(buf, "%s\n",
+				      (ha->ip_config.tcp_options &
+				       TCPOPT_WINDOW_SCALE_DISABLE) ?
+				      "disabled" : "enabled");
+		else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV6)
+			len = sprintf(buf, "%s\n",
+				      (ha->ip_config.ipv6_tcp_options &
+				       IPV6_TCPOPT_WINDOW_SCALE_DISABLE) ?
+				      "disabled" : "enabled");
+		break;
+	case ISCSI_NET_PARAM_TCP_WIN_SCALE:
+		if (iface->iface_type == ISCSI_IFACE_TYPE_IPV4)
+			len = sprintf(buf, "%d\n", ha->ip_config.tcp_wsf);
+		else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV6)
+			len = sprintf(buf, "%d\n", ha->ip_config.ipv6_tcp_wsf);
+		break;
+	case ISCSI_NET_PARAM_TCP_TIMER_SCALE:
+		if (iface->iface_type == ISCSI_IFACE_TYPE_IPV4)
+			len = sprintf(buf, "%d\n",
+				      ((ha->ip_config.tcp_options &
+					TCPOPT_TIMER_SCALE) >> 1));
+		else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV6)
+			len = sprintf(buf, "%d\n",
+				      ((ha->ip_config.ipv6_tcp_options &
+					IPV6_TCPOPT_TIMER_SCALE) >> 1));
+		break;
+	case ISCSI_NET_PARAM_TCP_TIMESTAMP_EN:
+		if (iface->iface_type == ISCSI_IFACE_TYPE_IPV4)
+			len = sprintf(buf, "%s\n",
+				      (ha->ip_config.tcp_options &
+				       TCPOPT_TIMESTAMP_ENABLE) ?
+				      "enabled" : "disabled");
+		else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV6)
+			len = sprintf(buf, "%s\n",
+				      (ha->ip_config.ipv6_tcp_options &
+				       IPV6_TCPOPT_TIMESTAMP_ENABLE) ?
+				      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_CACHE_ID:
+		if (iface->iface_type == ISCSI_IFACE_TYPE_IPV4)
+			len = sprintf(buf, "%d\n", ha->ip_config.ipv4_cache_id);
+		else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV6)
+			len = sprintf(buf, "%d\n", ha->ip_config.ipv6_cache_id);
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_DNS_ADDR_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.tcp_options &
+			       TCPOPT_DNS_SERVER_IP_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_SLP_DA_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.tcp_options &
+			       TCPOPT_SLP_DA_INFO_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_REQ_ISNS_INFO_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.tcp_options &
+			       TCPOPT_ISNS_INFO_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_IPV4_TOS_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.ipv4_options &
+			       IPOPT_IPV4_TOS_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_IPV4_TOS:
+		len = sprintf(buf, "%d\n", ha->ip_config.ipv4_tos);
+		break;
+	case ISCSI_NET_PARAM_IPV4_GRAT_ARP_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.ipv4_options &
+			       IPOPT_GRAT_ARP_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.ipv4_options &
+			       IPOPT_ALT_CID_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID:
+		len = sprintf(buf, "%s\n", ha->ip_config.ipv4_alt_cid);
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_REQ_VENDOR_ID_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.ipv4_options &
+			       IPOPT_REQ_VID_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_USE_VENDOR_ID_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.ipv4_options &
+			       IPOPT_USE_VID_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_VENDOR_ID:
+		len = sprintf(buf, "%s\n", ha->ip_config.ipv4_vid);
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_LEARN_IQN_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.ipv4_options &
+			       IPOPT_LEARN_IQN_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_IPV4_FRAGMENT_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.ipv4_options &
+			       IPOPT_FRAGMENTATION_DISABLE) ?
+			      "disabled" : "enabled");
+		break;
+	case ISCSI_NET_PARAM_IPV4_IN_FORWARD_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.ipv4_options &
+			       IPOPT_INCOM_FORWARD_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_REDIRECT_EN:
+		if (iface->iface_type == ISCSI_IFACE_TYPE_IPV4)
+			len = sprintf(buf, "%s\n",
+				      (ha->ip_config.ipv4_options &
+				       IPOPT_ARP_REDIRECT_ENABLE) ?
+				      "enabled" : "disabled");
+		else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV6)
+			len = sprintf(buf, "%s\n",
+				      (ha->ip_config.ipv6_options &
+				       IPV6_OPT_REDIRECT_ENABLE) ?
+				      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_IPV4_TTL:
+		len = sprintf(buf, "%d\n", ha->ip_config.ipv4_ttl);
+		break;
+	case ISCSI_NET_PARAM_IPV6_GRAT_NEIGHBOR_ADV_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.ipv6_options &
+			       IPV6_OPT_GRAT_NEIGHBOR_ADV_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_IPV6_MLD_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.ipv6_addl_options &
+			       IPV6_ADDOPT_MLD_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_IPV6_FLOW_LABEL:
+		len = sprintf(buf, "%d\n", ha->ip_config.ipv6_flow_lbl);
+		break;
+	case ISCSI_NET_PARAM_IPV6_TRAFFIC_CLASS:
+		len = sprintf(buf, "%d\n", ha->ip_config.ipv6_traffic_class);
+		break;
+	case ISCSI_NET_PARAM_IPV6_HOP_LIMIT:
+		len = sprintf(buf, "%d\n", ha->ip_config.ipv6_hop_limit);
+		break;
+	case ISCSI_NET_PARAM_IPV6_ND_REACHABLE_TMO:
+		len = sprintf(buf, "%d\n", ha->ip_config.ipv6_nd_reach_time);
+		break;
+	case ISCSI_NET_PARAM_IPV6_ND_REXMIT_TIME:
+		len = sprintf(buf, "%d\n", ha->ip_config.ipv6_nd_rexmit_timer);
+		break;
+	case ISCSI_NET_PARAM_IPV6_ND_STALE_TMO:
+		len = sprintf(buf, "%d\n", ha->ip_config.ipv6_nd_stale_timeout);
+		break;
+	case ISCSI_NET_PARAM_IPV6_DUP_ADDR_DET_CNT:
+		len = sprintf(buf, "%d\n",
+			      ha->ip_config.ipv6_dup_addr_detect_count);
+		break;
+	case ISCSI_NET_PARAM_IPV6_RTR_ADV_LINK_MTU:
+		len = sprintf(buf, "%d\n", ha->ip_config.ipv6_gw_advrt_mtu);
+		break;
+	case ISCSI_NET_PARAM_DEF_TMF_TMO:
+		len = sprintf(buf, "%d\n", ha->ip_config.def_timeout);
+		break;
+	case ISCSI_NET_PARAM_DEF_HDRDGST_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.iscsi_options &
+			       ISCSIOPT_HEADER_DIGEST_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_DEF_DATADGST_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.iscsi_options &
+			       ISCSIOPT_DATA_DIGEST_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_DEF_IMM_DATA_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.iscsi_options &
+			       ISCSIOPT_IMMEDIATE_DATA_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_DEF_INITIAL_R2T_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.iscsi_options &
+			       ISCSIOPT_INITIAL_R2T_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_DEF_DATASEQ_INORDER_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.iscsi_options &
+			       ISCSIOPT_DATA_SEQ_INORDER_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_DEF_PDU_INORDER_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.iscsi_options &
+			       ISCSIOPT_DATA_PDU_INORDER_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_DEF_ERL:
+		len = sprintf(buf, "%d\n", (ha->ip_config.iscsi_options &
+					    ISCSIOPT_ERR_RECOVERY_LEVEL_MASK));
+		break;
+	case ISCSI_NET_PARAM_DEF_MAX_RECV_DLENGTH:
+		len = sprintf(buf, "%d\n", ha->ip_config.iscsi_max_pdu_size);
+		break;
+	case ISCSI_NET_PARAM_DEF_FIRST_BURST:
+		len = sprintf(buf, "%d\n", ha->ip_config.iscsi_fburst_len);
+		break;
+	case ISCSI_NET_PARAM_DEF_MAX_R2T:
+		len = sprintf(buf, "%d\n", ha->ip_config.iscsi_max_outstnd_r2t);
+		break;
+	case ISCSI_NET_PARAM_DEF_MAX_BURST:
+		len = sprintf(buf, "%d\n", ha->ip_config.iscsi_max_burst_len);
+		break;
+	case ISCSI_NET_PARAM_DEF_CHAP_AUTH_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.iscsi_options &
+			       ISCSIOPT_CHAP_AUTH_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_DEF_BIDI_CHAP_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.iscsi_options &
+			       ISCSIOPT_BIDI_CHAP_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_DEF_STRICT_LOGIN_COMP_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.iscsi_options &
+			       ISCSIOPT_STRICT_LOGIN_COMP_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_DEF_DISCOVERY_AUTH_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.iscsi_options &
+			       ISCSIOPT_DISCOVERY_AUTH_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_DEF_DISCOVERY_LOGOUT_EN:
+		len = sprintf(buf, "%s\n",
+			      (ha->ip_config.iscsi_options &
+			       ISCSIOPT_DISCOVERY_LOGOUT_ENABLE) ?
+			      "enabled" : "disabled");
+		break;
+	case ISCSI_NET_PARAM_DEF_ISCSI_NAME:
+		len = sprintf(buf, "%s\n", ha->ip_config.iscsi_name);
+		break;
 	default:
 		len = -ENOSYS;
 	}
@@ -1198,6 +1588,300 @@ static void qla4xxx_set_ipv6(struct scsi_qla_host *ha,
 		init_fw_cb->ipv6_port =
 				cpu_to_le16(*(uint16_t *)iface_param->value);
 		break;
+	case ISCSI_NET_PARAM_DELAYED_ACK_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_DISABLE)
+			init_fw_cb->ipv6_tcp_opts |=
+				cpu_to_le16(IPV6_TCPOPT_DELAYED_ACK_DISABLE);
+		else
+			init_fw_cb->ipv6_tcp_opts &=
+				cpu_to_le16(~IPV6_TCPOPT_DELAYED_ACK_DISABLE &
+					    0xFFFF);
+		break;
+	case ISCSI_NET_PARAM_ISNS_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv6_tcp_opts |=
+				cpu_to_le16(IPV6_TCPOPT_ISNS_ENABLE);
+		else
+			init_fw_cb->ipv6_tcp_opts &=
+				cpu_to_le16(~IPV6_TCPOPT_ISNS_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_ISNS_ADDR:
+		if (iface_param->iface_num & 0x1)
+			break;
+		memcpy(init_fw_cb->ipv6_isns_addr, iface_param->value,
+		       sizeof(init_fw_cb->ipv6_isns_addr));
+		break;
+	case ISCSI_NET_PARAM_NAGLE_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_DISABLE)
+			init_fw_cb->ipv6_tcp_opts |=
+				cpu_to_le16(IPV6_TCPOPT_NAGLE_ALGO_DISABLE);
+		else
+			init_fw_cb->ipv6_tcp_opts &=
+				cpu_to_le16(~IPV6_TCPOPT_NAGLE_ALGO_DISABLE);
+		break;
+	case ISCSI_NET_PARAM_TCP_WIN_SCALE_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_DISABLE)
+			init_fw_cb->ipv6_tcp_opts |=
+				cpu_to_le16(IPV6_TCPOPT_WINDOW_SCALE_DISABLE);
+		else
+			init_fw_cb->ipv6_tcp_opts &=
+				cpu_to_le16(~IPV6_TCPOPT_WINDOW_SCALE_DISABLE);
+		break;
+	case ISCSI_NET_PARAM_TCP_WIN_SCALE:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->ipv6_tcp_wsf = iface_param->value[0];
+		break;
+	case ISCSI_NET_PARAM_TCP_TIMER_SCALE:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->ipv6_tcp_opts &= cpu_to_le16(~TCPOPT_TIMER_SCALE);
+		init_fw_cb->ipv6_tcp_opts |=
+				cpu_to_le16((iface_param->value[0] << 1) &
+					    TCPOPT_TIMER_SCALE);
+		break;
+	case ISCSI_NET_PARAM_TCP_TIMESTAMP_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv6_tcp_opts |=
+				cpu_to_le16(IPV6_TCPOPT_TIMESTAMP_ENABLE);
+		else
+			init_fw_cb->ipv6_tcp_opts &=
+				cpu_to_le16(~IPV6_TCPOPT_TIMESTAMP_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_IPV6_GRAT_NEIGHBOR_ADV_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv6_opts |=
+				cpu_to_le16(IPV6_OPT_GRAT_NEIGHBOR_ADV_ENABLE);
+		else
+			init_fw_cb->ipv6_opts &=
+				cpu_to_le16(~IPV6_OPT_GRAT_NEIGHBOR_ADV_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_REDIRECT_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv6_opts |=
+				cpu_to_le16(IPV6_OPT_REDIRECT_ENABLE);
+		else
+			init_fw_cb->ipv6_opts &=
+				cpu_to_le16(~IPV6_OPT_REDIRECT_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_IPV6_MLD_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv6_addtl_opts |=
+				cpu_to_le16(IPV6_ADDOPT_MLD_ENABLE);
+		else
+			init_fw_cb->ipv6_addtl_opts &=
+				cpu_to_le16(~IPV6_ADDOPT_MLD_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_IPV6_FLOW_LABEL:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->ipv6_flow_lbl =
+				cpu_to_le16(*(uint16_t *)iface_param->value);
+		break;
+	case ISCSI_NET_PARAM_IPV6_TRAFFIC_CLASS:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->ipv6_traffic_class = iface_param->value[0];
+		break;
+	case ISCSI_NET_PARAM_IPV6_HOP_LIMIT:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->ipv6_hop_limit = iface_param->value[0];
+		break;
+	case ISCSI_NET_PARAM_IPV6_ND_REACHABLE_TMO:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->ipv6_nd_reach_time =
+				cpu_to_le32(*(uint32_t *)iface_param->value);
+		break;
+	case ISCSI_NET_PARAM_IPV6_ND_REXMIT_TIME:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->ipv6_nd_rexmit_timer =
+				cpu_to_le32(*(uint32_t *)iface_param->value);
+		break;
+	case ISCSI_NET_PARAM_IPV6_ND_STALE_TMO:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->ipv6_nd_stale_timeout =
+				cpu_to_le32(*(uint32_t *)iface_param->value);
+		break;
+	case ISCSI_NET_PARAM_IPV6_DUP_ADDR_DET_CNT:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->ipv6_dup_addr_detect_count = iface_param->value[0];
+		break;
+	case ISCSI_NET_PARAM_IPV6_RTR_ADV_LINK_MTU:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->ipv6_gw_advrt_mtu =
+				cpu_to_le32(*(uint32_t *)iface_param->value);
+		break;
+	case ISCSI_NET_PARAM_DEF_TMF_TMO:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->def_timeout =
+				cpu_to_le16(*(uint16_t *)iface_param->value);
+		break;
+	case ISCSI_NET_PARAM_DEF_HDRDGST_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_HEADER_DIGEST_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_HEADER_DIGEST_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_DATADGST_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_DATA_DIGEST_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_DATA_DIGEST_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_IMM_DATA_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_IMMEDIATE_DATA_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_IMMEDIATE_DATA_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_INITIAL_R2T_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_INITIAL_R2T_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_INITIAL_R2T_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_DATASEQ_INORDER_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_DATA_SEQ_INORDER_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_DATA_SEQ_INORDER_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_PDU_INORDER_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_DATA_PDU_INORDER_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_DATA_PDU_INORDER_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_ERL:
+		if (iface_param->iface_num & 0x1)
+			break;
+		/* Set lower 2 bits to zero */
+		init_fw_cb->iscsi_opts &= 0xFFFC;
+		init_fw_cb->iscsi_opts |=
+				cpu_to_le16(iface_param->value[0] &
+					    ISCSIOPT_ERR_RECOVERY_LEVEL_MASK);
+		break;
+	case ISCSI_NET_PARAM_DEF_MAX_RECV_DLENGTH:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->iscsi_max_pdu_size =
+				cpu_to_le16(*(uint16_t *)iface_param->value);
+		break;
+	case ISCSI_NET_PARAM_DEF_FIRST_BURST:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->iscsi_fburst_len =
+				cpu_to_le16(*(uint16_t *)iface_param->value);
+		break;
+	case ISCSI_NET_PARAM_DEF_MAX_R2T:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->iscsi_max_outstnd_r2t =
+				cpu_to_le16(*(uint16_t *)iface_param->value);
+		break;
+	case ISCSI_NET_PARAM_DEF_MAX_BURST:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->iscsi_max_burst_len =
+				cpu_to_le16(*(uint16_t *)iface_param->value);
+		break;
+	case ISCSI_NET_PARAM_DEF_CHAP_AUTH_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_CHAP_AUTH_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_CHAP_AUTH_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_BIDI_CHAP_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_BIDI_CHAP_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_BIDI_CHAP_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_STRICT_LOGIN_COMP_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_STRICT_LOGIN_COMP_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_STRICT_LOGIN_COMP_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_DISCOVERY_AUTH_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_DISCOVERY_AUTH_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_DISCOVERY_AUTH_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_DISCOVERY_LOGOUT_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_DISCOVERY_LOGOUT_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_DISCOVERY_LOGOUT_ENABLE);
+		break;
 	default:
 		ql4_printk(KERN_ERR, ha, "Unknown IPv6 param = %d\n",
 			   iface_param->param);
@@ -1266,6 +1950,379 @@ static void qla4xxx_set_ipv4(struct scsi_qla_host *ha,
 		init_fw_cb->ipv4_port =
 				cpu_to_le16(*(uint16_t *)iface_param->value);
 		break;
+	case ISCSI_NET_PARAM_DELAYED_ACK_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_DISABLE)
+			init_fw_cb->ipv4_tcp_opts |=
+				cpu_to_le16(TCPOPT_DELAYED_ACK_DISABLE);
+		else
+			init_fw_cb->ipv4_tcp_opts &=
+				cpu_to_le16(~TCPOPT_DELAYED_ACK_DISABLE &
+					    0xFFFF);
+		break;
+	case ISCSI_NET_PARAM_ISNS_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv4_tcp_opts |=
+				cpu_to_le16(TCPOPT_ISNS_ENABLE);
+		else
+			init_fw_cb->ipv4_tcp_opts &=
+				cpu_to_le16(~TCPOPT_ISNS_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_ISNS_ADDR:
+		if (iface_param->iface_num & 0x1)
+			break;
+		memcpy(init_fw_cb->ipv4_isns_addr, iface_param->value,
+		       sizeof(init_fw_cb->ipv4_isns_addr));
+		break;
+	case ISCSI_NET_PARAM_ISNS_PORT:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->ipv4_isns_port =
+				cpu_to_le16(*(uint16_t *)iface_param->value);
+		break;
+	case ISCSI_NET_PARAM_NAGLE_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_DISABLE)
+			init_fw_cb->ipv4_tcp_opts |=
+				cpu_to_le16(TCPOPT_NAGLE_ALGO_DISABLE);
+		else
+			init_fw_cb->ipv4_tcp_opts &=
+				cpu_to_le16(~TCPOPT_NAGLE_ALGO_DISABLE);
+		break;
+	case ISCSI_NET_PARAM_TCP_WIN_SCALE_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_DISABLE)
+			init_fw_cb->ipv4_tcp_opts |=
+				cpu_to_le16(TCPOPT_WINDOW_SCALE_DISABLE);
+		else
+			init_fw_cb->ipv4_tcp_opts &=
+				cpu_to_le16(~TCPOPT_WINDOW_SCALE_DISABLE);
+		break;
+	case ISCSI_NET_PARAM_TCP_WIN_SCALE:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->ipv4_tcp_wsf = iface_param->value[0];
+		break;
+	case ISCSI_NET_PARAM_TCP_TIMER_SCALE:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->ipv4_tcp_opts &= cpu_to_le16(~TCPOPT_TIMER_SCALE);
+		init_fw_cb->ipv4_tcp_opts |=
+				cpu_to_le16((iface_param->value[0] << 1) &
+					    TCPOPT_TIMER_SCALE);
+		break;
+	case ISCSI_NET_PARAM_TCP_TIMESTAMP_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv4_tcp_opts |=
+				cpu_to_le16(TCPOPT_TIMESTAMP_ENABLE);
+		else
+			init_fw_cb->ipv4_tcp_opts &=
+				cpu_to_le16(~TCPOPT_TIMESTAMP_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_DNS_ADDR_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv4_tcp_opts |=
+				cpu_to_le16(TCPOPT_DNS_SERVER_IP_ENABLE);
+		else
+			init_fw_cb->ipv4_tcp_opts &=
+				cpu_to_le16(~TCPOPT_DNS_SERVER_IP_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_SLP_DA_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv4_tcp_opts |=
+				cpu_to_le16(TCPOPT_SLP_DA_INFO_ENABLE);
+		else
+			init_fw_cb->ipv4_tcp_opts &=
+				cpu_to_le16(~TCPOPT_SLP_DA_INFO_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_REQ_ISNS_INFO_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv4_tcp_opts |=
+				cpu_to_le16(TCPOPT_ISNS_INFO_ENABLE);
+		else
+			init_fw_cb->ipv4_tcp_opts &=
+				cpu_to_le16(~TCPOPT_ISNS_INFO_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_IPV4_TOS_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv4_ip_opts |=
+				cpu_to_le16(IPOPT_IPV4_TOS_ENABLE);
+		else
+			init_fw_cb->ipv4_ip_opts &=
+				cpu_to_le16(~IPOPT_IPV4_TOS_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_IPV4_TOS:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->ipv4_tos = iface_param->value[0];
+		break;
+	case ISCSI_NET_PARAM_IPV4_GRAT_ARP_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv4_ip_opts |=
+					cpu_to_le16(IPOPT_GRAT_ARP_ENABLE);
+		else
+			init_fw_cb->ipv4_ip_opts &=
+					cpu_to_le16(~IPOPT_GRAT_ARP_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv4_ip_opts |=
+				cpu_to_le16(IPOPT_ALT_CID_ENABLE);
+		else
+			init_fw_cb->ipv4_ip_opts &=
+				cpu_to_le16(~IPOPT_ALT_CID_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID:
+		if (iface_param->iface_num & 0x1)
+			break;
+		memcpy(init_fw_cb->ipv4_dhcp_alt_cid, iface_param->value,
+		       (sizeof(init_fw_cb->ipv4_dhcp_alt_cid) - 1));
+		init_fw_cb->ipv4_dhcp_alt_cid_len =
+					strlen(init_fw_cb->ipv4_dhcp_alt_cid);
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_REQ_VENDOR_ID_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv4_ip_opts |=
+					cpu_to_le16(IPOPT_REQ_VID_ENABLE);
+		else
+			init_fw_cb->ipv4_ip_opts &=
+					cpu_to_le16(~IPOPT_REQ_VID_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_USE_VENDOR_ID_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv4_ip_opts |=
+					cpu_to_le16(IPOPT_USE_VID_ENABLE);
+		else
+			init_fw_cb->ipv4_ip_opts &=
+					cpu_to_le16(~IPOPT_USE_VID_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_VENDOR_ID:
+		if (iface_param->iface_num & 0x1)
+			break;
+		memcpy(init_fw_cb->ipv4_dhcp_vid, iface_param->value,
+		       (sizeof(init_fw_cb->ipv4_dhcp_vid) - 1));
+		init_fw_cb->ipv4_dhcp_vid_len =
+					strlen(init_fw_cb->ipv4_dhcp_vid);
+		break;
+	case ISCSI_NET_PARAM_IPV4_DHCP_LEARN_IQN_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv4_ip_opts |=
+					cpu_to_le16(IPOPT_LEARN_IQN_ENABLE);
+		else
+			init_fw_cb->ipv4_ip_opts &=
+					cpu_to_le16(~IPOPT_LEARN_IQN_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_IPV4_FRAGMENT_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_DISABLE)
+			init_fw_cb->ipv4_ip_opts |=
+				cpu_to_le16(IPOPT_FRAGMENTATION_DISABLE);
+		else
+			init_fw_cb->ipv4_ip_opts &=
+				cpu_to_le16(~IPOPT_FRAGMENTATION_DISABLE);
+		break;
+	case ISCSI_NET_PARAM_IPV4_IN_FORWARD_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv4_ip_opts |=
+				cpu_to_le16(IPOPT_INCOM_FORWARD_ENABLE);
+		else
+			init_fw_cb->ipv4_ip_opts &=
+				cpu_to_le16(~IPOPT_INCOM_FORWARD_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_REDIRECT_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->ipv4_ip_opts |=
+				cpu_to_le16(IPOPT_ARP_REDIRECT_ENABLE);
+		else
+			init_fw_cb->ipv4_ip_opts &=
+				cpu_to_le16(~IPOPT_ARP_REDIRECT_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_IPV4_TTL:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->ipv4_ttl = iface_param->value[0];
+		break;
+	case ISCSI_NET_PARAM_DEF_TMF_TMO:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->def_timeout =
+				cpu_to_le16(*(uint16_t *)iface_param->value);
+		break;
+	case ISCSI_NET_PARAM_DEF_HDRDGST_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_HEADER_DIGEST_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_HEADER_DIGEST_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_DATADGST_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_DATA_DIGEST_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_DATA_DIGEST_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_IMM_DATA_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_IMMEDIATE_DATA_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_IMMEDIATE_DATA_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_INITIAL_R2T_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_INITIAL_R2T_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_INITIAL_R2T_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_DATASEQ_INORDER_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_DATA_SEQ_INORDER_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_DATA_SEQ_INORDER_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_PDU_INORDER_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_DATA_PDU_INORDER_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_DATA_PDU_INORDER_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_ERL:
+		if (iface_param->iface_num & 0x1)
+			break;
+		/* Set lower 2 bits to zero */
+		init_fw_cb->iscsi_opts >>= 2;
+		init_fw_cb->iscsi_opts <<= 2;
+
+		init_fw_cb->iscsi_opts |=
+				cpu_to_le16(iface_param->value[0] &
+					    ISCSIOPT_ERR_RECOVERY_LEVEL_MASK);
+		break;
+	case ISCSI_NET_PARAM_DEF_MAX_RECV_DLENGTH:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->iscsi_max_pdu_size =
+				cpu_to_le16(*(uint16_t *)iface_param->value);
+		break;
+	case ISCSI_NET_PARAM_DEF_FIRST_BURST:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->iscsi_fburst_len =
+				cpu_to_le16(*(uint16_t *)iface_param->value);
+		break;
+	case ISCSI_NET_PARAM_DEF_MAX_R2T:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->iscsi_max_outstnd_r2t =
+				cpu_to_le16(*(uint16_t *)iface_param->value);
+		break;
+	case ISCSI_NET_PARAM_DEF_MAX_BURST:
+		if (iface_param->iface_num & 0x1)
+			break;
+		init_fw_cb->iscsi_max_burst_len =
+				cpu_to_le16(*(uint16_t *)iface_param->value);
+		break;
+	case ISCSI_NET_PARAM_DEF_CHAP_AUTH_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_CHAP_AUTH_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_CHAP_AUTH_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_BIDI_CHAP_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_BIDI_CHAP_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_BIDI_CHAP_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_STRICT_LOGIN_COMP_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_STRICT_LOGIN_COMP_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_STRICT_LOGIN_COMP_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_DISCOVERY_AUTH_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_DISCOVERY_AUTH_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_DISCOVERY_AUTH_ENABLE);
+		break;
+	case ISCSI_NET_PARAM_DEF_DISCOVERY_LOGOUT_EN:
+		if (iface_param->iface_num & 0x1)
+			break;
+		if (iface_param->value[0] == ISCSI_NET_PARAM_ENABLE)
+			init_fw_cb->iscsi_opts |=
+				cpu_to_le16(ISCSIOPT_DISCOVERY_LOGOUT_ENABLE);
+		else
+			init_fw_cb->iscsi_opts &=
+				cpu_to_le16(~ISCSIOPT_DISCOVERY_LOGOUT_ENABLE);
+		break;
 	default:
 		ql4_printk(KERN_ERR, ha, "Unknown IPv4 param = %d\n",
 			   iface_param->param);
-- 
1.8.2.GIT



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 4/8] scsi_transport_iscsi: Exporting new attrs for iscsi session and connection in sysfs
  2013-05-09 10:02 [PATCH 0/8] qla4xxx: Updates for scsi "misc" branch vikas.chaudhary
                   ` (2 preceding siblings ...)
  2013-05-09 10:02 ` [PATCH 3/8] qla4xxx: " vikas.chaudhary
@ 2013-05-09 10:02 ` vikas.chaudhary
  2013-05-28  8:57   ` Mike Christie
  2013-05-09 10:02 ` [PATCH 5/8] libiscsi: " vikas.chaudhary
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: vikas.chaudhary @ 2013-05-09 10:02 UTC (permalink / raw)
  To: jbottomley, michaelc
  Cc: linux-scsi, vikas.chaudhary, lalit.chandivade, ravi.anand,
	Adheer Chandravanshi

From: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>

Exporting new iSCSI Session and Connection parameters to sysfs

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 drivers/scsi/scsi_transport_iscsi.c | 135 +++++++++++++++++++++++++++++++++++-
 include/scsi/iscsi_if.h             |  36 ++++++++++
 2 files changed, 170 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 315c8b6..bfaeaf3 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -25,7 +25,6 @@
 #include <linux/slab.h>
 #include <linux/bsg-lib.h>
 #include <linux/idr.h>
-#include <linux/list.h>
 #include <net/tcp.h>
 #include <scsi/scsi.h>
 #include <scsi/scsi_host.h>
@@ -3656,6 +3655,26 @@ iscsi_conn_attr(exp_statsn, ISCSI_PARAM_EXP_STATSN);
 iscsi_conn_attr(persistent_address, ISCSI_PARAM_PERSISTENT_ADDRESS);
 iscsi_conn_attr(ping_tmo, ISCSI_PARAM_PING_TMO);
 iscsi_conn_attr(recv_tmo, ISCSI_PARAM_RECV_TMO);
+iscsi_conn_attr(local_port, ISCSI_PARAM_LOCAL_PORT);
+iscsi_conn_attr(redirect_ipaddr, ISCSI_PARAM_REDIRECT_IPADDR);
+iscsi_conn_attr(statsn, ISCSI_PARAM_STATSN);
+iscsi_conn_attr(keepalive_tmo, ISCSI_PARAM_KEEPALIVE_TMO);
+iscsi_conn_attr(max_segment_size, ISCSI_PARAM_MAX_SEGMENT_SIZE);
+iscsi_conn_attr(snack_req, ISCSI_PARAM_SNACK_REQ_EN);
+iscsi_conn_attr(tcp_timestamp_stat, ISCSI_PARAM_TCP_TIMESTAMP_STAT);
+iscsi_conn_attr(tcp_wsf_disable, ISCSI_PARAM_TCP_WSF_DISABLE);
+iscsi_conn_attr(tcp_nagle_disable, ISCSI_PARAM_TCP_NAGLE_DISABLE);
+iscsi_conn_attr(tcp_timer_scale, ISCSI_PARAM_TCP_TIMER_SCALE);
+iscsi_conn_attr(tcp_timestamp_enable, ISCSI_PARAM_TCP_TIMESTAMP_EN);
+iscsi_conn_attr(fragment_disable, ISCSI_PARAM_IP_FRAGMENT_DISABLE);
+iscsi_conn_attr(ipv4_tos, ISCSI_PARAM_IPV4_TOS);
+iscsi_conn_attr(ipv6_traffic_class, ISCSI_PARAM_IPV6_TC);
+iscsi_conn_attr(ipv6_flow_label, ISCSI_PARAM_IPV6_FLOW_LABEL);
+iscsi_conn_attr(is_fw_assigned_ipv6, ISCSI_PARAM_IS_FW_ASSIGNED_IPV6);
+iscsi_conn_attr(link_local_ipv6, ISCSI_PARAM_LINK_LOCAL_IPV6);
+iscsi_conn_attr(tcp_xmit_wsf, ISCSI_PARAM_TCP_XMIT_WSF);
+iscsi_conn_attr(tcp_recv_wsf, ISCSI_PARAM_TCP_RECV_WSF);
+
 
 #define iscsi_conn_ep_attr_show(param)					\
 static ssize_t show_conn_ep_param_##param(struct device *dev,		\
@@ -3708,6 +3727,25 @@ static struct attribute *iscsi_conn_attrs[] = {
 	&dev_attr_conn_persistent_port.attr,
 	&dev_attr_conn_ping_tmo.attr,
 	&dev_attr_conn_recv_tmo.attr,
+	&dev_attr_conn_local_port.attr,
+	&dev_attr_conn_redirect_ipaddr.attr,
+	&dev_attr_conn_statsn.attr,
+	&dev_attr_conn_keepalive_tmo.attr,
+	&dev_attr_conn_max_segment_size.attr,
+	&dev_attr_conn_snack_req.attr,
+	&dev_attr_conn_tcp_timestamp_stat.attr,
+	&dev_attr_conn_tcp_wsf_disable.attr,
+	&dev_attr_conn_tcp_nagle_disable.attr,
+	&dev_attr_conn_tcp_timer_scale.attr,
+	&dev_attr_conn_tcp_timestamp_enable.attr,
+	&dev_attr_conn_fragment_disable.attr,
+	&dev_attr_conn_ipv4_tos.attr,
+	&dev_attr_conn_ipv6_traffic_class.attr,
+	&dev_attr_conn_ipv6_flow_label.attr,
+	&dev_attr_conn_is_fw_assigned_ipv6.attr,
+	&dev_attr_conn_link_local_ipv6.attr,
+	&dev_attr_conn_tcp_xmit_wsf.attr,
+	&dev_attr_conn_tcp_recv_wsf.attr,
 	NULL,
 };
 
@@ -3745,6 +3783,44 @@ static umode_t iscsi_conn_attr_is_visible(struct kobject *kobj,
 		param = ISCSI_PARAM_PING_TMO;
 	else if (attr == &dev_attr_conn_recv_tmo.attr)
 		param = ISCSI_PARAM_RECV_TMO;
+	else if (attr == &dev_attr_conn_local_port.attr)
+		param = ISCSI_PARAM_LOCAL_PORT;
+	else if (attr == &dev_attr_conn_redirect_ipaddr.attr)
+		param = ISCSI_PARAM_REDIRECT_IPADDR;
+	else if (attr == &dev_attr_conn_statsn.attr)
+		param = ISCSI_PARAM_STATSN;
+	else if (attr == &dev_attr_conn_keepalive_tmo.attr)
+		param = ISCSI_PARAM_KEEPALIVE_TMO;
+	else if (attr == &dev_attr_conn_max_segment_size.attr)
+		param = ISCSI_PARAM_MAX_SEGMENT_SIZE;
+	else if (attr == &dev_attr_conn_snack_req.attr)
+		param = ISCSI_PARAM_SNACK_REQ_EN;
+	else if (attr == &dev_attr_conn_tcp_timestamp_stat.attr)
+		param = ISCSI_PARAM_TCP_TIMESTAMP_STAT;
+	else if (attr == &dev_attr_conn_tcp_wsf_disable.attr)
+		param = ISCSI_PARAM_TCP_WSF_DISABLE;
+	else if (attr == &dev_attr_conn_tcp_nagle_disable.attr)
+		param = ISCSI_PARAM_TCP_NAGLE_DISABLE;
+	else if (attr == &dev_attr_conn_tcp_timer_scale.attr)
+		param = ISCSI_PARAM_TCP_TIMER_SCALE;
+	else if (attr == &dev_attr_conn_tcp_timestamp_enable.attr)
+		param = ISCSI_PARAM_TCP_TIMESTAMP_EN;
+	else if (attr == &dev_attr_conn_fragment_disable.attr)
+		param = ISCSI_PARAM_IP_FRAGMENT_DISABLE;
+	else if (attr == &dev_attr_conn_ipv4_tos.attr)
+		param = ISCSI_PARAM_IPV4_TOS;
+	else if (attr == &dev_attr_conn_ipv6_traffic_class.attr)
+		param = ISCSI_PARAM_IPV6_TC;
+	else if (attr == &dev_attr_conn_ipv6_flow_label.attr)
+		param = ISCSI_PARAM_IPV6_FLOW_LABEL;
+	else if (attr == &dev_attr_conn_is_fw_assigned_ipv6.attr)
+		param = ISCSI_PARAM_IS_FW_ASSIGNED_IPV6;
+	else if (attr == &dev_attr_conn_link_local_ipv6.attr)
+		param = ISCSI_PARAM_LINK_LOCAL_IPV6;
+	else if (attr == &dev_attr_conn_tcp_xmit_wsf.attr)
+		param = ISCSI_PARAM_TCP_XMIT_WSF;
+	else if (attr == &dev_attr_conn_tcp_recv_wsf.attr)
+		param = ISCSI_PARAM_TCP_RECV_WSF;
 	else {
 		WARN_ONCE(1, "Invalid conn attr");
 		return 0;
@@ -3802,6 +3878,21 @@ iscsi_session_attr(tgt_reset_tmo, ISCSI_PARAM_TGT_RESET_TMO, 0);
 iscsi_session_attr(ifacename, ISCSI_PARAM_IFACE_NAME, 0);
 iscsi_session_attr(initiatorname, ISCSI_PARAM_INITIATOR_NAME, 0);
 iscsi_session_attr(targetalias, ISCSI_PARAM_TARGET_ALIAS, 0);
+iscsi_session_attr(auto_snd_tgt_disable, ISCSI_PARAM_AUTO_SND_TGT_DISABLE, 0);
+iscsi_session_attr(discovery_session, ISCSI_PARAM_DISCOVERY_SESS, 0);
+iscsi_session_attr(portal_type, ISCSI_PARAM_PORTAL_TYPE, 0);
+iscsi_session_attr(chap_auth, ISCSI_PARAM_CHAP_AUTH_EN, 0);
+iscsi_session_attr(discovery_logout, ISCSI_PARAM_DISCOVERY_LOGOUT_EN, 0);
+iscsi_session_attr(bidi_chap, ISCSI_PARAM_BIDI_CHAP_EN, 0);
+iscsi_session_attr(discovery_auth_optional,
+		   ISCSI_PARAM_DISCOVERY_AUTH_OPTIONAL, 0);
+iscsi_session_attr(def_time2wait, ISCSI_PARAM_DEF_TIME2WAIT, 0);
+iscsi_session_attr(def_time2retain, ISCSI_PARAM_DEF_TIME2RETAIN, 0);
+iscsi_session_attr(isid, ISCSI_PARAM_ISID, 0);
+iscsi_session_attr(tsid, ISCSI_PARAM_TSID, 0);
+iscsi_session_attr(def_taskmgmt_tmo, ISCSI_PARAM_DEF_TASKMGMT_TMO, 0);
+iscsi_session_attr(discovery_parent_idx, ISCSI_PARAM_DISCOVERY_PARENT_IDX, 0);
+iscsi_session_attr(discovery_parent_type, ISCSI_PARAM_DISCOVERY_PARENT_TYPE, 0);
 
 static ssize_t
 show_priv_session_state(struct device *dev, struct device_attribute *attr,
@@ -3903,6 +3994,20 @@ static struct attribute *iscsi_session_attrs[] = {
 	&dev_attr_sess_chap_out_idx.attr,
 	&dev_attr_sess_chap_in_idx.attr,
 	&dev_attr_priv_sess_target_id.attr,
+	&dev_attr_sess_auto_snd_tgt_disable.attr,
+	&dev_attr_sess_discovery_session.attr,
+	&dev_attr_sess_portal_type.attr,
+	&dev_attr_sess_chap_auth.attr,
+	&dev_attr_sess_discovery_logout.attr,
+	&dev_attr_sess_bidi_chap.attr,
+	&dev_attr_sess_discovery_auth_optional.attr,
+	&dev_attr_sess_def_time2wait.attr,
+	&dev_attr_sess_def_time2retain.attr,
+	&dev_attr_sess_isid.attr,
+	&dev_attr_sess_tsid.attr,
+	&dev_attr_sess_def_taskmgmt_tmo.attr,
+	&dev_attr_sess_discovery_parent_idx.attr,
+	&dev_attr_sess_discovery_parent_type.attr,
 	NULL,
 };
 
@@ -3960,6 +4065,34 @@ static umode_t iscsi_session_attr_is_visible(struct kobject *kobj,
 		param = ISCSI_PARAM_INITIATOR_NAME;
 	else if (attr == &dev_attr_sess_targetalias.attr)
 		param = ISCSI_PARAM_TARGET_ALIAS;
+	else if (attr == &dev_attr_sess_auto_snd_tgt_disable.attr)
+		param = ISCSI_PARAM_AUTO_SND_TGT_DISABLE;
+	else if (attr == &dev_attr_sess_discovery_session.attr)
+		param = ISCSI_PARAM_DISCOVERY_SESS;
+	else if (attr == &dev_attr_sess_portal_type.attr)
+		param = ISCSI_PARAM_PORTAL_TYPE;
+	else if (attr == &dev_attr_sess_chap_auth.attr)
+		param = ISCSI_PARAM_CHAP_AUTH_EN;
+	else if (attr == &dev_attr_sess_discovery_logout.attr)
+		param = ISCSI_PARAM_DISCOVERY_LOGOUT_EN;
+	else if (attr == &dev_attr_sess_bidi_chap.attr)
+		param = ISCSI_PARAM_BIDI_CHAP_EN;
+	else if (attr == &dev_attr_sess_discovery_auth_optional.attr)
+		param = ISCSI_PARAM_DISCOVERY_AUTH_OPTIONAL;
+	else if (attr == &dev_attr_sess_def_time2wait.attr)
+		param = ISCSI_PARAM_DEF_TIME2WAIT;
+	else if (attr == &dev_attr_sess_def_time2retain.attr)
+		param = ISCSI_PARAM_DEF_TIME2RETAIN;
+	else if (attr == &dev_attr_sess_isid.attr)
+		param = ISCSI_PARAM_ISID;
+	else if (attr == &dev_attr_sess_tsid.attr)
+		param = ISCSI_PARAM_TSID;
+	else if (attr == &dev_attr_sess_def_taskmgmt_tmo.attr)
+		param = ISCSI_PARAM_DEF_TASKMGMT_TMO;
+	else if (attr == &dev_attr_sess_discovery_parent_idx.attr)
+		param = ISCSI_PARAM_DISCOVERY_PARENT_IDX;
+	else if (attr == &dev_attr_sess_discovery_parent_type.attr)
+		param = ISCSI_PARAM_DISCOVERY_PARENT_TYPE;
 	else if (attr == &dev_attr_priv_sess_recovery_tmo.attr)
 		return S_IRUGO | S_IWUSR;
 	else if (attr == &dev_attr_priv_sess_state.attr)
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h
index c2ee3b3..6622dea 100644
--- a/include/scsi/iscsi_if.h
+++ b/include/scsi/iscsi_if.h
@@ -567,6 +567,42 @@ enum iscsi_param {
 
 	ISCSI_PARAM_CHAP_IN_IDX,
 	ISCSI_PARAM_CHAP_OUT_IDX,
+
+	ISCSI_PARAM_AUTO_SND_TGT_DISABLE,
+	ISCSI_PARAM_DISCOVERY_SESS,
+	ISCSI_PARAM_PORTAL_TYPE,
+	ISCSI_PARAM_CHAP_AUTH_EN,
+	ISCSI_PARAM_DISCOVERY_LOGOUT_EN,
+	ISCSI_PARAM_BIDI_CHAP_EN,
+	ISCSI_PARAM_DISCOVERY_AUTH_OPTIONAL,
+
+	ISCSI_PARAM_DEF_TIME2WAIT,
+	ISCSI_PARAM_DEF_TIME2RETAIN,
+	ISCSI_PARAM_MAX_SEGMENT_SIZE,
+	ISCSI_PARAM_SNACK_REQ_EN,
+	ISCSI_PARAM_STATSN,
+	ISCSI_PARAM_KEEPALIVE_TMO,
+	ISCSI_PARAM_LOCAL_PORT,
+	ISCSI_PARAM_REDIRECT_IPADDR,
+	ISCSI_PARAM_TSID,
+	ISCSI_PARAM_DEF_TASKMGMT_TMO,
+
+	ISCSI_PARAM_TCP_TIMESTAMP_STAT,
+	ISCSI_PARAM_TCP_WSF_DISABLE,
+	ISCSI_PARAM_TCP_NAGLE_DISABLE,
+	ISCSI_PARAM_TCP_TIMER_SCALE,
+	ISCSI_PARAM_TCP_TIMESTAMP_EN,
+	ISCSI_PARAM_TCP_XMIT_WSF,
+	ISCSI_PARAM_TCP_RECV_WSF,
+	ISCSI_PARAM_IP_FRAGMENT_DISABLE,
+	ISCSI_PARAM_IPV4_TOS,
+	ISCSI_PARAM_IPV6_TC,
+	ISCSI_PARAM_IPV6_FLOW_LABEL,
+	ISCSI_PARAM_IS_FW_ASSIGNED_IPV6,
+	ISCSI_PARAM_LINK_LOCAL_IPV6,
+
+	ISCSI_PARAM_DISCOVERY_PARENT_IDX,
+	ISCSI_PARAM_DISCOVERY_PARENT_TYPE,
 	/* must always be last */
 	ISCSI_PARAM_MAX,
 };
-- 
1.8.2.GIT



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 5/8] libiscsi: Exporting new attrs for iscsi session and connection in sysfs
  2013-05-09 10:02 [PATCH 0/8] qla4xxx: Updates for scsi "misc" branch vikas.chaudhary
                   ` (3 preceding siblings ...)
  2013-05-09 10:02 ` [PATCH 4/8] scsi_transport_iscsi: Exporting new attrs for iscsi session and connection in sysfs vikas.chaudhary
@ 2013-05-09 10:02 ` vikas.chaudhary
  2013-05-09 10:02 ` [PATCH 6/8] qla4xxx: " vikas.chaudhary
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: vikas.chaudhary @ 2013-05-09 10:02 UTC (permalink / raw)
  To: jbottomley, michaelc
  Cc: linux-scsi, vikas.chaudhary, lalit.chandivade, ravi.anand,
	Adheer Chandravanshi

From: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 drivers/scsi/libiscsi.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++++
 include/scsi/libiscsi.h |  35 +++++++++++++++
 2 files changed, 148 insertions(+)

diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 5de9469..dc8bbb8 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -2809,6 +2809,8 @@ void iscsi_session_teardown(struct iscsi_cls_session *cls_session)
 	kfree(session->targetalias);
 	kfree(session->initiatorname);
 	kfree(session->ifacename);
+	kfree(session->portal_type);
+	kfree(session->discovery_parent_type);
 
 	iscsi_destroy_session(cls_session);
 	iscsi_host_dec_session_cnt(shost);
@@ -2940,6 +2942,8 @@ void iscsi_conn_teardown(struct iscsi_cls_conn *cls_conn)
 	free_pages((unsigned long) conn->data,
 		   get_order(ISCSI_DEF_MAX_RECV_SEG_LEN));
 	kfree(conn->persistent_address);
+	kfree(conn->link_local_ipv6);
+	kfree(conn->redirect_ipaddr);
 	kfifo_in(&session->cmdpool.queue, (void*)&conn->login_task,
 		    sizeof(void*));
 	if (session->leadconn == conn)
@@ -3244,10 +3248,19 @@ int iscsi_set_param(struct iscsi_cls_conn *cls_conn,
 		break;
 	case ISCSI_PARAM_PERSISTENT_ADDRESS:
 		return iscsi_switch_str_param(&conn->persistent_address, buf);
+	case ISCSI_PARAM_LINK_LOCAL_IPV6:
+		return iscsi_switch_str_param(&conn->link_local_ipv6, buf);
+	case ISCSI_PARAM_REDIRECT_IPADDR:
+		return iscsi_switch_str_param(&conn->redirect_ipaddr, buf);
 	case ISCSI_PARAM_IFACE_NAME:
 		return iscsi_switch_str_param(&session->ifacename, buf);
 	case ISCSI_PARAM_INITIATOR_NAME:
 		return iscsi_switch_str_param(&session->initiatorname, buf);
+	case ISCSI_PARAM_PORTAL_TYPE:
+		return iscsi_switch_str_param(&session->portal_type, buf);
+	case ISCSI_PARAM_DISCOVERY_PARENT_TYPE:
+		return iscsi_switch_str_param(&session->discovery_parent_type,
+					      buf);
 	default:
 		return -ENOSYS;
 	}
@@ -3326,6 +3339,52 @@ int iscsi_session_get_param(struct iscsi_cls_session *cls_session,
 	case ISCSI_PARAM_INITIATOR_NAME:
 		len = sprintf(buf, "%s\n", session->initiatorname);
 		break;
+	case ISCSI_PARAM_AUTO_SND_TGT_DISABLE:
+		len = sprintf(buf, "%u\n", session->auto_snd_tgt_disable);
+		break;
+	case ISCSI_PARAM_DISCOVERY_SESS:
+		len = sprintf(buf, "%u\n", session->discovery_sess);
+		break;
+	case ISCSI_PARAM_PORTAL_TYPE:
+		len = sprintf(buf, "%s\n", session->portal_type);
+		break;
+	case ISCSI_PARAM_CHAP_AUTH_EN:
+		len = sprintf(buf, "%u\n", session->chap_auth_en);
+		break;
+	case ISCSI_PARAM_DISCOVERY_LOGOUT_EN:
+		len = sprintf(buf, "%u\n", session->discovery_logout_en);
+		break;
+	case ISCSI_PARAM_BIDI_CHAP_EN:
+		len = sprintf(buf, "%u\n", session->bidi_chap_en);
+		break;
+	case ISCSI_PARAM_DISCOVERY_AUTH_OPTIONAL:
+		len = sprintf(buf, "%u\n", session->discovery_auth_optional);
+		break;
+	case ISCSI_PARAM_DEF_TIME2WAIT:
+		len = sprintf(buf, "%d\n", session->time2wait);
+		break;
+	case ISCSI_PARAM_DEF_TIME2RETAIN:
+		len = sprintf(buf, "%d\n", session->time2retain);
+		break;
+	case ISCSI_PARAM_TSID:
+		len = sprintf(buf, "%u\n", session->tsid);
+		break;
+	case ISCSI_PARAM_ISID:
+		len = sprintf(buf, "%02x%02x%02x%02x%02x%02x\n",
+			      session->isid[0], session->isid[1],
+			      session->isid[2], session->isid[3],
+			      session->isid[4], session->isid[5]);
+		break;
+	case ISCSI_PARAM_DISCOVERY_PARENT_IDX:
+		len = sprintf(buf, "%u\n", session->discovery_parent_idx);
+		break;
+	case ISCSI_PARAM_DISCOVERY_PARENT_TYPE:
+		if (session->discovery_parent_type)
+			len = sprintf(buf, "%s\n",
+				      session->discovery_parent_type);
+		else
+			len = sprintf(buf, "\n");
+		break;
 	default:
 		return -ENOSYS;
 	}
@@ -3415,6 +3474,60 @@ int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn,
 	case ISCSI_PARAM_PERSISTENT_ADDRESS:
 		len = sprintf(buf, "%s\n", conn->persistent_address);
 		break;
+	case ISCSI_PARAM_STATSN:
+		len = sprintf(buf, "%u\n", conn->statsn);
+		break;
+	case ISCSI_PARAM_MAX_SEGMENT_SIZE:
+		len = sprintf(buf, "%u\n", conn->max_segment_size);
+		break;
+	case ISCSI_PARAM_SNACK_REQ_EN:
+		len = sprintf(buf, "%u\n", conn->snack_req_en);
+		break;
+	case ISCSI_PARAM_REDIRECT_IPADDR:
+		len = sprintf(buf, "%s\n", conn->redirect_ipaddr);
+		break;
+	case ISCSI_PARAM_KEEPALIVE_TMO:
+		len = sprintf(buf, "%u\n", conn->keepalive_tmo);
+		break;
+	case ISCSI_PARAM_LOCAL_PORT:
+		len = sprintf(buf, "%u\n", conn->local_port);
+		break;
+	case ISCSI_PARAM_TCP_TIMESTAMP_STAT:
+		len = sprintf(buf, "%u\n", conn->tcp_timestamp_stat);
+		break;
+	case ISCSI_PARAM_TCP_NAGLE_DISABLE:
+		len = sprintf(buf, "%u\n", conn->tcp_nagle_disable);
+		break;
+	case ISCSI_PARAM_TCP_WSF_DISABLE:
+		len = sprintf(buf, "%u\n", conn->tcp_wsf_disable);
+		break;
+	case ISCSI_PARAM_TCP_TIMER_SCALE:
+		len = sprintf(buf, "%u\n", conn->tcp_timer_scale);
+		break;
+	case ISCSI_PARAM_TCP_TIMESTAMP_EN:
+		len = sprintf(buf, "%u\n", conn->tcp_timestamp_en);
+		break;
+	case ISCSI_PARAM_IP_FRAGMENT_DISABLE:
+		len = sprintf(buf, "%u\n", conn->fragment_disable);
+		break;
+	case ISCSI_PARAM_IPV4_TOS:
+		len = sprintf(buf, "%u\n", conn->ipv4_tos);
+		break;
+	case ISCSI_PARAM_IPV6_TC:
+		len = sprintf(buf, "%u\n", conn->ipv6_traffic_class);
+		break;
+	case ISCSI_PARAM_IS_FW_ASSIGNED_IPV6:
+		len = sprintf(buf, "%u\n", conn->is_fw_assigned_ipv6);
+		break;
+	case ISCSI_PARAM_LINK_LOCAL_IPV6:
+		len = sprintf(buf, "%s\n", conn->link_local_ipv6);
+		break;
+	case ISCSI_PARAM_TCP_XMIT_WSF:
+		len = sprintf(buf, "%u\n", conn->tcp_xmit_wsf);
+		break;
+	case ISCSI_PARAM_TCP_RECV_WSF:
+		len = sprintf(buf, "%u\n", conn->tcp_recv_wsf);
+		break;
 	default:
 		return -ENOSYS;
 	}
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index 09c041e..00f7365 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -62,6 +62,8 @@ enum {
 	TMF_NOT_FOUND,
 };
 
+#define ISID_SIZE			6
+
 /* Connection suspend "bit" */
 #define ISCSI_SUSPEND_BIT		1
 
@@ -173,6 +175,7 @@ struct iscsi_conn {
 
 	/* iSCSI connection-wide sequencing */
 	uint32_t		exp_statsn;
+	uint32_t		statsn;
 
 	/* control data */
 	int			id;		/* CID */
@@ -213,6 +216,25 @@ struct iscsi_conn {
 	int			persistent_port;
 	char			*persistent_address;
 
+	unsigned		max_segment_size;
+	unsigned		tcp_xmit_wsf;
+	unsigned		tcp_recv_wsf;
+	char			*link_local_ipv6;
+	char			*redirect_ipaddr;
+	uint16_t		keepalive_tmo;
+	uint16_t		local_port;
+	uint8_t			snack_req_en;
+	uint8_t			tcp_timestamp_stat;
+	uint8_t			tcp_nagle_disable;
+	uint8_t			tcp_wsf_disable;
+	uint8_t			tcp_timer_scale;
+	uint8_t			tcp_timestamp_en;
+	uint8_t			fragment_disable;
+	uint8_t			ipv4_tos;
+	uint8_t			ipv6_traffic_class;
+	uint8_t			ipv6_flow_label;
+	uint8_t			is_fw_assigned_ipv6;
+
 	/* MIB-statistics */
 	uint64_t		txdata_octets;
 	uint64_t		rxdata_octets;
@@ -287,6 +309,19 @@ struct iscsi_session {
 	char			*targetalias;
 	char			*ifacename;
 	char			*initiatorname;
+	char			*portal_type;
+	char			*discovery_parent_type;
+	uint16_t		discovery_parent_idx;
+	uint16_t		def_taskmgmt_tmo;
+	uint16_t		tsid;
+	uint8_t			auto_snd_tgt_disable;
+	uint8_t			discovery_sess;
+	uint8_t			chap_auth_en;
+	uint8_t			discovery_logout_en;
+	uint8_t			bidi_chap_en;
+	uint8_t			discovery_auth_optional;
+	uint8_t			isid[ISID_SIZE];
+
 	/* control data */
 	struct iscsi_transport	*tt;
 	struct Scsi_Host	*host;
-- 
1.8.2.GIT



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 6/8] qla4xxx: Exporting new attrs for iscsi session and connection in sysfs
  2013-05-09 10:02 [PATCH 0/8] qla4xxx: Updates for scsi "misc" branch vikas.chaudhary
                   ` (4 preceding siblings ...)
  2013-05-09 10:02 ` [PATCH 5/8] libiscsi: " vikas.chaudhary
@ 2013-05-09 10:02 ` vikas.chaudhary
  2013-05-09 10:02 ` [PATCH 7/8] qla4xxx: Add support to allow flashnode multi-session login vikas.chaudhary
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: vikas.chaudhary @ 2013-05-09 10:02 UTC (permalink / raw)
  To: jbottomley, michaelc
  Cc: linux-scsi, vikas.chaudhary, lalit.chandivade, ravi.anand,
	Adheer Chandravanshi

From: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>

Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_os.c | 222 +++++++++++++++++++++++++++++++-----------
 1 file changed, 165 insertions(+), 57 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 3313358..171c0e4 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -378,6 +378,47 @@ static umode_t qla4_attr_is_visible(int param_type, int param)
 		case ISCSI_PARAM_PASSWORD:
 		case ISCSI_PARAM_USERNAME_IN:
 		case ISCSI_PARAM_PASSWORD_IN:
+		case ISCSI_PARAM_AUTO_SND_TGT_DISABLE:
+		case ISCSI_PARAM_DISCOVERY_SESS:
+		case ISCSI_PARAM_PORTAL_TYPE:
+		case ISCSI_PARAM_CHAP_AUTH_EN:
+		case ISCSI_PARAM_DISCOVERY_LOGOUT_EN:
+		case ISCSI_PARAM_BIDI_CHAP_EN:
+		case ISCSI_PARAM_DISCOVERY_AUTH_OPTIONAL:
+		case ISCSI_PARAM_DEF_TIME2WAIT:
+		case ISCSI_PARAM_DEF_TIME2RETAIN:
+		case ISCSI_PARAM_HDRDGST_EN:
+		case ISCSI_PARAM_DATADGST_EN:
+		case ISCSI_PARAM_INITIAL_R2T_EN:
+		case ISCSI_PARAM_IMM_DATA_EN:
+		case ISCSI_PARAM_PDU_INORDER_EN:
+		case ISCSI_PARAM_DATASEQ_INORDER_EN:
+		case ISCSI_PARAM_SNACK_REQ_EN:
+		case ISCSI_PARAM_MAX_SEGMENT_SIZE:
+		case ISCSI_PARAM_TCP_TIMESTAMP_STAT:
+		case ISCSI_PARAM_TCP_WSF_DISABLE:
+		case ISCSI_PARAM_TCP_NAGLE_DISABLE:
+		case ISCSI_PARAM_TCP_TIMER_SCALE:
+		case ISCSI_PARAM_TCP_TIMESTAMP_EN:
+		case ISCSI_PARAM_TCP_XMIT_WSF:
+		case ISCSI_PARAM_TCP_RECV_WSF:
+		case ISCSI_PARAM_IP_FRAGMENT_DISABLE:
+		case ISCSI_PARAM_IPV4_TOS:
+		case ISCSI_PARAM_IPV6_TC:
+		case ISCSI_PARAM_IPV6_FLOW_LABEL:
+		case ISCSI_PARAM_IS_FW_ASSIGNED_IPV6:
+		case ISCSI_PARAM_LINK_LOCAL_IPV6:
+		case ISCSI_PARAM_REDIRECT_IPADDR:
+		case ISCSI_PARAM_KEEPALIVE_TMO:
+		case ISCSI_PARAM_LOCAL_PORT:
+		case ISCSI_PARAM_ISID:
+		case ISCSI_PARAM_TSID:
+		case ISCSI_PARAM_DEF_TASKMGMT_TMO:
+		case ISCSI_PARAM_ERL:
+		case ISCSI_PARAM_STATSN:
+		case ISCSI_PARAM_EXP_STATSN:
+		case ISCSI_PARAM_DISCOVERY_PARENT_IDX:
+		case ISCSI_PARAM_DISCOVERY_PARENT_TYPE:
 			return S_IRUGO;
 		default:
 			return 0;
@@ -3314,6 +3355,113 @@ static int qla4xxx_copy_to_fwddb_param(struct iscsi_bus_flash_session *sess,
 	return rc;
 }
 
+static void qla4xxx_copy_to_sess_conn_params(struct iscsi_conn *conn,
+					     struct iscsi_session *sess,
+					     struct dev_db_entry *fw_ddb_entry)
+{
+	unsigned long options = 0;
+	uint16_t ddb_link;
+	uint16_t disc_parent;
+	char ip_addr[DDB_IPADDR_LEN];
+
+	options = le16_to_cpu(fw_ddb_entry->options);
+	conn->is_fw_assigned_ipv6 = test_bit(OPT_IS_FW_ASSIGNED_IPV6, &options);
+	sess->auto_snd_tgt_disable = test_bit(OPT_AUTO_SENDTGTS_DISABLE,
+					      &options);
+	sess->discovery_sess = test_bit(OPT_DISC_SESSION, &options);
+
+	options = le16_to_cpu(fw_ddb_entry->iscsi_options);
+	conn->hdrdgst_en = test_bit(ISCSIOPT_HEADER_DIGEST_EN, &options);
+	conn->datadgst_en = test_bit(ISCSIOPT_DATA_DIGEST_EN, &options);
+	sess->imm_data_en = test_bit(ISCSIOPT_IMMEDIATE_DATA_EN, &options);
+	sess->initial_r2t_en = test_bit(ISCSIOPT_INITIAL_R2T_EN, &options);
+	sess->dataseq_inorder_en = test_bit(ISCSIOPT_DATA_SEQ_IN_ORDER,
+					    &options);
+	sess->pdu_inorder_en = test_bit(ISCSIOPT_DATA_PDU_IN_ORDER, &options);
+	sess->chap_auth_en = test_bit(ISCSIOPT_CHAP_AUTH_EN, &options);
+	conn->snack_req_en = test_bit(ISCSIOPT_SNACK_REQ_EN, &options);
+	sess->discovery_logout_en = test_bit(ISCSIOPT_DISCOVERY_LOGOUT_EN,
+					     &options);
+	sess->bidi_chap_en = test_bit(ISCSIOPT_BIDI_CHAP_EN, &options);
+	sess->discovery_auth_optional =
+			test_bit(ISCSIOPT_DISCOVERY_AUTH_OPTIONAL, &options);
+	if (test_bit(ISCSIOPT_ERL1, &options))
+		sess->erl |= BIT_1;
+	if (test_bit(ISCSIOPT_ERL0, &options))
+		sess->erl |= BIT_0;
+
+	options = le16_to_cpu(fw_ddb_entry->tcp_options);
+	conn->tcp_timestamp_stat = test_bit(TCPOPT_TIMESTAMP_STAT, &options);
+	conn->tcp_nagle_disable = test_bit(TCPOPT_NAGLE_DISABLE, &options);
+	conn->tcp_wsf_disable = test_bit(TCPOPT_WSF_DISABLE, &options);
+	if (test_bit(TCPOPT_TIMER_SCALE3, &options))
+		conn->tcp_timer_scale |= BIT_3;
+	if (test_bit(TCPOPT_TIMER_SCALE2, &options))
+		conn->tcp_timer_scale |= BIT_2;
+	if (test_bit(TCPOPT_TIMER_SCALE1, &options))
+		conn->tcp_timer_scale |= BIT_1;
+
+	conn->tcp_timer_scale >>= 1;
+	conn->tcp_timestamp_en = test_bit(TCPOPT_TIMESTAMP_EN, &options);
+
+	options = le16_to_cpu(fw_ddb_entry->ip_options);
+	conn->fragment_disable = test_bit(IPOPT_FRAGMENT_DISABLE, &options);
+
+	conn->max_recv_dlength = BYTE_UNITS *
+			  le16_to_cpu(fw_ddb_entry->iscsi_max_rcv_data_seg_len);
+	conn->max_xmit_dlength = BYTE_UNITS *
+			  le16_to_cpu(fw_ddb_entry->iscsi_max_snd_data_seg_len);
+	sess->max_r2t = le16_to_cpu(fw_ddb_entry->iscsi_max_outsnd_r2t);
+	sess->first_burst = BYTE_UNITS *
+			       le16_to_cpu(fw_ddb_entry->iscsi_first_burst_len);
+	sess->max_burst = BYTE_UNITS *
+				 le16_to_cpu(fw_ddb_entry->iscsi_max_burst_len);
+	sess->time2wait = le16_to_cpu(fw_ddb_entry->iscsi_def_time2wait);
+	sess->time2retain = le16_to_cpu(fw_ddb_entry->iscsi_def_time2retain);
+	sess->tpgt = le32_to_cpu(fw_ddb_entry->tgt_portal_grp);
+	conn->max_segment_size = le16_to_cpu(fw_ddb_entry->mss);
+	conn->tcp_xmit_wsf = fw_ddb_entry->tcp_xmt_wsf;
+	conn->tcp_recv_wsf = fw_ddb_entry->tcp_rcv_wsf;
+	conn->ipv4_tos = fw_ddb_entry->ipv4_tos;
+	conn->keepalive_tmo = le16_to_cpu(fw_ddb_entry->ka_timeout);
+	conn->local_port = le16_to_cpu(fw_ddb_entry->lcl_port);
+	conn->statsn = le32_to_cpu(fw_ddb_entry->stat_sn);
+	conn->exp_statsn = le32_to_cpu(fw_ddb_entry->exp_stat_sn);
+	sess->tsid = le16_to_cpu(fw_ddb_entry->tsid);
+	COPY_ISID(sess->isid, fw_ddb_entry->isid);
+
+	ddb_link = le16_to_cpu(fw_ddb_entry->ddb_link);
+	if (ddb_link < MAX_DDB_ENTRIES)
+		sess->discovery_parent_idx = ddb_link;
+	else
+		sess->discovery_parent_idx = DDB_NO_LINK;
+
+	if (ddb_link == DDB_ISNS)
+		disc_parent = ISCSI_DISC_PARENT_ISNS;
+	else if (ddb_link == DDB_NO_LINK)
+		disc_parent = ISCSI_DISC_PARENT_UNKNOWN;
+	else if (ddb_link < MAX_DDB_ENTRIES)
+		disc_parent = ISCSI_DISC_PARENT_SENDTGT;
+	else
+		disc_parent = ISCSI_DISC_PARENT_UNKNOWN;
+
+	iscsi_set_param(conn->cls_conn, ISCSI_PARAM_DISCOVERY_PARENT_TYPE,
+			iscsi_get_discovery_parent_name(disc_parent), 0);
+
+	iscsi_set_param(conn->cls_conn, ISCSI_PARAM_TARGET_ALIAS,
+			(char *)fw_ddb_entry->iscsi_alias, 0);
+
+	memset(ip_addr, 0, sizeof(ip_addr));
+	options = le16_to_cpu(fw_ddb_entry->options);
+	if (options & DDB_OPT_IPV6_DEVICE)
+		sprintf(ip_addr, "%pI6", fw_ddb_entry->tgt_addr);
+	else
+		sprintf(ip_addr, "%pI4", fw_ddb_entry->tgt_addr);
+
+	iscsi_set_param(conn->cls_conn, ISCSI_PARAM_REDIRECT_IPADDR,
+			(char *)ip_addr, 0);
+}
+
 static void qla4xxx_copy_fwddb_param(struct scsi_qla_host *ha,
 				     struct dev_db_entry *fw_ddb_entry,
 				     struct iscsi_cls_session *cls_sess,
@@ -3332,47 +3480,33 @@ static void qla4xxx_copy_fwddb_param(struct scsi_qla_host *ha,
 
 	ddb_entry->chap_tbl_idx = le16_to_cpu(fw_ddb_entry->chap_tbl_idx);
 
-	conn->max_recv_dlength = BYTE_UNITS *
-			  le16_to_cpu(fw_ddb_entry->iscsi_max_rcv_data_seg_len);
-
-	conn->max_xmit_dlength = BYTE_UNITS *
-			  le16_to_cpu(fw_ddb_entry->iscsi_max_snd_data_seg_len);
-
-	sess->initial_r2t_en =
-			    (BIT_10 & le16_to_cpu(fw_ddb_entry->iscsi_options));
-
-	sess->max_r2t = le16_to_cpu(fw_ddb_entry->iscsi_max_outsnd_r2t);
-
-	sess->imm_data_en = (BIT_11 & le16_to_cpu(fw_ddb_entry->iscsi_options));
-
-	sess->first_burst = BYTE_UNITS *
-			       le16_to_cpu(fw_ddb_entry->iscsi_first_burst_len);
-
-	sess->max_burst = BYTE_UNITS *
-				 le16_to_cpu(fw_ddb_entry->iscsi_max_burst_len);
-
-	sess->time2wait = le16_to_cpu(fw_ddb_entry->iscsi_def_time2wait);
-
-	sess->time2retain = le16_to_cpu(fw_ddb_entry->iscsi_def_time2retain);
+	qla4xxx_copy_to_sess_conn_params(conn, sess, fw_ddb_entry);
 
+	sess->def_taskmgmt_tmo = le16_to_cpu(fw_ddb_entry->def_timeout);
 	conn->persistent_port = le16_to_cpu(fw_ddb_entry->port);
 
-	sess->tpgt = le32_to_cpu(fw_ddb_entry->tgt_portal_grp);
-
+	memset(ip_addr, 0, sizeof(ip_addr));
 	options = le16_to_cpu(fw_ddb_entry->options);
-	if (options & DDB_OPT_IPV6_DEVICE)
+	if (options & DDB_OPT_IPV6_DEVICE) {
+		sprintf(ip_addr, "%pI6", fw_ddb_entry->link_local_ipv6_addr);
+		iscsi_set_param(cls_conn, ISCSI_PARAM_LINK_LOCAL_IPV6,
+				(char *)ip_addr, buflen);
+
+		iscsi_set_param(cls_conn, ISCSI_PARAM_PORTAL_TYPE, "ipv6", 4);
+
+		memset(ip_addr, 0, sizeof(ip_addr));
 		sprintf(ip_addr, "%pI6", fw_ddb_entry->ip_addr);
-	else
+	} else {
+		iscsi_set_param(cls_conn, ISCSI_PARAM_PORTAL_TYPE, "ipv4", 4);
 		sprintf(ip_addr, "%pI4", fw_ddb_entry->ip_addr);
+	}
 
+	iscsi_set_param(cls_conn, ISCSI_PARAM_PERSISTENT_ADDRESS,
+			(char *)ip_addr, buflen);
 	iscsi_set_param(cls_conn, ISCSI_PARAM_TARGET_NAME,
 			(char *)fw_ddb_entry->iscsi_name, buflen);
 	iscsi_set_param(cls_conn, ISCSI_PARAM_INITIATOR_NAME,
 			(char *)ha->name_string, buflen);
-	iscsi_set_param(cls_conn, ISCSI_PARAM_PERSISTENT_ADDRESS,
-			(char *)ip_addr, buflen);
-	iscsi_set_param(cls_conn, ISCSI_PARAM_TARGET_ALIAS,
-			(char *)fw_ddb_entry->iscsi_alias, buflen);
 }
 
 void qla4xxx_update_session_conn_fwddb_param(struct scsi_qla_host *ha,
@@ -3460,37 +3594,11 @@ void qla4xxx_update_session_conn_param(struct scsi_qla_host *ha,
 
 	/* Update params */
 	ddb_entry->chap_tbl_idx = le16_to_cpu(fw_ddb_entry->chap_tbl_idx);
-	conn->max_recv_dlength = BYTE_UNITS *
-			  le16_to_cpu(fw_ddb_entry->iscsi_max_rcv_data_seg_len);
-
-	conn->max_xmit_dlength = BYTE_UNITS *
-			  le16_to_cpu(fw_ddb_entry->iscsi_max_snd_data_seg_len);
-
-	sess->initial_r2t_en =
-			    (BIT_10 & le16_to_cpu(fw_ddb_entry->iscsi_options));
-
-	sess->max_r2t = le16_to_cpu(fw_ddb_entry->iscsi_max_outsnd_r2t);
-
-	sess->imm_data_en = (BIT_11 & le16_to_cpu(fw_ddb_entry->iscsi_options));
-
-	sess->first_burst = BYTE_UNITS *
-			       le16_to_cpu(fw_ddb_entry->iscsi_first_burst_len);
-
-	sess->max_burst = BYTE_UNITS *
-				 le16_to_cpu(fw_ddb_entry->iscsi_max_burst_len);
-
-	sess->time2wait = le16_to_cpu(fw_ddb_entry->iscsi_def_time2wait);
-
-	sess->time2retain = le16_to_cpu(fw_ddb_entry->iscsi_def_time2retain);
-
-	sess->tpgt = le32_to_cpu(fw_ddb_entry->tgt_portal_grp);
+	qla4xxx_copy_to_sess_conn_params(conn, sess, fw_ddb_entry);
 
 	memcpy(sess->initiatorname, ha->name_string,
 	       min(sizeof(ha->name_string), sizeof(sess->initiatorname)));
 
-	iscsi_set_param(cls_conn, ISCSI_PARAM_TARGET_ALIAS,
-			(char *)fw_ddb_entry->iscsi_alias, 0);
-
 exit_session_conn_param:
 	if (fw_ddb_entry)
 		dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry),
-- 
1.8.2.GIT



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 7/8] qla4xxx: Add support to allow flashnode multi-session login.
  2013-05-09 10:02 [PATCH 0/8] qla4xxx: Updates for scsi "misc" branch vikas.chaudhary
                   ` (5 preceding siblings ...)
  2013-05-09 10:02 ` [PATCH 6/8] qla4xxx: " vikas.chaudhary
@ 2013-05-09 10:02 ` vikas.chaudhary
  2013-05-09 10:02 ` [PATCH 8/8] qla4xxx: Update driver version to 5.03.00-k10 vikas.chaudhary
  2013-06-26 12:46 ` [PATCH 0/8] qla4xxx: Updates for scsi "misc" branch Vikas Chaudhary
  8 siblings, 0 replies; 17+ messages in thread
From: vikas.chaudhary @ 2013-05-09 10:02 UTC (permalink / raw)
  To: jbottomley, michaelc
  Cc: linux-scsi, vikas.chaudhary, lalit.chandivade, ravi.anand,
	Manish Rangankar

From: Manish Rangankar <manish.rangankar@qlogic.com>

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_os.c | 69 ++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 62 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 171c0e4..5271807 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -6977,17 +6977,72 @@ exit_login_st_clr_bit:
 }
 
 static int qla4xxx_ddb_login_nt(struct scsi_qla_host *ha,
-				struct dev_db_entry *fw_ddb_entry,
+				struct dev_db_entry *sfw_ddb_entry,
 				uint16_t idx)
 {
-	int ret = QLA_ERROR;
+	struct ql4_tuple_ddb *temp_tddb = NULL;
+	struct ql4_tuple_ddb *src_tddb = NULL;
+	struct ddb_entry *ddb_entry = NULL;
+	struct iscsi_session *session = NULL;
+	uint8_t is_isid_compare;
+	int ret = QLA_ERROR, status;
+	int i, max_ddbs;
 
-	ret = qla4xxx_is_session_exists(ha, fw_ddb_entry);
-	if (ret != QLA_SUCCESS)
-		ret = qla4xxx_sess_conn_setup(ha, fw_ddb_entry, RESET_ADAPTER,
+	max_ddbs =  is_qla40XX(ha) ? MAX_DEV_DB_ENTRIES_40XX :
+				     MAX_DEV_DB_ENTRIES;
+
+	src_tddb = vzalloc(sizeof(*src_tddb));
+	if (!src_tddb) {
+		ql4_printk(KERN_WARNING, ha, "%s:Memory allocation failed\n",
+			   __func__);
+		ret = -ENOMEM;
+		goto exit_ddb_login;
+	}
+
+	temp_tddb = vzalloc(sizeof(*temp_tddb));
+	if (!temp_tddb) {
+		ql4_printk(KERN_WARNING, ha, "%s:Memory allocation failed\n",
+			   __func__);
+		ret = -ENOMEM;
+		goto exit_ddb_login;
+	}
+
+	qla4xxx_convert_param_ddb(sfw_ddb_entry, src_tddb, NULL);
+
+	for (i = 0; i < max_ddbs; i++) {
+		ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, i);
+		if (ddb_entry == NULL)
+			continue;
+
+		memset(temp_tddb, 0, sizeof(*temp_tddb));
+		qla4xxx_get_param_ddb(ddb_entry, temp_tddb);
+
+		if (ddb_entry->ddb_type != FLASH_DDB) {
+			is_isid_compare = false;
+		} else {
+			session = ddb_entry->sess->dd_data;
+			COPY_ISID(temp_tddb->isid, session->isid);
+			is_isid_compare = true;
+		}
+
+		status = qla4xxx_compare_tuple_ddb(ha, src_tddb, temp_tddb,
+						   is_isid_compare);
+		if (status == QLA_SUCCESS) {
+			ret = -EEXIST;
+			goto exit_ddb_login;
+		} else {
+			continue;
+		}
+	}
+
+	if (i == max_ddbs)
+		ret = qla4xxx_sess_conn_setup(ha, sfw_ddb_entry, RESET_ADAPTER,
 					      idx);
-	else
-		ret = -EPERM;
+exit_ddb_login:
+	if (src_tddb)
+		vfree(src_tddb);
+	if (temp_tddb)
+		vfree(temp_tddb);
 
 	return ret;
 }
-- 
1.8.2.GIT



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 8/8] qla4xxx: Update driver version to 5.03.00-k10
  2013-05-09 10:02 [PATCH 0/8] qla4xxx: Updates for scsi "misc" branch vikas.chaudhary
                   ` (6 preceding siblings ...)
  2013-05-09 10:02 ` [PATCH 7/8] qla4xxx: Add support to allow flashnode multi-session login vikas.chaudhary
@ 2013-05-09 10:02 ` vikas.chaudhary
  2013-06-26 12:46 ` [PATCH 0/8] qla4xxx: Updates for scsi "misc" branch Vikas Chaudhary
  8 siblings, 0 replies; 17+ messages in thread
From: vikas.chaudhary @ 2013-05-09 10:02 UTC (permalink / raw)
  To: jbottomley, michaelc
  Cc: linux-scsi, vikas.chaudhary, lalit.chandivade, ravi.anand

From: Vikas Chaudhary <vikas.chaudhary@qlogic.com>

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
---
 drivers/scsi/qla4xxx/ql4_version.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla4xxx/ql4_version.h b/drivers/scsi/qla4xxx/ql4_version.h
index fe873cf..c5edd0d 100644
--- a/drivers/scsi/qla4xxx/ql4_version.h
+++ b/drivers/scsi/qla4xxx/ql4_version.h
@@ -5,4 +5,4 @@
  * See LICENSE.qla4xxx for copyright and licensing details.
  */
 
-#define QLA4XXX_DRIVER_VERSION	"5.03.00-k9"
+#define QLA4XXX_DRIVER_VERSION	"5.03.00-k10"
-- 
1.8.2.GIT



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/8] iscsi_transport: Additional parameters for net settings
  2013-05-09 10:02 ` [PATCH 2/8] iscsi_transport: Additional parameters for net settings vikas.chaudhary
@ 2013-05-28  8:49   ` Mike Christie
  2013-05-28  8:50     ` Mike Christie
  2013-05-28 11:36     ` Vikas Chaudhary
  0 siblings, 2 replies; 17+ messages in thread
From: Mike Christie @ 2013-05-28  8:49 UTC (permalink / raw)
  To: vikas.chaudhary
  Cc: jbottomley, linux-scsi, lalit.chandivade, ravi.anand, Harish Zunjarrao

Come on man, same comments as last patches like this :) Could you use
the same names that we currently use for existing params?

Check for the inorder ones and the ones where we use en instead of
enabled for the postfix. Also check the others.

Also what is up with isns. If we support passing the addr/port/enabled
then will it work completely in fw? You do not need any driver or
userspace changes for that?


On 05/09/2013 05:02 AM, vikas.chaudhary@qlogic.com wrote:
> From: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
> 
> Added support to display and update additional network parameters
> through iscsiadm
> 
> Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
> ---
>  drivers/scsi/scsi_transport_iscsi.c | 331 +++++++++++++++++++++++++++++++++++-
>  include/scsi/iscsi_if.h             |  78 +++++++++
>  include/scsi/scsi_transport_iscsi.h |   3 +
>  3 files changed, 411 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
> index 133926b..315c8b6 100644
> --- a/drivers/scsi/scsi_transport_iscsi.c
> +++ b/drivers/scsi/scsi_transport_iscsi.c
> @@ -306,11 +306,38 @@ show_##type##_##name(struct device *dev, struct device_attribute *attr,	\
>  	iscsi_iface_attr_show(type, name, ISCSI_NET_PARAM, param)	\
>  static ISCSI_IFACE_ATTR(type, name, S_IRUGO, show_##type##_##name, NULL);
>  
> -/* generic read only ipvi4 attribute */
> +/* generic read only ipv4 attribute */
>  iscsi_iface_net_attr(ipv4_iface, ipaddress, ISCSI_NET_PARAM_IPV4_ADDR);
>  iscsi_iface_net_attr(ipv4_iface, gateway, ISCSI_NET_PARAM_IPV4_GW);
>  iscsi_iface_net_attr(ipv4_iface, subnet, ISCSI_NET_PARAM_IPV4_SUBNET);
>  iscsi_iface_net_attr(ipv4_iface, bootproto, ISCSI_NET_PARAM_IPV4_BOOTPROTO);
> +iscsi_iface_net_attr(ipv4_iface, dhcp_dns_address_enabled,
> +		     ISCSI_NET_PARAM_IPV4_DHCP_DNS_ADDR_EN);
> +iscsi_iface_net_attr(ipv4_iface, dhcp_slp_da_info_enabled,
> +		     ISCSI_NET_PARAM_IPV4_DHCP_SLP_DA_EN);
> +iscsi_iface_net_attr(ipv4_iface, dhcp_req_isns_info_enabled,
> +		     ISCSI_NET_PARAM_IPV4_DHCP_REQ_ISNS_INFO_EN);
> +iscsi_iface_net_attr(ipv4_iface, tos_enabled, ISCSI_NET_PARAM_IPV4_TOS_EN);
> +iscsi_iface_net_attr(ipv4_iface, tos, ISCSI_NET_PARAM_IPV4_TOS);
> +iscsi_iface_net_attr(ipv4_iface, grat_arp_enabled,
> +		     ISCSI_NET_PARAM_IPV4_GRAT_ARP_EN);
> +iscsi_iface_net_attr(ipv4_iface, dhcp_alt_client_id_enabled,
> +		     ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID_EN);
> +iscsi_iface_net_attr(ipv4_iface, dhcp_alt_client_id,
> +		     ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID);
> +iscsi_iface_net_attr(ipv4_iface, dhcp_req_vendor_id_enabled,
> +		     ISCSI_NET_PARAM_IPV4_DHCP_REQ_VENDOR_ID_EN);
> +iscsi_iface_net_attr(ipv4_iface, dhcp_use_vendor_id_enabled,
> +		     ISCSI_NET_PARAM_IPV4_DHCP_USE_VENDOR_ID_EN);
> +iscsi_iface_net_attr(ipv4_iface, dhcp_vendor_id,
> +		     ISCSI_NET_PARAM_IPV4_DHCP_VENDOR_ID);
> +iscsi_iface_net_attr(ipv4_iface, dhcp_learn_iqn_enabled,
> +		     ISCSI_NET_PARAM_IPV4_DHCP_LEARN_IQN_EN);
> +iscsi_iface_net_attr(ipv4_iface, fragmentation_enabled,
> +		     ISCSI_NET_PARAM_IPV4_FRAGMENT_EN);
> +iscsi_iface_net_attr(ipv4_iface, incoming_forwarding_enabled,
> +		     ISCSI_NET_PARAM_IPV4_IN_FORWARD_EN);
> +iscsi_iface_net_attr(ipv4_iface, ttl, ISCSI_NET_PARAM_IPV4_TTL);
>  
>  /* generic read only ipv6 attribute */
>  iscsi_iface_net_attr(ipv6_iface, ipaddress, ISCSI_NET_PARAM_IPV6_ADDR);
> @@ -320,6 +347,27 @@ iscsi_iface_net_attr(ipv6_iface, ipaddr_autocfg,
>  		     ISCSI_NET_PARAM_IPV6_ADDR_AUTOCFG);
>  iscsi_iface_net_attr(ipv6_iface, link_local_autocfg,
>  		     ISCSI_NET_PARAM_IPV6_LINKLOCAL_AUTOCFG);
> +iscsi_iface_net_attr(ipv6_iface, link_local_state,
> +		     ISCSI_NET_PARAM_IPV6_LINKLOCAL_STATE);
> +iscsi_iface_net_attr(ipv6_iface, router_state,
> +		     ISCSI_NET_PARAM_IPV6_ROUTER_STATE);
> +iscsi_iface_net_attr(ipv6_iface, grat_neighbor_adv_enabled,
> +		     ISCSI_NET_PARAM_IPV6_GRAT_NEIGHBOR_ADV_EN);
> +iscsi_iface_net_attr(ipv6_iface, mld_enabled, ISCSI_NET_PARAM_IPV6_MLD_EN);
> +iscsi_iface_net_attr(ipv6_iface, flow_label, ISCSI_NET_PARAM_IPV6_FLOW_LABEL);
> +iscsi_iface_net_attr(ipv6_iface, traffic_class,
> +		     ISCSI_NET_PARAM_IPV6_TRAFFIC_CLASS);
> +iscsi_iface_net_attr(ipv6_iface, hop_limit, ISCSI_NET_PARAM_IPV6_HOP_LIMIT);
> +iscsi_iface_net_attr(ipv6_iface, nd_reachable_tmo,
> +		     ISCSI_NET_PARAM_IPV6_ND_REACHABLE_TMO);
> +iscsi_iface_net_attr(ipv6_iface, nd_rexmit_time,
> +		     ISCSI_NET_PARAM_IPV6_ND_REXMIT_TIME);
> +iscsi_iface_net_attr(ipv6_iface, nd_stale_tmo,
> +		     ISCSI_NET_PARAM_IPV6_ND_STALE_TMO);
> +iscsi_iface_net_attr(ipv6_iface, dup_addr_det_cnt,
> +		     ISCSI_NET_PARAM_IPV6_DUP_ADDR_DET_CNT);
> +iscsi_iface_net_attr(ipv6_iface, router_adv_link_mtu,
> +		     ISCSI_NET_PARAM_IPV6_RTR_ADV_LINK_MTU);
>  
>  /* common read only iface attribute */
>  iscsi_iface_net_attr(iface, enabled, ISCSI_NET_PARAM_IFACE_ENABLE);
> @@ -328,6 +376,51 @@ iscsi_iface_net_attr(iface, vlan_priority, ISCSI_NET_PARAM_VLAN_PRIORITY);
>  iscsi_iface_net_attr(iface, vlan_enabled, ISCSI_NET_PARAM_VLAN_ENABLED);
>  iscsi_iface_net_attr(iface, mtu, ISCSI_NET_PARAM_MTU);
>  iscsi_iface_net_attr(iface, port, ISCSI_NET_PARAM_PORT);
> +iscsi_iface_net_attr(iface, ipaddress_state, ISCSI_NET_PARAM_IPADDR_STATE);
> +iscsi_iface_net_attr(iface, delayed_ack_enabled,
> +		     ISCSI_NET_PARAM_DELAYED_ACK_EN);
> +iscsi_iface_net_attr(iface, isns_enabled, ISCSI_NET_PARAM_ISNS_EN);
> +iscsi_iface_net_attr(iface, isns_address, ISCSI_NET_PARAM_ISNS_ADDR);
> +iscsi_iface_net_attr(iface, isns_port, ISCSI_NET_PARAM_ISNS_PORT);
> +iscsi_iface_net_attr(iface, nagle_enabled, ISCSI_NET_PARAM_NAGLE_EN);
> +iscsi_iface_net_attr(iface, tcp_window_scale_enabled,
> +		     ISCSI_NET_PARAM_TCP_WIN_SCALE_EN);
> +iscsi_iface_net_attr(iface, tcp_window_scale, ISCSI_NET_PARAM_TCP_WIN_SCALE);
> +iscsi_iface_net_attr(iface, tcp_timer_scale, ISCSI_NET_PARAM_TCP_TIMER_SCALE);
> +iscsi_iface_net_attr(iface, tcp_timestamp_enabled,
> +		     ISCSI_NET_PARAM_TCP_TIMESTAMP_EN);
> +iscsi_iface_net_attr(iface, cache_id, ISCSI_NET_PARAM_CACHE_ID);
> +iscsi_iface_net_attr(iface, def_tmf_timeout, ISCSI_NET_PARAM_DEF_TMF_TMO);
> +iscsi_iface_net_attr(iface, def_hdr_dgst_enabled,
> +		     ISCSI_NET_PARAM_DEF_HDRDGST_EN);
> +iscsi_iface_net_attr(iface, def_data_dgst_enabled,
> +		     ISCSI_NET_PARAM_DEF_DATADGST_EN);
> +iscsi_iface_net_attr(iface, def_immediate_data_enabled,
> +		     ISCSI_NET_PARAM_DEF_IMM_DATA_EN);
> +iscsi_iface_net_attr(iface, def_initial_r2t_enabled,
> +		     ISCSI_NET_PARAM_DEF_INITIAL_R2T_EN);
> +iscsi_iface_net_attr(iface, def_data_seq_inorder_enabled,
> +		     ISCSI_NET_PARAM_DEF_DATASEQ_INORDER_EN);
> +iscsi_iface_net_attr(iface, def_data_pdu_inorder_enabled,
> +		     ISCSI_NET_PARAM_DEF_PDU_INORDER_EN);
> +iscsi_iface_net_attr(iface, def_erl, ISCSI_NET_PARAM_DEF_ERL);
> +iscsi_iface_net_attr(iface, def_max_recv_dlen,
> +		     ISCSI_NET_PARAM_DEF_MAX_RECV_DLENGTH);
> +iscsi_iface_net_attr(iface, def_first_burst, ISCSI_NET_PARAM_DEF_FIRST_BURST);
> +iscsi_iface_net_attr(iface, def_max_r2t, ISCSI_NET_PARAM_DEF_MAX_R2T);
> +iscsi_iface_net_attr(iface, def_max_burst, ISCSI_NET_PARAM_DEF_MAX_BURST);
> +iscsi_iface_net_attr(iface, def_chap_auth_enabled,
> +		     ISCSI_NET_PARAM_DEF_CHAP_AUTH_EN);
> +iscsi_iface_net_attr(iface, def_bidi_chap_enabled,
> +		     ISCSI_NET_PARAM_DEF_BIDI_CHAP_EN);
> +iscsi_iface_net_attr(iface, def_strict_login_comp_enabled,
> +		     ISCSI_NET_PARAM_DEF_STRICT_LOGIN_COMP_EN);
> +iscsi_iface_net_attr(iface, def_discovery_auth_enabled,
> +		     ISCSI_NET_PARAM_DEF_DISCOVERY_AUTH_EN);
> +iscsi_iface_net_attr(iface, def_discovery_logout_enabled,
> +		     ISCSI_NET_PARAM_DEF_DISCOVERY_LOGOUT_EN);
> +iscsi_iface_net_attr(iface, def_iscsi_name, ISCSI_NET_PARAM_DEF_ISCSI_NAME);
> +iscsi_iface_net_attr(iface, redirect_enabled, ISCSI_NET_PARAM_REDIRECT_EN);
>  
>  static umode_t iscsi_iface_attr_is_visible(struct kobject *kobj,
>  					  struct attribute *attr, int i)
> @@ -349,6 +442,66 @@ static umode_t iscsi_iface_attr_is_visible(struct kobject *kobj,
>  		param = ISCSI_NET_PARAM_MTU;
>  	else if (attr == &dev_attr_iface_port.attr)
>  		param = ISCSI_NET_PARAM_PORT;
> +	else if (attr == &dev_attr_iface_ipaddress_state.attr)
> +		param = ISCSI_NET_PARAM_IPADDR_STATE;
> +	else if (attr == &dev_attr_iface_delayed_ack_enabled.attr)
> +		param = ISCSI_NET_PARAM_DELAYED_ACK_EN;
> +	else if (attr == &dev_attr_iface_isns_enabled.attr)
> +		param = ISCSI_NET_PARAM_ISNS_EN;
> +	else if (attr == &dev_attr_iface_isns_address.attr)
> +		param = ISCSI_NET_PARAM_ISNS_ADDR;
> +	else if (attr == &dev_attr_iface_isns_port.attr)
> +		param = ISCSI_NET_PARAM_ISNS_PORT;
> +	else if (attr == &dev_attr_iface_nagle_enabled.attr)
> +		param = ISCSI_NET_PARAM_NAGLE_EN;
> +	else if (attr == &dev_attr_iface_tcp_window_scale_enabled.attr)
> +		param = ISCSI_NET_PARAM_TCP_WIN_SCALE_EN;
> +	else if (attr == &dev_attr_iface_tcp_window_scale.attr)
> +		param = ISCSI_NET_PARAM_TCP_WIN_SCALE;
> +	else if (attr == &dev_attr_iface_tcp_timer_scale.attr)
> +		param = ISCSI_NET_PARAM_TCP_TIMER_SCALE;
> +	else if (attr == &dev_attr_iface_tcp_timestamp_enabled.attr)
> +		param = ISCSI_NET_PARAM_TCP_TIMESTAMP_EN;
> +	else if (attr == &dev_attr_iface_cache_id.attr)
> +		param = ISCSI_NET_PARAM_CACHE_ID;
> +	else if (attr == &dev_attr_iface_def_tmf_timeout.attr)
> +		param = ISCSI_NET_PARAM_DEF_TMF_TMO;
> +	else if (attr == &dev_attr_iface_def_hdr_dgst_enabled.attr)
> +		param = ISCSI_NET_PARAM_DEF_HDRDGST_EN;
> +	else if (attr == &dev_attr_iface_def_data_dgst_enabled.attr)
> +		param = ISCSI_NET_PARAM_DEF_DATADGST_EN;
> +	else if (attr == &dev_attr_iface_def_immediate_data_enabled.attr)
> +		param = ISCSI_NET_PARAM_DEF_IMM_DATA_EN;
> +	else if (attr == &dev_attr_iface_def_initial_r2t_enabled.attr)
> +		param = ISCSI_NET_PARAM_DEF_INITIAL_R2T_EN;
> +	else if (attr == &dev_attr_iface_def_data_seq_inorder_enabled.attr)
> +		param = ISCSI_NET_PARAM_DEF_DATASEQ_INORDER_EN;
> +	else if (attr == &dev_attr_iface_def_data_pdu_inorder_enabled.attr)
> +		param = ISCSI_NET_PARAM_DEF_PDU_INORDER_EN;
> +	else if (attr == &dev_attr_iface_def_erl.attr)
> +		param = ISCSI_NET_PARAM_DEF_ERL;
> +	else if (attr == &dev_attr_iface_def_max_recv_dlen.attr)
> +		param = ISCSI_NET_PARAM_DEF_MAX_RECV_DLENGTH;
> +	else if (attr == &dev_attr_iface_def_first_burst.attr)
> +		param = ISCSI_NET_PARAM_DEF_FIRST_BURST;
> +	else if (attr == &dev_attr_iface_def_max_r2t.attr)
> +		param = ISCSI_NET_PARAM_DEF_MAX_R2T;
> +	else if (attr == &dev_attr_iface_def_max_burst.attr)
> +		param = ISCSI_NET_PARAM_DEF_MAX_BURST;
> +	else if (attr == &dev_attr_iface_def_chap_auth_enabled.attr)
> +		param = ISCSI_NET_PARAM_DEF_CHAP_AUTH_EN;
> +	else if (attr == &dev_attr_iface_def_bidi_chap_enabled.attr)
> +		param = ISCSI_NET_PARAM_DEF_BIDI_CHAP_EN;
> +	else if (attr == &dev_attr_iface_def_strict_login_comp_enabled.attr)
> +		param = ISCSI_NET_PARAM_DEF_STRICT_LOGIN_COMP_EN;
> +	else if (attr == &dev_attr_iface_def_discovery_auth_enabled.attr)
> +		param = ISCSI_NET_PARAM_DEF_DISCOVERY_AUTH_EN;
> +	else if (attr == &dev_attr_iface_def_discovery_logout_enabled.attr)
> +		param = ISCSI_NET_PARAM_DEF_DISCOVERY_LOGOUT_EN;
> +	else if (attr == &dev_attr_iface_def_iscsi_name.attr)
> +		param = ISCSI_NET_PARAM_DEF_ISCSI_NAME;
> +	else if (attr == &dev_attr_iface_redirect_enabled.attr)
> +		param = ISCSI_NET_PARAM_REDIRECT_EN;
>  	else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV4) {
>  		if (attr == &dev_attr_ipv4_iface_ipaddress.attr)
>  			param = ISCSI_NET_PARAM_IPV4_ADDR;
> @@ -358,6 +511,45 @@ static umode_t iscsi_iface_attr_is_visible(struct kobject *kobj,
>  			param = ISCSI_NET_PARAM_IPV4_SUBNET;
>  		else if (attr == &dev_attr_ipv4_iface_bootproto.attr)
>  			param = ISCSI_NET_PARAM_IPV4_BOOTPROTO;
> +		else if (attr ==
> +			 &dev_attr_ipv4_iface_dhcp_dns_address_enabled.attr)
> +			param = ISCSI_NET_PARAM_IPV4_DHCP_DNS_ADDR_EN;
> +		else if (attr ==
> +			 &dev_attr_ipv4_iface_dhcp_slp_da_info_enabled.attr)
> +			param = ISCSI_NET_PARAM_IPV4_DHCP_SLP_DA_EN;
> +		else if (attr ==
> +			 &dev_attr_ipv4_iface_dhcp_req_isns_info_enabled.attr)
> +			param = ISCSI_NET_PARAM_IPV4_DHCP_REQ_ISNS_INFO_EN;
> +		else if (attr == &dev_attr_ipv4_iface_tos_enabled.attr)
> +			param = ISCSI_NET_PARAM_IPV4_TOS_EN;
> +		else if (attr == &dev_attr_ipv4_iface_tos.attr)
> +			param = ISCSI_NET_PARAM_IPV4_TOS;
> +		else if (attr == &dev_attr_ipv4_iface_grat_arp_enabled.attr)
> +			param = ISCSI_NET_PARAM_IPV4_GRAT_ARP_EN;
> +		else if (attr ==
> +			 &dev_attr_ipv4_iface_dhcp_alt_client_id_enabled.attr)
> +			param = ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID_EN;
> +		else if (attr == &dev_attr_ipv4_iface_dhcp_alt_client_id.attr)
> +			param = ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID;
> +		else if (attr ==
> +			 &dev_attr_ipv4_iface_dhcp_req_vendor_id_enabled.attr)
> +			param = ISCSI_NET_PARAM_IPV4_DHCP_REQ_VENDOR_ID_EN;
> +		else if (attr ==
> +			 &dev_attr_ipv4_iface_dhcp_use_vendor_id_enabled.attr)
> +			param = ISCSI_NET_PARAM_IPV4_DHCP_USE_VENDOR_ID_EN;
> +		else if (attr == &dev_attr_ipv4_iface_dhcp_vendor_id.attr)
> +			param = ISCSI_NET_PARAM_IPV4_DHCP_VENDOR_ID;
> +		else if (attr ==
> +			 &dev_attr_ipv4_iface_dhcp_learn_iqn_enabled.attr)
> +			param = ISCSI_NET_PARAM_IPV4_DHCP_LEARN_IQN_EN;
> +		else if (attr ==
> +			 &dev_attr_ipv4_iface_fragmentation_enabled.attr)
> +			param = ISCSI_NET_PARAM_IPV4_FRAGMENT_EN;
> +		else if (attr ==
> +			 &dev_attr_ipv4_iface_incoming_forwarding_enabled.attr)
> +			param = ISCSI_NET_PARAM_IPV4_IN_FORWARD_EN;
> +		else if (attr == &dev_attr_ipv4_iface_ttl.attr)
> +			param = ISCSI_NET_PARAM_IPV4_TTL;
>  		else
>  			return 0;
>  	} else if (iface->iface_type == ISCSI_IFACE_TYPE_IPV6) {
> @@ -371,6 +563,31 @@ static umode_t iscsi_iface_attr_is_visible(struct kobject *kobj,
>  			param = ISCSI_NET_PARAM_IPV6_ADDR_AUTOCFG;
>  		else if (attr == &dev_attr_ipv6_iface_link_local_autocfg.attr)
>  			param = ISCSI_NET_PARAM_IPV6_LINKLOCAL_AUTOCFG;
> +		else if (attr == &dev_attr_ipv6_iface_link_local_state.attr)
> +			param = ISCSI_NET_PARAM_IPV6_LINKLOCAL_STATE;
> +		else if (attr == &dev_attr_ipv6_iface_router_state.attr)
> +			param = ISCSI_NET_PARAM_IPV6_ROUTER_STATE;
> +		else if (attr ==
> +			 &dev_attr_ipv6_iface_grat_neighbor_adv_enabled.attr)
> +			param = ISCSI_NET_PARAM_IPV6_GRAT_NEIGHBOR_ADV_EN;
> +		else if (attr == &dev_attr_ipv6_iface_mld_enabled.attr)
> +			param = ISCSI_NET_PARAM_IPV6_MLD_EN;
> +		else if (attr == &dev_attr_ipv6_iface_flow_label.attr)
> +			param = ISCSI_NET_PARAM_IPV6_FLOW_LABEL;
> +		else if (attr == &dev_attr_ipv6_iface_traffic_class.attr)
> +			param = ISCSI_NET_PARAM_IPV6_TRAFFIC_CLASS;
> +		else if (attr == &dev_attr_ipv6_iface_hop_limit.attr)
> +			param = ISCSI_NET_PARAM_IPV6_HOP_LIMIT;
> +		else if (attr == &dev_attr_ipv6_iface_nd_reachable_tmo.attr)
> +			param = ISCSI_NET_PARAM_IPV6_ND_REACHABLE_TMO;
> +		else if (attr == &dev_attr_ipv6_iface_nd_rexmit_time.attr)
> +			param = ISCSI_NET_PARAM_IPV6_ND_REXMIT_TIME;
> +		else if (attr == &dev_attr_ipv6_iface_nd_stale_tmo.attr)
> +			param = ISCSI_NET_PARAM_IPV6_ND_STALE_TMO;
> +		else if (attr == &dev_attr_ipv6_iface_dup_addr_det_cnt.attr)
> +			param = ISCSI_NET_PARAM_IPV6_DUP_ADDR_DET_CNT;
> +		else if (attr == &dev_attr_ipv6_iface_router_adv_link_mtu.attr)
> +			param = ISCSI_NET_PARAM_IPV6_RTR_ADV_LINK_MTU;
>  		else
>  			return 0;
>  	} else {
> @@ -397,6 +614,63 @@ static struct attribute *iscsi_iface_attrs[] = {
>  	&dev_attr_ipv6_iface_link_local_autocfg.attr,
>  	&dev_attr_iface_mtu.attr,
>  	&dev_attr_iface_port.attr,
> +	&dev_attr_iface_ipaddress_state.attr,
> +	&dev_attr_iface_delayed_ack_enabled.attr,
> +	&dev_attr_iface_isns_enabled.attr,
> +	&dev_attr_iface_isns_address.attr,
> +	&dev_attr_iface_isns_port.attr,
> +	&dev_attr_iface_nagle_enabled.attr,
> +	&dev_attr_iface_tcp_window_scale_enabled.attr,
> +	&dev_attr_iface_tcp_window_scale.attr,
> +	&dev_attr_iface_tcp_timer_scale.attr,
> +	&dev_attr_iface_tcp_timestamp_enabled.attr,
> +	&dev_attr_iface_cache_id.attr,
> +	&dev_attr_ipv4_iface_dhcp_dns_address_enabled.attr,
> +	&dev_attr_ipv4_iface_dhcp_slp_da_info_enabled.attr,
> +	&dev_attr_ipv4_iface_dhcp_req_isns_info_enabled.attr,
> +	&dev_attr_ipv4_iface_tos_enabled.attr,
> +	&dev_attr_ipv4_iface_tos.attr,
> +	&dev_attr_ipv4_iface_grat_arp_enabled.attr,
> +	&dev_attr_ipv4_iface_dhcp_alt_client_id_enabled.attr,
> +	&dev_attr_ipv4_iface_dhcp_alt_client_id.attr,
> +	&dev_attr_ipv4_iface_dhcp_req_vendor_id_enabled.attr,
> +	&dev_attr_ipv4_iface_dhcp_use_vendor_id_enabled.attr,
> +	&dev_attr_ipv4_iface_dhcp_vendor_id.attr,
> +	&dev_attr_ipv4_iface_dhcp_learn_iqn_enabled.attr,
> +	&dev_attr_ipv4_iface_fragmentation_enabled.attr,
> +	&dev_attr_ipv4_iface_incoming_forwarding_enabled.attr,
> +	&dev_attr_ipv4_iface_ttl.attr,
> +	&dev_attr_ipv6_iface_link_local_state.attr,
> +	&dev_attr_ipv6_iface_router_state.attr,
> +	&dev_attr_ipv6_iface_grat_neighbor_adv_enabled.attr,
> +	&dev_attr_ipv6_iface_mld_enabled.attr,
> +	&dev_attr_ipv6_iface_flow_label.attr,
> +	&dev_attr_ipv6_iface_traffic_class.attr,
> +	&dev_attr_ipv6_iface_hop_limit.attr,
> +	&dev_attr_ipv6_iface_nd_reachable_tmo.attr,
> +	&dev_attr_ipv6_iface_nd_rexmit_time.attr,
> +	&dev_attr_ipv6_iface_nd_stale_tmo.attr,
> +	&dev_attr_ipv6_iface_dup_addr_det_cnt.attr,
> +	&dev_attr_ipv6_iface_router_adv_link_mtu.attr,
> +	&dev_attr_iface_def_tmf_timeout.attr,
> +	&dev_attr_iface_def_hdr_dgst_enabled.attr,
> +	&dev_attr_iface_def_data_dgst_enabled.attr,
> +	&dev_attr_iface_def_immediate_data_enabled.attr,
> +	&dev_attr_iface_def_initial_r2t_enabled.attr,
> +	&dev_attr_iface_def_data_seq_inorder_enabled.attr,
> +	&dev_attr_iface_def_data_pdu_inorder_enabled.attr,
> +	&dev_attr_iface_def_erl.attr,
> +	&dev_attr_iface_def_max_recv_dlen.attr,
> +	&dev_attr_iface_def_first_burst.attr,
> +	&dev_attr_iface_def_max_r2t.attr,
> +	&dev_attr_iface_def_max_burst.attr,
> +	&dev_attr_iface_def_chap_auth_enabled.attr,
> +	&dev_attr_iface_def_bidi_chap_enabled.attr,
> +	&dev_attr_iface_def_strict_login_comp_enabled.attr,
> +	&dev_attr_iface_def_discovery_auth_enabled.attr,
> +	&dev_attr_iface_def_discovery_logout_enabled.attr,
> +	&dev_attr_iface_def_iscsi_name.attr,
> +	&dev_attr_iface_redirect_enabled.attr,
>  	NULL,
>  };
>  
> @@ -405,6 +679,61 @@ static struct attribute_group iscsi_iface_group = {
>  	.is_visible = iscsi_iface_attr_is_visible,
>  };
>  
> +/* convert iscsi_ipaddress_state values to ascii string name */
> +static const struct {
> +	enum iscsi_ipaddress_state	value;
> +	char				*name;
> +} iscsi_ipaddress_state_names[] = {
> +	{ISCSI_IPDDRESS_STATE_UNCONFIGURED,	"Unconfigured" },
> +	{ISCSI_IPDDRESS_STATE_ACQUIRING,	"Acquiring" },
> +	{ISCSI_IPDDRESS_STATE_TENTATIVE,	"Tentative" },
> +	{ISCSI_IPDDRESS_STATE_VALID,		"Valid" },
> +	{ISCSI_IPDDRESS_STATE_DISABLING,	"Disabling" },
> +	{ISCSI_IPDDRESS_STATE_INVALID,		"Invalid" },
> +	{ISCSI_IPDDRESS_STATE_DEPRECATED,	"Deprecated" },
> +};
> +
> +char *iscsi_get_ipaddress_state_name(enum iscsi_ipaddress_state port_state)
> +{
> +	int i;
> +	char *state = NULL;
> +
> +	for (i = 0; i < ARRAY_SIZE(iscsi_ipaddress_state_names); i++) {
> +		if (iscsi_ipaddress_state_names[i].value == port_state) {
> +			state = iscsi_ipaddress_state_names[i].name;
> +			break;
> +		}
> +	}
> +	return state;
> +}
> +EXPORT_SYMBOL_GPL(iscsi_get_ipaddress_state_name);
> +
> +/* convert iscsi_router_state values to ascii string name */
> +static const struct {
> +	enum iscsi_router_state	value;
> +	char			*name;
> +} iscsi_router_state_names[] = {
> +	{ISCSI_ROUTER_STATE_UNKNOWN,		"Unknown" },
> +	{ISCSI_ROUTER_STATE_ADVERTISED,		"Advertised" },
> +	{ISCSI_ROUTER_STATE_MANUAL,		"Manual" },
> +	{ISCSI_ROUTER_STATE_STALE,		"Stale" },
> +};
> +
> +char *iscsi_get_router_state_name(enum iscsi_router_state router_state)
> +{
> +	int i;
> +	char *state = NULL;
> +
> +	for (i = 0; i < ARRAY_SIZE(iscsi_router_state_names); i++) {
> +		if (iscsi_router_state_names[i].value & router_state) {
> +			state = iscsi_router_state_names[i].name;
> +			break;
> +		}
> +	}
> +	return state;
> +}
> +EXPORT_SYMBOL_GPL(iscsi_get_router_state_name);
> +
>  struct iscsi_iface *
>  iscsi_create_iface(struct Scsi_Host *shost, struct iscsi_transport *transport,
>  		   uint32_t iface_type, uint32_t iface_num, int dd_size)
> diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h
> index 2bc5d1c..c2ee3b3 100644
> --- a/include/scsi/iscsi_if.h
> +++ b/include/scsi/iscsi_if.h
> @@ -374,6 +374,10 @@ struct iscsi_path {
>  #define ISCSI_VLAN_DISABLE	0x01
>  #define ISCSI_VLAN_ENABLE	0x02
>  
> +/* iscsi generic enable/disabled setting for various features */
> +#define ISCSI_NET_PARAM_DISABLE		0x01
> +#define ISCSI_NET_PARAM_ENABLE		0x02
> +
>  /* iSCSI network params */
>  enum iscsi_net_param {
>  	ISCSI_NET_PARAM_IPV4_ADDR		= 1,
> @@ -396,6 +400,80 @@ enum iscsi_net_param {
>  	ISCSI_NET_PARAM_IFACE_NAME,
>  	ISCSI_NET_PARAM_MTU,
>  	ISCSI_NET_PARAM_PORT,
> +	ISCSI_NET_PARAM_IPADDR_STATE,
> +	ISCSI_NET_PARAM_IPV6_LINKLOCAL_STATE,
> +	ISCSI_NET_PARAM_IPV6_ROUTER_STATE,
> +	ISCSI_NET_PARAM_DELAYED_ACK_EN,
> +	ISCSI_NET_PARAM_ISNS_EN,
> +	ISCSI_NET_PARAM_ISNS_ADDR,
> +	ISCSI_NET_PARAM_ISNS_PORT,
> +	ISCSI_NET_PARAM_NAGLE_EN,
> +	ISCSI_NET_PARAM_TCP_WIN_SCALE_EN,
> +	ISCSI_NET_PARAM_TCP_WIN_SCALE,
> +	ISCSI_NET_PARAM_TCP_TIMER_SCALE,
> +	ISCSI_NET_PARAM_TCP_TIMESTAMP_EN,
> +	ISCSI_NET_PARAM_CACHE_ID,
> +	ISCSI_NET_PARAM_IPV4_DHCP_DNS_ADDR_EN,
> +	ISCSI_NET_PARAM_IPV4_DHCP_SLP_DA_EN,
> +	ISCSI_NET_PARAM_IPV4_DHCP_REQ_ISNS_INFO_EN,
> +	ISCSI_NET_PARAM_IPV4_TOS_EN,
> +	ISCSI_NET_PARAM_IPV4_TOS,
> +	ISCSI_NET_PARAM_IPV4_GRAT_ARP_EN,
> +	ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID_EN,
> +	ISCSI_NET_PARAM_IPV4_DHCP_ALT_CLIENT_ID,
> +	ISCSI_NET_PARAM_IPV4_DHCP_REQ_VENDOR_ID_EN,
> +	ISCSI_NET_PARAM_IPV4_DHCP_USE_VENDOR_ID_EN,
> +	ISCSI_NET_PARAM_IPV4_DHCP_VENDOR_ID,
> +	ISCSI_NET_PARAM_IPV4_DHCP_LEARN_IQN_EN,
> +	ISCSI_NET_PARAM_IPV4_FRAGMENT_EN,
> +	ISCSI_NET_PARAM_IPV4_IN_FORWARD_EN,
> +	ISCSI_NET_PARAM_IPV4_TTL,
> +	ISCSI_NET_PARAM_IPV6_GRAT_NEIGHBOR_ADV_EN,
> +	ISCSI_NET_PARAM_IPV6_MLD_EN,
> +	ISCSI_NET_PARAM_IPV6_FLOW_LABEL,
> +	ISCSI_NET_PARAM_IPV6_TRAFFIC_CLASS,
> +	ISCSI_NET_PARAM_IPV6_HOP_LIMIT,
> +	ISCSI_NET_PARAM_IPV6_ND_REACHABLE_TMO,
> +	ISCSI_NET_PARAM_IPV6_ND_REXMIT_TIME,
> +	ISCSI_NET_PARAM_IPV6_ND_STALE_TMO,
> +	ISCSI_NET_PARAM_IPV6_DUP_ADDR_DET_CNT,
> +	ISCSI_NET_PARAM_IPV6_RTR_ADV_LINK_MTU,
> +	ISCSI_NET_PARAM_REDIRECT_EN,
> +	ISCSI_NET_PARAM_DEF_TMF_TMO,
> +	ISCSI_NET_PARAM_DEF_HDRDGST_EN,
> +	ISCSI_NET_PARAM_DEF_DATADGST_EN,
> +	ISCSI_NET_PARAM_DEF_IMM_DATA_EN,
> +	ISCSI_NET_PARAM_DEF_INITIAL_R2T_EN,
> +	ISCSI_NET_PARAM_DEF_DATASEQ_INORDER_EN,
> +	ISCSI_NET_PARAM_DEF_PDU_INORDER_EN,
> +	ISCSI_NET_PARAM_DEF_ERL,
> +	ISCSI_NET_PARAM_DEF_MAX_RECV_DLENGTH,
> +	ISCSI_NET_PARAM_DEF_FIRST_BURST,
> +	ISCSI_NET_PARAM_DEF_MAX_R2T,
> +	ISCSI_NET_PARAM_DEF_MAX_BURST,
> +	ISCSI_NET_PARAM_DEF_CHAP_AUTH_EN,
> +	ISCSI_NET_PARAM_DEF_BIDI_CHAP_EN,
> +	ISCSI_NET_PARAM_DEF_STRICT_LOGIN_COMP_EN,
> +	ISCSI_NET_PARAM_DEF_DISCOVERY_AUTH_EN,
> +	ISCSI_NET_PARAM_DEF_DISCOVERY_LOGOUT_EN,
> +	ISCSI_NET_PARAM_DEF_ISCSI_NAME,
> +};
> +
> +enum iscsi_ipaddress_state {
> +	ISCSI_IPDDRESS_STATE_UNCONFIGURED,
> +	ISCSI_IPDDRESS_STATE_ACQUIRING,
> +	ISCSI_IPDDRESS_STATE_TENTATIVE,
> +	ISCSI_IPDDRESS_STATE_VALID,
> +	ISCSI_IPDDRESS_STATE_DISABLING,
> +	ISCSI_IPDDRESS_STATE_INVALID,
> +	ISCSI_IPDDRESS_STATE_DEPRECATED,
> +};
> +
> +enum iscsi_router_state {
> +	ISCSI_ROUTER_STATE_UNKNOWN,
> +	ISCSI_ROUTER_STATE_ADVERTISED,
> +	ISCSI_ROUTER_STATE_MANUAL,
> +	ISCSI_ROUTER_STATE_STALE,
>  };
>  
>  enum iscsi_conn_state {
> diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
> index d0f1602..d6f2420 100644
> --- a/include/scsi/scsi_transport_iscsi.h
> +++ b/include/scsi/scsi_transport_iscsi.h
> @@ -477,4 +477,7 @@ iscsi_find_flashnode_sess(struct Scsi_Host *shost, void *data,
>  extern struct device *
>  iscsi_find_flashnode_conn(struct iscsi_bus_flash_session *fnode_sess);
>  
> +extern char *
> +iscsi_get_ipaddress_state_name(enum iscsi_ipaddress_state port_state);
> +extern char *iscsi_get_router_state_name(enum iscsi_router_state router_state);
>  #endif
> 


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/8] iscsi_transport: Additional parameters for net settings
  2013-05-28  8:49   ` Mike Christie
@ 2013-05-28  8:50     ` Mike Christie
  2013-05-28 11:36     ` Vikas Chaudhary
  1 sibling, 0 replies; 17+ messages in thread
From: Mike Christie @ 2013-05-28  8:50 UTC (permalink / raw)
  To: vikas.chaudhary
  Cc: jbottomley, linux-scsi, lalit.chandivade, ravi.anand, Harish Zunjarrao

On 05/28/2013 03:49 AM, Mike Christie wrote:
> Come on man, same comments as last patches like this :) Could you use
> the same names that we currently use for existing params?
> 
> Check for the inorder ones and the ones where we use en instead of
> enabled for the postfix. Also check the others.
> 
> Also what is up with isns. If we support passing the addr/port/enabled
> then will it work completely in fw? You do not need any driver or
> userspace changes for that?

For isns support does what you are adding work for flash mode only?


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/8] scsi_transport_iscsi: Exporting new attrs for iscsi session and connection in sysfs
  2013-05-09 10:02 ` [PATCH 4/8] scsi_transport_iscsi: Exporting new attrs for iscsi session and connection in sysfs vikas.chaudhary
@ 2013-05-28  8:57   ` Mike Christie
  2013-05-28 11:55     ` Vikas Chaudhary
  0 siblings, 1 reply; 17+ messages in thread
From: Mike Christie @ 2013-05-28  8:57 UTC (permalink / raw)
  To: vikas.chaudhary
  Cc: jbottomley, linux-scsi, lalit.chandivade, ravi.anand,
	Adheer Chandravanshi

On 05/09/2013 05:02 AM, vikas.chaudhary@qlogic.com wrote:
> +	ISCSI_PARAM_DEF_TASKMGMT_TMO,

We currently have:

        ISCSI_PARAM_ABORT_TMO,
        ISCSI_PARAM_LU_RESET_TMO,
        ISCSI_PARAM_HOST_RESET_TMO,


Does your card just have the one timeout for all types of tmfs?

I think the interface to set timers for the different eh operations
should be generic.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/8] iscsi_transport: Additional parameters for net settings
  2013-05-28  8:49   ` Mike Christie
  2013-05-28  8:50     ` Mike Christie
@ 2013-05-28 11:36     ` Vikas Chaudhary
  2013-05-31 14:26       ` Mike Christie
  1 sibling, 1 reply; 17+ messages in thread
From: Vikas Chaudhary @ 2013-05-28 11:36 UTC (permalink / raw)
  To: Mike Christie
  Cc: jbottomley, linux-scsi, Lalit Chandivade, Ravi Anand, Harish Zunjarrao

[-- Attachment #1: Type: text/plain, Size: 1454 bytes --]



-----Original Message-----
From: Mike Christie <michaelc@cs.wisc.edu>
Date: Tuesday 28 May 2013 2:19 PM
To: Vikas <vikas.chaudhary@qlogic.com>
Cc: "jbottomley@parallels.com" <jbottomley@parallels.com>, scsi
<linux-scsi@vger.kernel.org>, Lalit Chandivade
<lalit.chandivade@qlogic.com>, Ravi Anand <ravi.anand@qlogic.com>, Harish
Zunjarrao <harish.zunjarrao@qlogic.com>
Subject: Re: [PATCH 2/8] iscsi_transport: Additional parameters for net
settings

>Come on man, same comments as last patches like this :) Could you use
>the same names that we currently use for existing params?
>
>Check for the inorder ones and the ones where we use en instead of
>enabled for the postfix. Also check the others.

If we understand correctly you are suggesting to change macro postfix from
EN to ENABLED as in attached patch "iscsi_net_param-fix1.patch".
But we think changing old macro postfix from ENABLED to EN is better way
to fix it. It will make "iscsi_if.h" consistent for iscsi_net_param,
iscsi_param and iscsi_flashnode_param macros as defined in attached patch
"iscsi_net_param-fix2.patch".

Let us know what you think?


>
>Also what is up with isns. If we support passing the addr/port/enabled
>then will it work completely in fw? You do not need any driver or
>userspace changes for that?

For now we are just adding support to enable or disable iSNS.
However we need to modify driver and userspace to support iSNS.


[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 9736 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/8] scsi_transport_iscsi: Exporting new attrs for iscsi session and connection in sysfs
  2013-05-28  8:57   ` Mike Christie
@ 2013-05-28 11:55     ` Vikas Chaudhary
  2013-05-28 16:02       ` Mike Christie
  0 siblings, 1 reply; 17+ messages in thread
From: Vikas Chaudhary @ 2013-05-28 11:55 UTC (permalink / raw)
  To: Mike Christie
  Cc: jbottomley, linux-scsi, Lalit Chandivade, Ravi Anand,
	Adheer Chandravanshi

[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]



-----Original Message-----
From: Mike Christie <michaelc@cs.wisc.edu>
Date: Tuesday 28 May 2013 2:27 PM
To: Vikas <vikas.chaudhary@qlogic.com>
Cc: "jbottomley@parallels.com" <jbottomley@parallels.com>, scsi
<linux-scsi@vger.kernel.org>, Lalit Chandivade
<lalit.chandivade@qlogic.com>, Ravi Anand <ravi.anand@qlogic.com>, Adheer
Chandravanshi <adheer.chandravanshi@qlogic.com>
Subject: Re: [PATCH 4/8] scsi_transport_iscsi: Exporting new attrs for
iscsi session and connection in sysfs

>On 05/09/2013 05:02 AM, vikas.chaudhary@qlogic.com wrote:
>> +	ISCSI_PARAM_DEF_TASKMGMT_TMO,
>
>We currently have:
>
>        ISCSI_PARAM_ABORT_TMO,
>        ISCSI_PARAM_LU_RESET_TMO,
>        ISCSI_PARAM_HOST_RESET_TMO,
>
>
>Does your card just have the one timeout for all types of tmfs?
>
>I think the interface to set timers for the different eh operations
>should be generic.

We have added TASKMGMT_TMO as our adapter sets single TMO for all task
management commands.
Let us know if its ok or not?





[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 4400 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/8] scsi_transport_iscsi: Exporting new attrs for iscsi session and connection in sysfs
  2013-05-28 11:55     ` Vikas Chaudhary
@ 2013-05-28 16:02       ` Mike Christie
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Christie @ 2013-05-28 16:02 UTC (permalink / raw)
  To: Vikas Chaudhary
  Cc: jbottomley, linux-scsi, Lalit Chandivade, Ravi Anand,
	Adheer Chandravanshi

On 05/28/2013 06:55 AM, Vikas Chaudhary wrote:
> 
> 
> -----Original Message-----
> From: Mike Christie <michaelc@cs.wisc.edu>
> Date: Tuesday 28 May 2013 2:27 PM
> To: Vikas <vikas.chaudhary@qlogic.com>
> Cc: "jbottomley@parallels.com" <jbottomley@parallels.com>, scsi
> <linux-scsi@vger.kernel.org>, Lalit Chandivade
> <lalit.chandivade@qlogic.com>, Ravi Anand <ravi.anand@qlogic.com>, Adheer
> Chandravanshi <adheer.chandravanshi@qlogic.com>
> Subject: Re: [PATCH 4/8] scsi_transport_iscsi: Exporting new attrs for
> iscsi session and connection in sysfs
> 
>> On 05/09/2013 05:02 AM, vikas.chaudhary@qlogic.com wrote:
>>> +	ISCSI_PARAM_DEF_TASKMGMT_TMO,
>>
>> We currently have:
>>
>>        ISCSI_PARAM_ABORT_TMO,
>>        ISCSI_PARAM_LU_RESET_TMO,
>>        ISCSI_PARAM_HOST_RESET_TMO,
>>
>>
>> Does your card just have the one timeout for all types of tmfs?
>>
>> I think the interface to set timers for the different eh operations
>> should be generic.
> 
> We have added TASKMGMT_TMO as our adapter sets single TMO for all task
> management commands.
> Let us know if its ok or not?
> 

I was thinking maybe a better name to reflect that it is for all tmfs,
but I think it is ok.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/8] iscsi_transport: Additional parameters for net settings
  2013-05-28 11:36     ` Vikas Chaudhary
@ 2013-05-31 14:26       ` Mike Christie
  0 siblings, 0 replies; 17+ messages in thread
From: Mike Christie @ 2013-05-31 14:26 UTC (permalink / raw)
  To: Vikas Chaudhary
  Cc: jbottomley, linux-scsi, Lalit Chandivade, Ravi Anand, Harish Zunjarrao

On 05/28/2013 06:36 AM, Vikas Chaudhary wrote:
> 
> 
> -----Original Message-----
> From: Mike Christie <michaelc@cs.wisc.edu>
> Date: Tuesday 28 May 2013 2:19 PM
> To: Vikas <vikas.chaudhary@qlogic.com>
> Cc: "jbottomley@parallels.com" <jbottomley@parallels.com>, scsi
> <linux-scsi@vger.kernel.org>, Lalit Chandivade
> <lalit.chandivade@qlogic.com>, Ravi Anand <ravi.anand@qlogic.com>, Harish
> Zunjarrao <harish.zunjarrao@qlogic.com>
> Subject: Re: [PATCH 2/8] iscsi_transport: Additional parameters for net
> settings
> 
>> Come on man, same comments as last patches like this :) Could you use
>> the same names that we currently use for existing params?
>>
>> Check for the inorder ones and the ones where we use en instead of
>> enabled for the postfix. Also check the others.
> 
> If we understand correctly you are suggesting to change macro postfix from
> EN to ENABLED as in attached patch "iscsi_net_param-fix1.patch".
> But we think changing old macro postfix from ENABLED to EN is better way
> to fix it.

I meant the second one. Also in the patch some of the names of sysfs
files and variables use _enabled, but for sysfs we use _en and then some
names just do not match at all.

For example some iface names like data_pdu_inorder_enabled would be
pdu_inorder_en and the data_seq_inorder_enabled would be
dataseq_inorder_en to match what the naming used in the session. There
are others that need to match like immediate data, etc. Check them
before you resubmit.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 0/8] qla4xxx: Updates for scsi "misc" branch
  2013-05-09 10:02 [PATCH 0/8] qla4xxx: Updates for scsi "misc" branch vikas.chaudhary
                   ` (7 preceding siblings ...)
  2013-05-09 10:02 ` [PATCH 8/8] qla4xxx: Update driver version to 5.03.00-k10 vikas.chaudhary
@ 2013-06-26 12:46 ` Vikas Chaudhary
  8 siblings, 0 replies; 17+ messages in thread
From: Vikas Chaudhary @ 2013-06-26 12:46 UTC (permalink / raw)
  To: Vikas Chaudhary, jbottomley, michaelc
  Cc: linux-scsi, Lalit Chandivade, Ravi Anand

[-- Attachment #1: Type: text/plain, Size: 1692 bytes --]



-----Original Message-----
From: Vikas <vikas.chaudhary@qlogic.com>
Date: Thursday 9 May 2013 3:32 PM
To: "jbottomley@parallels.com" <jbottomley@parallels.com>, Mike Christie
<michaelc@cs.wisc.edu>
Cc: scsi <linux-scsi@vger.kernel.org>, Admin <vikas.chaudhary@qlogic.com>,
Lalit Chandivade <lalit.chandivade@qlogic.com>, Ravi Anand
<ravi.anand@qlogic.com>
Subject: [PATCH 0/8] qla4xxx: Updates for scsi "misc" branch

>From: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
>
>James,
>
>Following patches are to display additional iSCSI connection and session
>parameters to sysfs as well allow setting and display of additional
>Network
>parameter for iSCSI interface.
>
>Please apply these patches to the scsi tree "misc" branch at your
>earliest convenience.
>
>Adheer Chandravanshi (3):
>      scsi_transport_iscsi: Exporting new attrs for iscsi session and
>connection in sysfs
>      libiscsi: Exporting new attrs for iscsi session and connection in
>sysfs
>      qla4xxx: Exporting new attrs for iscsi session and connection in
>sysfs
>
>Harish Zunjarrao (3):
>      iscsi_transport: Remove net param enum numbers
>      iscsi_transport: Additional parameters for net settings
>      qla4xxx: Additional parameters for net settings
>
>Manish Rangankar (1):
>      qla4xxx: Add support to allow flashnode multi-session login.
>
>Vikas Chaudhary (1):
>      qla4xxx: Update driver version to 5.03.00-k10


We are holding on Network parameter configuration patches for now and have
resubmitted
session and connection additional parameters patches to the list in this
patch set :-
http://marc.info/?l=linux-scsi&m=137225028529586&w=2





[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 4536 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-06-26 12:46 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-09 10:02 [PATCH 0/8] qla4xxx: Updates for scsi "misc" branch vikas.chaudhary
2013-05-09 10:02 ` [PATCH 1/8] iscsi_transport: Remove net param enum numbers vikas.chaudhary
2013-05-09 10:02 ` [PATCH 2/8] iscsi_transport: Additional parameters for net settings vikas.chaudhary
2013-05-28  8:49   ` Mike Christie
2013-05-28  8:50     ` Mike Christie
2013-05-28 11:36     ` Vikas Chaudhary
2013-05-31 14:26       ` Mike Christie
2013-05-09 10:02 ` [PATCH 3/8] qla4xxx: " vikas.chaudhary
2013-05-09 10:02 ` [PATCH 4/8] scsi_transport_iscsi: Exporting new attrs for iscsi session and connection in sysfs vikas.chaudhary
2013-05-28  8:57   ` Mike Christie
2013-05-28 11:55     ` Vikas Chaudhary
2013-05-28 16:02       ` Mike Christie
2013-05-09 10:02 ` [PATCH 5/8] libiscsi: " vikas.chaudhary
2013-05-09 10:02 ` [PATCH 6/8] qla4xxx: " vikas.chaudhary
2013-05-09 10:02 ` [PATCH 7/8] qla4xxx: Add support to allow flashnode multi-session login vikas.chaudhary
2013-05-09 10:02 ` [PATCH 8/8] qla4xxx: Update driver version to 5.03.00-k10 vikas.chaudhary
2013-06-26 12:46 ` [PATCH 0/8] qla4xxx: Updates for scsi "misc" branch Vikas Chaudhary

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.