diff options
author | Vikas Chaudhary <vikas.chaudhary@qlogic.com> | 2010-04-28 02:07:07 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-05-02 15:38:19 -0400 |
commit | 2a49a78ed3c8d7c8319595270110c69f99c61a74 (patch) | |
tree | 14a771d774b25525aa1604e48004b6bc0415c104 /drivers/scsi/qla4xxx/ql4_def.h | |
parent | 3487d9e7c4727b3e587f61d2120e35e34f200faa (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_def.h')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_def.h | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h index 81b5f29254e2..3175709d4861 100644 --- a/drivers/scsi/qla4xxx/ql4_def.h +++ b/drivers/scsi/qla4xxx/ql4_def.h | |||
@@ -114,6 +114,7 @@ | |||
114 | */ | 114 | */ |
115 | #define MAC_ADDR_LEN 6 /* in bytes */ | 115 | #define MAC_ADDR_LEN 6 /* in bytes */ |
116 | #define IP_ADDR_LEN 4 /* in bytes */ | 116 | #define IP_ADDR_LEN 4 /* in bytes */ |
117 | #define IPv6_ADDR_LEN 16 /* IPv6 address size */ | ||
117 | #define DRIVER_NAME "qla4xxx" | 118 | #define DRIVER_NAME "qla4xxx" |
118 | 119 | ||
119 | #define MAX_LINKED_CMDS_PER_LUN 3 | 120 | #define MAX_LINKED_CMDS_PER_LUN 3 |
@@ -220,7 +221,7 @@ struct ddb_entry { | |||
220 | 221 | ||
221 | uint16_t os_target_id; /* Target ID */ | 222 | uint16_t os_target_id; /* Target ID */ |
222 | uint16_t fw_ddb_index; /* DDB firmware index */ | 223 | uint16_t fw_ddb_index; /* DDB firmware index */ |
223 | uint8_t reserved[2]; | 224 | uint16_t options; |
224 | uint32_t fw_ddb_device_state; /* F/W Device State -- see ql4_fw.h */ | 225 | uint32_t fw_ddb_device_state; /* F/W Device State -- see ql4_fw.h */ |
225 | 226 | ||
226 | uint32_t CmdSn; | 227 | uint32_t CmdSn; |
@@ -245,10 +246,18 @@ struct ddb_entry { | |||
245 | 246 | ||
246 | uint16_t port; | 247 | uint16_t port; |
247 | uint32_t tpgt; | 248 | uint32_t tpgt; |
248 | uint8_t ip_addr[ISCSI_IPADDR_SIZE]; | 249 | uint8_t ip_addr[IP_ADDR_LEN]; |
249 | uint8_t iscsi_name[ISCSI_NAME_SIZE]; /* 72 x48 */ | 250 | uint8_t iscsi_name[ISCSI_NAME_SIZE]; /* 72 x48 */ |
250 | uint8_t iscsi_alias[0x20]; | 251 | uint8_t iscsi_alias[0x20]; |
251 | uint8_t isid[6]; | 252 | uint8_t isid[6]; |
253 | uint16_t iscsi_max_burst_len; | ||
254 | uint16_t iscsi_max_outsnd_r2t; | ||
255 | uint16_t iscsi_first_burst_len; | ||
256 | uint16_t iscsi_max_rcv_data_seg_len; | ||
257 | uint16_t iscsi_max_snd_data_seg_len; | ||
258 | |||
259 | struct in6_addr remote_ipv6_addr; | ||
260 | struct in6_addr link_local_ipv6_addr; | ||
252 | }; | 261 | }; |
253 | 262 | ||
254 | /* | 263 | /* |
@@ -441,8 +450,35 @@ struct scsi_qla_host { | |||
441 | 450 | ||
442 | /* Saved srb for status continuation entry processing */ | 451 | /* Saved srb for status continuation entry processing */ |
443 | struct srb *status_srb; | 452 | struct srb *status_srb; |
453 | |||
454 | /* IPv6 support info from InitFW */ | ||
455 | uint8_t acb_version; | ||
456 | uint8_t ipv4_addr_state; | ||
457 | uint16_t ipv4_options; | ||
458 | |||
459 | uint32_t resvd2; | ||
460 | uint32_t ipv6_options; | ||
461 | uint32_t ipv6_addl_options; | ||
462 | uint8_t ipv6_link_local_state; | ||
463 | uint8_t ipv6_addr0_state; | ||
464 | uint8_t ipv6_addr1_state; | ||
465 | uint8_t ipv6_default_router_state; | ||
466 | struct in6_addr ipv6_link_local_addr; | ||
467 | struct in6_addr ipv6_addr0; | ||
468 | struct in6_addr ipv6_addr1; | ||
469 | struct in6_addr ipv6_default_router_addr; | ||
444 | }; | 470 | }; |
445 | 471 | ||
472 | static inline int is_ipv4_enabled(struct scsi_qla_host *ha) | ||
473 | { | ||
474 | return ((ha->ipv4_options & IPOPT_IPv4_PROTOCOL_ENABLE) != 0); | ||
475 | } | ||
476 | |||
477 | static inline int is_ipv6_enabled(struct scsi_qla_host *ha) | ||
478 | { | ||
479 | return ((ha->ipv6_options & IPV6_OPT_IPV6_PROTOCOL_ENABLE) != 0); | ||
480 | } | ||
481 | |||
446 | static inline int is_qla4010(struct scsi_qla_host *ha) | 482 | static inline int is_qla4010(struct scsi_qla_host *ha) |
447 | { | 483 | { |
448 | return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4010; | 484 | return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4010; |