diff options
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_def.h')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_def.h | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h index 81b5f29254e..428802616e3 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 |
@@ -147,6 +148,8 @@ | |||
147 | 148 | ||
148 | #define MAX_RESET_HA_RETRIES 2 | 149 | #define MAX_RESET_HA_RETRIES 2 |
149 | 150 | ||
151 | #define CMD_SP(Cmnd) ((Cmnd)->SCp.ptr) | ||
152 | |||
150 | /* | 153 | /* |
151 | * SCSI Request Block structure (srb) that is placed | 154 | * SCSI Request Block structure (srb) that is placed |
152 | * on cmd->SCp location of every I/O [We have 22 bytes available] | 155 | * on cmd->SCp location of every I/O [We have 22 bytes available] |
@@ -169,7 +172,7 @@ struct srb { | |||
169 | 172 | ||
170 | struct scsi_cmnd *cmd; /* (4) SCSI command block */ | 173 | struct scsi_cmnd *cmd; /* (4) SCSI command block */ |
171 | dma_addr_t dma_handle; /* (4) for unmap of single transfers */ | 174 | dma_addr_t dma_handle; /* (4) for unmap of single transfers */ |
172 | atomic_t ref_count; /* reference count for this srb */ | 175 | struct kref srb_ref; /* reference count for this srb */ |
173 | uint32_t fw_ddb_index; | 176 | uint32_t fw_ddb_index; |
174 | uint8_t err_id; /* error id */ | 177 | uint8_t err_id; /* error id */ |
175 | #define SRB_ERR_PORT 1 /* Request failed because "port down" */ | 178 | #define SRB_ERR_PORT 1 /* Request failed because "port down" */ |
@@ -220,7 +223,7 @@ struct ddb_entry { | |||
220 | 223 | ||
221 | uint16_t os_target_id; /* Target ID */ | 224 | uint16_t os_target_id; /* Target ID */ |
222 | uint16_t fw_ddb_index; /* DDB firmware index */ | 225 | uint16_t fw_ddb_index; /* DDB firmware index */ |
223 | uint8_t reserved[2]; | 226 | uint16_t options; |
224 | uint32_t fw_ddb_device_state; /* F/W Device State -- see ql4_fw.h */ | 227 | uint32_t fw_ddb_device_state; /* F/W Device State -- see ql4_fw.h */ |
225 | 228 | ||
226 | uint32_t CmdSn; | 229 | uint32_t CmdSn; |
@@ -245,10 +248,18 @@ struct ddb_entry { | |||
245 | 248 | ||
246 | uint16_t port; | 249 | uint16_t port; |
247 | uint32_t tpgt; | 250 | uint32_t tpgt; |
248 | uint8_t ip_addr[ISCSI_IPADDR_SIZE]; | 251 | uint8_t ip_addr[IP_ADDR_LEN]; |
249 | uint8_t iscsi_name[ISCSI_NAME_SIZE]; /* 72 x48 */ | 252 | uint8_t iscsi_name[ISCSI_NAME_SIZE]; /* 72 x48 */ |
250 | uint8_t iscsi_alias[0x20]; | 253 | uint8_t iscsi_alias[0x20]; |
251 | uint8_t isid[6]; | 254 | uint8_t isid[6]; |
255 | uint16_t iscsi_max_burst_len; | ||
256 | uint16_t iscsi_max_outsnd_r2t; | ||
257 | uint16_t iscsi_first_burst_len; | ||
258 | uint16_t iscsi_max_rcv_data_seg_len; | ||
259 | uint16_t iscsi_max_snd_data_seg_len; | ||
260 | |||
261 | struct in6_addr remote_ipv6_addr; | ||
262 | struct in6_addr link_local_ipv6_addr; | ||
252 | }; | 263 | }; |
253 | 264 | ||
254 | /* | 265 | /* |
@@ -301,6 +312,7 @@ struct scsi_qla_host { | |||
301 | #define DPC_ISNS_RESTART 7 /* 0x00000080 */ | 312 | #define DPC_ISNS_RESTART 7 /* 0x00000080 */ |
302 | #define DPC_AEN 9 /* 0x00000200 */ | 313 | #define DPC_AEN 9 /* 0x00000200 */ |
303 | #define DPC_GET_DHCP_IP_ADDR 15 /* 0x00008000 */ | 314 | #define DPC_GET_DHCP_IP_ADDR 15 /* 0x00008000 */ |
315 | #define DPC_LINK_CHANGED 18 /* 0x00040000 */ | ||
304 | 316 | ||
305 | struct Scsi_Host *host; /* pointer to host data */ | 317 | struct Scsi_Host *host; /* pointer to host data */ |
306 | uint32_t tot_ddbs; | 318 | uint32_t tot_ddbs; |
@@ -320,8 +332,7 @@ struct scsi_qla_host { | |||
320 | #define MIN_IOBASE_LEN 0x100 | 332 | #define MIN_IOBASE_LEN 0x100 |
321 | 333 | ||
322 | uint16_t req_q_count; | 334 | uint16_t req_q_count; |
323 | uint8_t marker_needed; | 335 | uint8_t rsvd1[2]; |
324 | uint8_t rsvd1; | ||
325 | 336 | ||
326 | unsigned long host_no; | 337 | unsigned long host_no; |
327 | 338 | ||
@@ -441,8 +452,35 @@ struct scsi_qla_host { | |||
441 | 452 | ||
442 | /* Saved srb for status continuation entry processing */ | 453 | /* Saved srb for status continuation entry processing */ |
443 | struct srb *status_srb; | 454 | struct srb *status_srb; |
455 | |||
456 | /* IPv6 support info from InitFW */ | ||
457 | uint8_t acb_version; | ||
458 | uint8_t ipv4_addr_state; | ||
459 | uint16_t ipv4_options; | ||
460 | |||
461 | uint32_t resvd2; | ||
462 | uint32_t ipv6_options; | ||
463 | uint32_t ipv6_addl_options; | ||
464 | uint8_t ipv6_link_local_state; | ||
465 | uint8_t ipv6_addr0_state; | ||
466 | uint8_t ipv6_addr1_state; | ||
467 | uint8_t ipv6_default_router_state; | ||
468 | struct in6_addr ipv6_link_local_addr; | ||
469 | struct in6_addr ipv6_addr0; | ||
470 | struct in6_addr ipv6_addr1; | ||
471 | struct in6_addr ipv6_default_router_addr; | ||
444 | }; | 472 | }; |
445 | 473 | ||
474 | static inline int is_ipv4_enabled(struct scsi_qla_host *ha) | ||
475 | { | ||
476 | return ((ha->ipv4_options & IPOPT_IPv4_PROTOCOL_ENABLE) != 0); | ||
477 | } | ||
478 | |||
479 | static inline int is_ipv6_enabled(struct scsi_qla_host *ha) | ||
480 | { | ||
481 | return ((ha->ipv6_options & IPV6_OPT_IPV6_PROTOCOL_ENABLE) != 0); | ||
482 | } | ||
483 | |||
446 | static inline int is_qla4010(struct scsi_qla_host *ha) | 484 | static inline int is_qla4010(struct scsi_qla_host *ha) |
447 | { | 485 | { |
448 | return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4010; | 486 | return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4010; |