aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_fw.h
diff options
context:
space:
mode:
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>2010-04-28 02:07:07 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-05-02 15:38:19 -0400
commit2a49a78ed3c8d7c8319595270110c69f99c61a74 (patch)
tree14a771d774b25525aa1604e48004b6bc0415c104 /drivers/scsi/qla4xxx/ql4_fw.h
parent3487d9e7c4727b3e587f61d2120e35e34f200faa (diff)
[SCSI] qla4xxx: added IPv6 support.
Signed-off-by: Karen Higgins <karen.higgins@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_fw.h')
-rw-r--r--drivers/scsi/qla4xxx/ql4_fw.h45
1 files changed, 38 insertions, 7 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_fw.h b/drivers/scsi/qla4xxx/ql4_fw.h
index 9cd7a608df38..dfe7b4dd3912 100644
--- a/drivers/scsi/qla4xxx/ql4_fw.h
+++ b/drivers/scsi/qla4xxx/ql4_fw.h
@@ -258,13 +258,15 @@ union external_hw_config_reg {
258/* Mailbox 1 */ 258/* Mailbox 1 */
259#define FW_STATE_READY 0x0000 259#define FW_STATE_READY 0x0000
260#define FW_STATE_CONFIG_WAIT 0x0001 260#define FW_STATE_CONFIG_WAIT 0x0001
261#define FW_STATE_WAIT_LOGIN 0x0002 261#define FW_STATE_WAIT_AUTOCONNECT 0x0002
262#define FW_STATE_ERROR 0x0004 262#define FW_STATE_ERROR 0x0004
263#define FW_STATE_DHCP_IN_PROGRESS 0x0008 263#define FW_STATE_CONFIGURING_IP 0x0008
264 264
265/* Mailbox 3 */ 265/* Mailbox 3 */
266#define FW_ADDSTATE_OPTICAL_MEDIA 0x0001 266#define FW_ADDSTATE_OPTICAL_MEDIA 0x0001
267#define FW_ADDSTATE_DHCP_ENABLED 0x0002 267#define FW_ADDSTATE_DHCPv4_ENABLED 0x0002
268#define FW_ADDSTATE_DHCPv4_LEASE_ACQUIRED 0x0004
269#define FW_ADDSTATE_DHCPv4_LEASE_EXPIRED 0x0008
268#define FW_ADDSTATE_LINK_UP 0x0010 270#define FW_ADDSTATE_LINK_UP 0x0010
269#define FW_ADDSTATE_ISNS_SVC_ENABLED 0x0020 271#define FW_ADDSTATE_ISNS_SVC_ENABLED 0x0020
270#define MBOX_CMD_GET_DATABASE_ENTRY_DEFAULTS 0x006B 272#define MBOX_CMD_GET_DATABASE_ENTRY_DEFAULTS 0x006B
@@ -320,6 +322,8 @@ union external_hw_config_reg {
320/* Host Adapter Initialization Control Block (from host) */ 322/* Host Adapter Initialization Control Block (from host) */
321struct addr_ctrl_blk { 323struct addr_ctrl_blk {
322 uint8_t version; /* 00 */ 324 uint8_t version; /* 00 */
325#define IFCB_VER_MIN 0x01
326#define IFCB_VER_MAX 0x02
323 uint8_t control; /* 01 */ 327 uint8_t control; /* 01 */
324 328
325 uint16_t fw_options; /* 02-03 */ 329 uint16_t fw_options; /* 02-03 */
@@ -351,11 +355,16 @@ struct addr_ctrl_blk {
351 uint16_t iscsi_opts; /* 30-31 */ 355 uint16_t iscsi_opts; /* 30-31 */
352 uint16_t ipv4_tcp_opts; /* 32-33 */ 356 uint16_t ipv4_tcp_opts; /* 32-33 */
353 uint16_t ipv4_ip_opts; /* 34-35 */ 357 uint16_t ipv4_ip_opts; /* 34-35 */
358#define IPOPT_IPv4_PROTOCOL_ENABLE 0x8000
354 359
355 uint16_t iscsi_max_pdu_size; /* 36-37 */ 360 uint16_t iscsi_max_pdu_size; /* 36-37 */
356 uint8_t ipv4_tos; /* 38 */ 361 uint8_t ipv4_tos; /* 38 */
357 uint8_t ipv4_ttl; /* 39 */ 362 uint8_t ipv4_ttl; /* 39 */
358 uint8_t acb_version; /* 3A */ 363 uint8_t acb_version; /* 3A */
364#define ACB_NOT_SUPPORTED 0x00
365#define ACB_SUPPORTED 0x02 /* Capable of ACB Version 2
366 Features */
367
359 uint8_t res2; /* 3B */ 368 uint8_t res2; /* 3B */
360 uint16_t def_timeout; /* 3C-3D */ 369 uint16_t def_timeout; /* 3C-3D */
361 uint16_t iscsi_fburst_len; /* 3E-3F */ 370 uint16_t iscsi_fburst_len; /* 3E-3F */
@@ -397,16 +406,35 @@ struct addr_ctrl_blk {
397 uint32_t cookie; /* 200-203 */ 406 uint32_t cookie; /* 200-203 */
398 uint16_t ipv6_port; /* 204-205 */ 407 uint16_t ipv6_port; /* 204-205 */
399 uint16_t ipv6_opts; /* 206-207 */ 408 uint16_t ipv6_opts; /* 206-207 */
409#define IPV6_OPT_IPV6_PROTOCOL_ENABLE 0x8000
410
400 uint16_t ipv6_addtl_opts; /* 208-209 */ 411 uint16_t ipv6_addtl_opts; /* 208-209 */
412#define IPV6_ADDOPT_NEIGHBOR_DISCOVERY_ADDR_ENABLE 0x0002 /* Pri ACB
413 Only */
414#define IPV6_ADDOPT_AUTOCONFIG_LINK_LOCAL_ADDR 0x0001
415
401 uint16_t ipv6_tcp_opts; /* 20A-20B */ 416 uint16_t ipv6_tcp_opts; /* 20A-20B */
402 uint8_t ipv6_tcp_wsf; /* 20C */ 417 uint8_t ipv6_tcp_wsf; /* 20C */
403 uint16_t ipv6_flow_lbl; /* 20D-20F */ 418 uint16_t ipv6_flow_lbl; /* 20D-20F */
404 uint8_t ipv6_gw_addr[16]; /* 210-21F */ 419 uint8_t ipv6_dflt_rtr_addr[16]; /* 210-21F */
405 uint16_t ipv6_vlan_tag; /* 220-221 */ 420 uint16_t ipv6_vlan_tag; /* 220-221 */
406 uint8_t ipv6_lnk_lcl_addr_state;/* 222 */ 421 uint8_t ipv6_lnk_lcl_addr_state;/* 222 */
407 uint8_t ipv6_addr0_state; /* 223 */ 422 uint8_t ipv6_addr0_state; /* 223 */
408 uint8_t ipv6_addr1_state; /* 224 */ 423 uint8_t ipv6_addr1_state; /* 224 */
409 uint8_t ipv6_gw_state; /* 225 */ 424#define IP_ADDRSTATE_UNCONFIGURED 0
425#define IP_ADDRSTATE_INVALID 1
426#define IP_ADDRSTATE_ACQUIRING 2
427#define IP_ADDRSTATE_TENTATIVE 3
428#define IP_ADDRSTATE_DEPRICATED 4
429#define IP_ADDRSTATE_PREFERRED 5
430#define IP_ADDRSTATE_DISABLING 6
431
432 uint8_t ipv6_dflt_rtr_state; /* 225 */
433#define IPV6_RTRSTATE_UNKNOWN 0
434#define IPV6_RTRSTATE_MANUAL 1
435#define IPV6_RTRSTATE_ADVERTISED 3
436#define IPV6_RTRSTATE_STALE 4
437
410 uint8_t ipv6_traffic_class; /* 226 */ 438 uint8_t ipv6_traffic_class; /* 226 */
411 uint8_t ipv6_hop_limit; /* 227 */ 439 uint8_t ipv6_hop_limit; /* 227 */
412 uint8_t ipv6_if_id[8]; /* 228-22F */ 440 uint8_t ipv6_if_id[8]; /* 228-22F */
@@ -424,7 +452,7 @@ struct addr_ctrl_blk {
424 452
425struct init_fw_ctrl_blk { 453struct init_fw_ctrl_blk {
426 struct addr_ctrl_blk pri; 454 struct addr_ctrl_blk pri;
427 struct addr_ctrl_blk sec; 455/* struct addr_ctrl_blk sec;*/
428}; 456};
429 457
430/*************************************************************************/ 458/*************************************************************************/
@@ -433,6 +461,9 @@ struct dev_db_entry {
433 uint16_t options; /* 00-01 */ 461 uint16_t options; /* 00-01 */
434#define DDB_OPT_DISC_SESSION 0x10 462#define DDB_OPT_DISC_SESSION 0x10
435#define DDB_OPT_TARGET 0x02 /* device is a target */ 463#define DDB_OPT_TARGET 0x02 /* device is a target */
464#define DDB_OPT_IPV6_DEVICE 0x100
465#define DDB_OPT_IPV6_NULL_LINK_LOCAL 0x800 /* post connection */
466#define DDB_OPT_IPV6_FW_DEFINED_LINK_LOCAL 0x800 /* pre connection */
436 467
437 uint16_t exec_throttle; /* 02-03 */ 468 uint16_t exec_throttle; /* 02-03 */
438 uint16_t exec_count; /* 04-05 */ 469 uint16_t exec_count; /* 04-05 */
@@ -468,7 +499,7 @@ struct dev_db_entry {
468 * pointer to a string so we 499 * pointer to a string so we
469 * don't have to reserve soooo 500 * don't have to reserve soooo
470 * much RAM */ 501 * much RAM */
471 uint8_t ipv6_addr[0x10];/* 1A0-1AF */ 502 uint8_t link_local_ipv6_addr[0x10]; /* 1A0-1AF */
472 uint8_t res5[0x10]; /* 1B0-1BF */ 503 uint8_t res5[0x10]; /* 1B0-1BF */
473 uint16_t ddb_link; /* 1C0-1C1 */ 504 uint16_t ddb_link; /* 1C0-1C1 */
474 uint16_t chap_tbl_idx; /* 1C2-1C3 */ 505 uint16_t chap_tbl_idx; /* 1C2-1C3 */