--- old/usr/src/uts/common/sys/fibre-channel/fca/qlc/ql_iocb.h	Mon Aug  5 17:35:49 2019
+++ new/usr/src/uts/common/sys/fibre-channel/fca/qlc/ql_iocb.h	Mon Aug  5 17:35:49 2019
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 
-/* Copyright 2010 QLogic Corporation */
+/* Copyright 2015 QLogic Corporation */
 
 /*
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
@@ -34,7 +34,7 @@
  * ***********************************************************************
  * *									**
  * *				NOTICE					**
- * *		COPYRIGHT (C) 1996-2010 QLOGIC CORPORATION		**
+ * *		COPYRIGHT (C) 1996-2015 QLOGIC CORPORATION		**
  * *			ALL RIGHTS RESERVED				**
  * *									**
  * ***********************************************************************
@@ -45,8 +45,18 @@
 extern "C" {
 #endif
 
-#define	INVALID_ENTRY_TYPE	0
+typedef struct ql_64bit_data_seg {
+	uint32_t	address[2];
+	uint32_t	length;
+} ql_64bit_data_seg_t;
 
+typedef struct ql_32bit_data_seg {
+	uint32_t	address;
+	uint32_t	length;
+} ql_32bit_data_seg_t;
+
+#define	ABORTED_ENTRY_TYPE	0
+
 /*
  * ISP queue -	32-Bit DMA addressing command with extended LUN support
  *		entry structure definition.
@@ -55,28 +65,23 @@
 #define	MAX_CMDSZ		16	/* SCSI maximum CDB size. */
 #define	CMD_TYPE_2_DATA_SEGMENTS	3	/* Number of data segments. */
 typedef struct cmd_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
-	uint8_t  target_l;		/* SCSI ID - LSB */
-	uint8_t  target_h;		/* SCSI ID - MSB */
-	uint8_t  lun_l;			/* SCSI LUN - LSB */
-	uint8_t  lun_h;			/* SCSI LUN - MSB */
-	uint8_t  control_flags_l;	/* Control flags - LSB. */
-	uint8_t  control_flags_h;	/* Control flags - MSB. */
-	uint8_t  reserved_1[2];
+	uint8_t target_l;		/* SCSI ID - LSB */
+	uint8_t target_h;		/* SCSI ID - MSB */
+	uint8_t lun_l;			/* SCSI LUN - LSB */
+	uint8_t lun_h;			/* SCSI LUN - MSB */
+	uint8_t control_flags_l;	/* Control flags - LSB. */
+	uint8_t control_flags_h;	/* Control flags - MSB. */
+	uint8_t reserved_1[2];
 	uint16_t timeout;		/* Command timeout. */
 	uint16_t dseg_count;		/* Data segment count - LSB. */
-	uint8_t  scsi_cdb[MAX_CMDSZ];	/* SCSI command words. */
+	uint8_t scsi_cdb[MAX_CMDSZ];	/* SCSI command words. */
 	uint32_t byte_count;		/* Total byte count. */
-	uint32_t dseg_0_address;	/* Data segment 0 address. */
-	uint32_t dseg_0_length;		/* Data segment 0 length. */
-	uint32_t dseg_1_address;	/* Data segment 1 address. */
-	uint32_t dseg_1_length;		/* Data segment 1 length. */
-	uint32_t dseg_2_address;	/* Data segment 2 address. */
-	uint32_t dseg_2_length;		/* Data segment 2 length. */
+	ql_32bit_data_seg_t	dseg[3];	/* Data segments. */
 } cmd_entry_t, request_t;
 
 /*
@@ -92,28 +97,27 @@
  * ISP24xx queue - Command IOCB structure definition.
  */
 #define	IOCB_CMD_TYPE_7		0x18
-#define	CMD_TYPE_7_DATA_SEGMENTS   1	/* Number of 64 bit data segments. */
+#define	CMD_TYPE_7_DATA_SEGMENTS 1	/* Number of 64 bit data segments. */
 typedef struct cmd7_24xx_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
 	uint16_t n_port_hdl;
 	uint16_t timeout;		/* Command timeout. */
 	uint16_t dseg_count;
-	uint8_t  reserved_1[2];
-	uint8_t  fcp_lun[8];		/* SCSI LUN ID. */
-	uint8_t  control_flags;
-	uint8_t  task_mgmt;		/* Task management flags. */
-	uint8_t  task;			/* Task Attributes Values. */
-	uint8_t  crn;			/* Command reference number. */
-	uint8_t  scsi_cdb[MAX_CMDSZ];	/* SCSI command bytes. */
+	uint8_t reserved_1[2];
+	uint8_t fcp_lun[8];		/* SCSI LUN ID. */
+	uint8_t control_flags;
+	uint8_t task_mgmt;		/* Task management flags. */
+	uint8_t task;			/* Task Attributes Values. */
+	uint8_t crn;			/* Command reference number. */
+	uint8_t scsi_cdb[MAX_CMDSZ];	/* SCSI command bytes. */
 	uint32_t total_byte_count;
-	uint8_t  target_id[3];		/* SCSI Target ID */
-	uint8_t  vp_index;
-	uint32_t dseg_0_address[2];	/* Data segment 0 address. */
-	uint32_t dseg_0_length;		/* Data segment 0 length. */
+	uint8_t target_id[3];		/* SCSI Target ID */
+	uint8_t vp_index;
+	ql_64bit_data_seg_t	dseg;		/* Data segments. */
 } cmd7_24xx_entry_t;
 
 /*
@@ -120,27 +124,26 @@
  * ISP24xx queue - Command IOCB structure definition.
  */
 #define	IOCB_CMD_TYPE_6		0x48
-#define	CMD_TYPE_6_DATA_SEGMENTS   1	/* Number of 64 bit data segments. */
+#define	CMD_TYPE_6_DATA_SEGMENTS 1	/* Number of 64 bit data segments. */
 typedef struct cmd6_24xx_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
 	uint16_t n_port_hdl;
 	uint16_t timeout;		/* Command timeout. */
 	uint16_t dseg_count;
 	uint16_t rsp_length;
-	uint8_t  fcp_lun[8];		/* SCSI LUN ID. */
+	uint8_t fcp_lun[8];		/* SCSI LUN ID. */
 	uint16_t control_flags;
 	uint16_t cmnd_length;
 	uint32_t cmnd_address[2];
 	uint32_t rsp_address[2];	/* Data segment 0 address. */
 	uint32_t total_byte_count;
-	uint8_t  target_id[3];		/* SCSI Target ID */
-	uint8_t  vp_index;
-	uint32_t dseg_0_address[2];	/* Data segment 0 address. */
-	uint32_t dseg_0_length;		/* Data segment 0 length. */
+	uint8_t target_id[3];		/* SCSI Target ID */
+	uint8_t vp_index;
+	ql_64bit_data_seg_t	dseg;		/* Data segments. */
 } cmd6_24xx_entry_t;
 
 typedef struct fcp_cmnd {
@@ -187,28 +190,25 @@
  *		entry structure definition.
  */
 #define	IOCB_CMD_TYPE_3		0x19	/* Command Type 3 entry (64 bit) */
-#define	CMD_TYPE_3_DATA_SEGMENTS   2	/* Number of 64 bit data segments. */
+#define	CMD_TYPE_3_DATA_SEGMENTS 2	/* Number of 64 bit data segments. */
 typedef struct cmd_3_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
-	uint8_t  target_l;		/* SCSI ID - LSB */
-	uint8_t  target_h;		/* SCSI ID - MSB */
-	uint8_t  lun_l;			/* SCSI LUN - LSB */
-	uint8_t  lun_h;			/* SCSI LUN - MSB */
-	uint8_t  control_flags_l;	/* Control flags - LSB. */
-	uint8_t  control_flags_h;	/* Control flags - MSB. */
-	uint8_t  reserved_1[2];
+	uint8_t target_l;		/* SCSI ID - LSB */
+	uint8_t target_h;		/* SCSI ID - MSB */
+	uint8_t lun_l;			/* SCSI LUN - LSB */
+	uint8_t lun_h;			/* SCSI LUN - MSB */
+	uint8_t control_flags_l;	/* Control flags - LSB. */
+	uint8_t control_flags_h;	/* Control flags - MSB. */
+	uint8_t reserved_1[2];
 	uint16_t timeout;		/* Command timeout. */
 	uint16_t dseg_count;		/* Data segment count - LSB. */
-	uint8_t  scsi_cdb[MAX_CMDSZ];	/* SCSI command words. */
+	uint8_t scsi_cdb[MAX_CMDSZ];	/* SCSI command words. */
 	uint32_t byte_count;		/* Total byte count. */
-	uint32_t dseg_0_address[2];	/* Data segment 0 address. */
-	uint32_t dseg_0_length;		/* Data segment 0 length. */
-	uint32_t dseg_1_address[2];	/* Data segment 1 address. */
-	uint32_t dseg_1_length;		/* Data segment 1 length. */
+	ql_64bit_data_seg_t	dseg[2];	/* Data segments. */
 } cmd_3_entry_t;
 
 /*
@@ -216,24 +216,24 @@
  */
 #define	COMMAND_CHAINING_TYPE	0x15
 typedef struct cmd_chaining_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
-	uint8_t  reserved;
-	uint8_t  target;		/* SCSI ID */
-	uint8_t  lun_l;			/* SCSI LUN - LSB */
-	uint8_t  lun_h;			/* SCSI LUN - MSB */
-	uint8_t  control_flags_l;	/* Control flags - LSB. */
-	uint8_t  control_flags_h;	/* Control flags - MSB. */
-	uint8_t  crn;
-	uint8_t  vp_index;
-	uint8_t  timeout_l;		/* Command timeout - LSB. */
-	uint8_t  timeout_h;		/* Command timeout - MSB. */
-	uint8_t  dseg_count_l;		/* Data segment count - LSB. */
-	uint8_t  dseg_count_h;		/* Data segment count - MSB. */
-	uint8_t  scsi_cdb[MAX_CMDSZ];	/* SCSI command words. */
+	uint8_t reserved;
+	uint8_t target;		/* SCSI ID */
+	uint8_t lun_l;			/* SCSI LUN - LSB */
+	uint8_t lun_h;			/* SCSI LUN - MSB */
+	uint8_t control_flags_l;	/* Control flags - LSB. */
+	uint8_t control_flags_h;	/* Control flags - MSB. */
+	uint8_t crn;
+	uint8_t vp_index;
+	uint8_t timeout_l;		/* Command timeout - LSB. */
+	uint8_t timeout_h;		/* Command timeout - MSB. */
+	uint8_t dseg_count_l;		/* Data segment count - LSB. */
+	uint8_t dseg_count_h;		/* Data segment count - MSB. */
+	uint8_t scsi_cdb[MAX_CMDSZ];	/* SCSI command words. */
 	uint32_t byte_count;		/* Total byte count. */
 	uint16_t list_type;		/* 0 = 32bit, 1 = 64bit. */
 	uint16_t base_address[2];
@@ -245,7 +245,7 @@
  * ISP queue - continuation entry structure definition.
  */
 #define	CONTINUATION_TYPE_0	0x02	/* Continuation entry. */
-#define	CONT_TYPE_0_DATA_SEGMENTS  7	/* Number of 32 bit data segments. */
+#define	CONT_TYPE_0_DATA_SEGMENTS 7	/* Number of 32 bit data segments. */
 typedef struct cont_entry {
 	uint8_t entry_type;		/* Entry type. */
 	uint8_t entry_count;		/* Entry count. */
@@ -252,20 +252,7 @@
 	uint8_t sys_define;		/* System defined. */
 	uint8_t entry_status;		/* Entry Status. */
 	uint32_t reserved;
-	uint32_t dseg_0_address;	/* Data segment 0 address. */
-	uint32_t dseg_0_length;		/* Data segment 0 length. */
-	uint32_t dseg_1_address;	/* Data segment 1 address. */
-	uint32_t dseg_1_length;		/* Data segment 1 length. */
-	uint32_t dseg_2_address;	/* Data segment 2 address. */
-	uint32_t dseg_2_length;		/* Data segment 2 length. */
-	uint32_t dseg_3_address;	/* Data segment 3 address. */
-	uint32_t dseg_3_length;		/* Data segment 3 length. */
-	uint32_t dseg_4_address;	/* Data segment 4 address. */
-	uint32_t dseg_4_length;		/* Data segment 4 length. */
-	uint32_t dseg_5_address;	/* Data segment 5 address. */
-	uint32_t dseg_5_length;		/* Data segment 5 length. */
-	uint32_t dseg_6_address;	/* Data segment 6 address. */
-	uint32_t dseg_6_length;		/* Data segment 6 length. */
+	ql_32bit_data_seg_t	dseg[7];	/* Data segments. */
 } cont_entry_t;
 
 /*
@@ -272,22 +259,13 @@
  * ISP queue - 64-Bit addressing, continuation entry structure definition.
  */
 #define	CONTINUATION_TYPE_1	0x0A	/* Continuation Type 1 entry. */
-#define	CONT_TYPE_1_DATA_SEGMENTS  5	/* Number of 64 bit data segments. */
+#define	CONT_TYPE_1_DATA_SEGMENTS 5	/* Number of 64 bit data segments. */
 typedef struct cont_type_1_entry {
 	uint8_t entry_type;		/* Entry type. */
 	uint8_t entry_count;		/* Entry count. */
 	uint8_t sys_define;		/* System defined. */
 	uint8_t entry_status;		/* Entry Status. */
-	uint32_t dseg_0_address[2];	/* Data segment 0 address. */
-	uint32_t dseg_0_length;		/* Data segment 0 length. */
-	uint32_t dseg_1_address[2];	/* Data segment 1 address. */
-	uint32_t dseg_1_length;		/* Data segment 1 length. */
-	uint32_t dseg_2_address[2];	/* Data segment 2 address. */
-	uint32_t dseg_2_length;		/* Data segment 2 length. */
-	uint32_t dseg_3_address[2];	/* Data segment 3 address. */
-	uint32_t dseg_3_length;		/* Data segment 3 length. */
-	uint32_t dseg_4_address[2];	/* Data segment 4 address. */
-	uint32_t dseg_4_length;		/* Data segment 4 length. */
+	ql_64bit_data_seg_t	dseg[5];	/* Data segments. */
 } cont_type_1_entry_t;
 
 /*
@@ -295,23 +273,23 @@
  */
 #define	STATUS_TYPE	0x03		/* Status entry. */
 typedef struct sts_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle. */
-	uint8_t  scsi_status_l;		/* SCSI status - LSB. */
-	uint8_t  scsi_status_h;		/* SCSI status - MSB. */
+	uint8_t scsi_status_l;		/* SCSI status - LSB. */
+	uint8_t scsi_status_h;		/* SCSI status - MSB. */
 	uint16_t comp_status;		/* Completion status. */
-	uint8_t  state_flags_l;		/* State flags - LSB. */
-	uint8_t  state_flags_h;		/* State flags. */
-	uint8_t  status_flags_l;	/* Status flags. */
-	uint8_t  status_flags_h;	/* Status flags - MSB. */
+	uint8_t state_flags_l;		/* State flags - LSB. */
+	uint8_t state_flags_h;		/* State flags. */
+	uint8_t status_flags_l;	/* Status flags. */
+	uint8_t status_flags_h;	/* Status flags - MSB. */
 	uint16_t rsp_info_length;	/* Response Info Length. */
 	uint16_t req_sense_length;	/* Request sense data length. */
 	uint32_t residual_length;	/* Residual transfer length. */
-	uint8_t  rsp_info[8];		/* FCP response information. */
-	uint8_t  req_sense_data[32];	/* Request sense data. */
+	uint8_t rsp_info[8];		/* FCP response information. */
+	uint8_t req_sense_data[32];	/* Request sense data. */
 } sts_entry_t, response_t;
 
 /*
@@ -318,9 +296,9 @@
  * Status entry entry status
  */
 #define	RF_INV_E_ORDER	BIT_5		/* Invalid entry order. */
-#define	RF_INV_E_COUNT  BIT_4		/* Invalid entry count. */
-#define	RF_INV_E_PARAM  BIT_3		/* Invalid entry parameter. */
-#define	RF_INV_E_TYPE   BIT_2		/* Invalid entry type. */
+#define	RF_INV_E_COUNT	BIT_4		/* Invalid entry count. */
+#define	RF_INV_E_PARAM	BIT_3		/* Invalid entry parameter. */
+#define	RF_INV_E_TYPE	BIT_2		/* Invalid entry type. */
 #define	RF_BUSY		BIT_1		/* Busy */
 
 /*
@@ -385,6 +363,7 @@
 #define	CS_LOGIN_LOGOUT_ERROR	0x31	/* login/logout IOCB error. */
 #define	CS_SEQ_COMPLETE		0x40	/* Sequence Complete. */
 #define	CS_ABORTED_SEQ_REC	0x47	/* Abort sequence was received. */
+#define	CS_DEV_NOT_READY	0x81	/* Device not ready */
 #define	CS_INVALID_PARAMETER	0x102	/* IP invalid_parameter. */
 #define	CS_ERROR_RESOURCE	0x103	/* IP insufficient resources. */
 #define	CS_IP_NOT_INITIALIZED	0x104	/* IP not_initialized. */
@@ -399,10 +378,10 @@
  * ISP24xx queue - Status IOCB structure definition.
  */
 typedef struct sts_24xx_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle. */
 	uint16_t comp_status;		/* Completion status. */
 	uint16_t ox_id;
@@ -411,12 +390,12 @@
 	uint8_t	 state_flags_l;		/* State flags. */
 	uint8_t	 state_flags_h;
 	uint16_t reserved_1;
-	uint8_t  scsi_status_l;		/* SCSI status - LSB. */
-	uint8_t  scsi_status_h;		/* SCSI status - MSB. */
+	uint8_t scsi_status_l;		/* SCSI status - LSB. */
+	uint8_t scsi_status_h;		/* SCSI status - MSB. */
 	uint32_t fcp_rsp_residual_count;
 	uint32_t fcp_sense_length;
 	uint32_t fcp_rsp_data_length;	/* Response Info Length. */
-	uint8_t  rsp_sense_data[28];	/* FCP response and/or sense data. */
+	uint8_t rsp_sense_data[28];	/* FCP response and/or sense data. */
 } sts_24xx_entry_t;
 
 /*
@@ -424,11 +403,11 @@
  */
 #define	STATUS_CONT_TYPE	0x10	/* Status continuation entry. */
 typedef struct sts_cont_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
-	uint8_t  req_sense_data[60];	/* Request sense data. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
+	uint8_t req_sense_data[60];	/* Request sense data. */
 } sts_cont_entry_t;
 
 /*
@@ -437,19 +416,19 @@
  */
 #define	MARKER_TYPE	0x04		/* Marker entry. */
 typedef struct mrk_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t sys_define_2;		/* System defined. */
-	uint8_t  target_l;		/* SCSI ID - LSB */
-	uint8_t  target_h;		/* SCSI ID - MSB */
-	uint8_t  modifier;		/* Modifier (7-0). */
-	uint8_t  reserved_1;
-	uint8_t  sequence_number[2];	/* Sequence number of event. */
-	uint8_t  lun_l;			/* SCSI LUN - LSB */
-	uint8_t  lun_h;			/* SCSI LUN - MSB */
-	uint8_t  reserved_2[48];
+	uint8_t target_l;		/* SCSI ID - LSB */
+	uint8_t target_h;		/* SCSI ID - MSB */
+	uint8_t modifier;		/* Modifier (7-0). */
+	uint8_t reserved_1;
+	uint8_t sequence_number[2];	/* Sequence number of event. */
+	uint8_t lun_l;			/* SCSI LUN - LSB */
+	uint8_t lun_h;			/* SCSI LUN - MSB */
+	uint8_t reserved_2[48];
 } mrk_entry_t;
 
 /*
@@ -465,18 +444,18 @@
  * ISP24xx queue - Marker IOCB structure definition.
  */
 typedef struct marker_24xx_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
 	uint16_t n_port_hdl;
-	uint8_t  modifier;		/* Modifier */
-	uint8_t  reserved[2];
-	uint8_t  vp_index;
-	uint8_t  reserved_1[2];
-	uint8_t  fcp_lun[8];		/* SCSI LUN ID. */
-	uint8_t  reserved_2[40];
+	uint8_t modifier;		/* Modifier */
+	uint8_t reserved[2];
+	uint8_t vp_index;
+	uint8_t reserved_1[2];
+	uint8_t fcp_lun[8];		/* SCSI LUN ID. */
+	uint8_t reserved_2[40];
 } marker_24xx_entry_t;
 
 /*
@@ -485,30 +464,29 @@
 #define	MS_TYPE			0x29
 #define	MS_DATA_SEGMENTS	1	/* Number of data segments. */
 typedef struct ms_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
-	uint8_t  loop_id_l;		/* device id - LSB */
-	uint8_t  loop_id_h;		/* device id - MSB */
+	uint8_t loop_id_l;		/* device id - LSB */
+	uint8_t loop_id_h;		/* device id - MSB */
 	uint16_t comp_status;		/* Completion status */
-	uint8_t  control_flags_l;	/* Control flags - LSB. */
-	uint8_t  control_flags_h;	/* Control flags - MSB. */
-	uint8_t  reserved_1[2];
+	uint8_t control_flags_l;	/* Control flags - LSB. */
+	uint8_t control_flags_h;	/* Control flags - MSB. */
+	uint8_t reserved_1[2];
 	uint16_t timeout;		/* Command timeout. */
-	uint8_t  cmd_dseg_count_l;	/* CMD segment count - LSB. */
-	uint8_t  cmd_dseg_count_h;	/* CMD segment count - MSB. */
+	uint8_t cmd_dseg_count_l;	/* CMD segment count - LSB. */
+	uint8_t cmd_dseg_count_h;	/* CMD segment count - MSB. */
 	uint16_t total_dseg_count;	/* CMD + RESP segment count. */
 	uint8_t	 reserved_2[10];
 	uint32_t resp_byte_count;	/* Response byte count */
 	uint32_t cmd_byte_count;	/* Command byte count */
-	uint32_t dseg_0_address[2];	/* Data segment 0 address. */
-	uint32_t dseg_0_length;		/* Data segment 0 length. */
-	uint32_t dseg_1_address[2];	/* Data segment 1 address. */
-	uint32_t dseg_1_length;		/* Data segment 1 length. */
+	ql_64bit_data_seg_t	dseg[2];	/* Data segments. */
 } ms_entry_t;
 
+#define	CF_ELS_PASSTHROUGH	BIT_7	/* MSB */
+
 /*
  * ISP24xx queue - CT Pass-Through IOCB structure definition.
  */
@@ -515,26 +493,23 @@
 #define	CT_PASSTHRU_TYPE		0x29
 #define	CT_PASSTHRU_DATA_SEGMENTS	1	/* Number of data segments. */
 typedef struct ct_passthru_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
 	uint16_t status;
 	uint16_t n_port_hdl;
 	uint16_t cmd_dseg_count;
-	uint8_t  vp_index;
-	uint8_t  reserved;
+	uint8_t vp_index;
+	uint8_t reserved;
 	uint16_t timeout;
 	uint16_t reserved_1;
 	uint16_t resp_dseg_count;
-	uint8_t  reserved_2[10];
+	uint8_t reserved_2[10];
 	uint32_t resp_byte_count;
 	uint32_t cmd_byte_count;
-	uint32_t dseg_0_address[2];	/* Data segment 0 address. */
-	uint32_t dseg_0_length;		/* Data segment 0 length. */
-	uint32_t dseg_1_address[2];	/* Data segment 1 address. */
-	uint32_t dseg_1_length;		/* Data segment 1 length. */
+	ql_64bit_data_seg_t	dseg[2];	/* Data segments. */
 } ct_passthru_entry_t;
 
 /*
@@ -542,33 +517,30 @@
  */
 #define	ELS_PASSTHRU_TYPE		0x53
 typedef struct els_passthru_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
 	uint16_t reserved_8_9;
 	uint16_t n_port_hdl;
 	uint16_t xmt_dseg_count;	/* Only one allowed */
-	uint8_t  vp_index;
-	uint8_t  sof_type;
+	uint8_t vp_index;
+	uint8_t sof_type;
 	uint32_t rcv_exch_address;
 	uint16_t rcv_dseg_count;
-	uint8_t  els_cmd_opcode;
-	uint8_t  reserved_17;
-	uint8_t  d_id_7_0;
-	uint8_t  d_id_15_8;
-	uint8_t  d_id_23_16;
-	uint8_t  s_id_23_16;
-	uint8_t  s_id_7_0;
-	uint8_t  s_id_15_8;
+	uint8_t els_cmd_opcode;
+	uint8_t reserved_17;
+	uint8_t d_id_7_0;
+	uint8_t d_id_15_8;
+	uint8_t d_id_23_16;
+	uint8_t s_id_23_16;
+	uint8_t s_id_7_0;
+	uint8_t s_id_15_8;
 	uint16_t control_flags;
 	uint32_t rcv_payld_data_bcnt;
 	uint32_t xmt_payld_data_bcnt;
-	uint32_t xmt_dseg_0_address[2];	/* Tx Data segment 0 address. */
-	uint32_t xmt_dseg_0_length;	/* Tx Data segment 0 length.  */
-	uint32_t rcv_dseg_0_address[2];	/* Rx Data segment 0 address. */
-	uint32_t rcv_dseg_0_length;	/* Rx Data segment 0 length.  */
+	ql_64bit_data_seg_t	dseg[2];	/* Data segments. */
 } els_passthru_entry_t;
 
 /*
@@ -575,31 +547,31 @@
  * ISP24x queue - ELS Pass-Through IOCB response.
  */
 typedef struct els_passthru_entry_rsp {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
 	uint16_t comp_status;
 	uint16_t n_port_hdl;
 	uint16_t reserved_c_d;
-	uint8_t  vp_index;
-	uint8_t  sof_type;
+	uint8_t vp_index;
+	uint8_t sof_type;
 	uint32_t rcv_exch_addr;
 	uint16_t reserved_14_15;
-	uint8_t  els_cmd_opcode;
-	uint8_t  reserved_17;
-	uint8_t  d_id_7_0;
-	uint8_t  d_id_15_8;
-	uint8_t  d_id_23_16;
-	uint8_t  s_id_23_16;
-	uint8_t  s_id_7_0;
-	uint8_t  s_id_15_8;
+	uint8_t els_cmd_opcode;
+	uint8_t reserved_17;
+	uint8_t d_id_7_0;
+	uint8_t d_id_15_8;
+	uint8_t d_id_23_16;
+	uint8_t s_id_23_16;
+	uint8_t s_id_7_0;
+	uint8_t s_id_15_8;
 	uint16_t control_flags;
 	uint32_t total_data_bcnt;
 	uint32_t error_subcode1;
 	uint32_t error_subcode2;
-	uint8_t  reserved_2c_3f[20];
+	uint8_t reserved_2c_3f[20];
 } els_passthru_entry_rsp_t;
 
 /*
@@ -607,21 +579,21 @@
  */
 #define	TASK_MGMT_TYPE		0x14
 typedef struct task_mgmt_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
 	uint16_t n_port_hdl;
 	uint16_t reserved;
 	uint16_t delay;
 	uint16_t timeout;
-	uint8_t  fcp_lun[8];		/* SCSI LUN ID. */
+	uint8_t fcp_lun[8];		/* SCSI LUN ID. */
 	uint32_t control_flags;
-	uint8_t  reserved_1[20];
-	uint8_t  target_id[3];		/* SCSI Target ID */
-	uint8_t  vp_index;
-	uint8_t  reserved_2[12];
+	uint8_t reserved_1[20];
+	uint8_t target_id[3];		/* SCSI Target ID */
+	uint8_t vp_index;
+	uint8_t reserved_2[12];
 } task_mgmt_entry_t;
 
 /*
@@ -639,19 +611,19 @@
  */
 #define	ABORT_CMD_TYPE		0x33
 typedef struct abort_cmd_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
 	uint16_t n_port_hdl;		/* also comp_status */
-	uint8_t  options;
-	uint8_t  options_h;
+	uint8_t options;
+	uint8_t options_h;
 	uint32_t cmd_handle;
-	uint8_t  reserved[32];
-	uint8_t  target_id[3];		/* Port ID */
-	uint8_t  vp_index;
-	uint8_t  reserved_1[12];
+	uint8_t reserved[32];
+	uint8_t target_id[3];		/* Port ID */
+	uint8_t vp_index;
+	uint8_t reserved_1[12];
 } abort_cmd_entry_t;
 
 /*
@@ -664,18 +636,18 @@
  */
 #define	LOG_TYPE		0x52
 typedef struct log_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
 	uint16_t status;
 	uint16_t n_port_hdl;
 	uint16_t control_flags;
-	uint8_t  vp_index;
-	uint8_t  reserved;
-	uint8_t  port_id[3];
-	uint8_t  rsp_size;
+	uint8_t vp_index;
+	uint8_t reserved;
+	uint8_t port_id[3];
+	uint8_t rsp_size;
 	uint32_t io_param[11];
 } log_entry_t;
 
@@ -739,20 +711,20 @@
  */
 #define	ENABLE_LUN_TYPE	0xB		/* Enable LUN entry */
 typedef struct enable_lun_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
-	uint8_t  reserved[8];
-	uint8_t  status;
-	uint8_t  reserved_1;
-	uint8_t  command_count;
-	uint8_t  immediate_notify_count;
-	uint8_t  reserved_2[2];
-	uint8_t  timeout_l;		/* Timeout - LSB. */
-	uint8_t  timeout_h;		/* Timeout - MSB. */
-	uint8_t  reserved_3[40];
+	uint8_t reserved[8];
+	uint8_t status;
+	uint8_t reserved_1;
+	uint8_t command_count;
+	uint8_t immediate_notify_count;
+	uint8_t reserved_2[2];
+	uint8_t timeout_l;		/* Timeout - LSB. */
+	uint8_t timeout_h;		/* Timeout - MSB. */
+	uint8_t reserved_3[40];
 } enable_lun_entry_t;
 
 /*
@@ -761,22 +733,22 @@
  */
 #define	MODIFY_LUN_TYPE	0xC		/* Modify LUN entry */
 typedef struct modify_lun_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
-	uint8_t  reserved[2];
-	uint8_t  operators;
-	uint8_t  reserved_1[5];
-	uint8_t  status;
-	uint8_t  reserved_2;
-	uint8_t  command_count;
-	uint8_t  immediate_notify_count;
-	uint8_t  reserved_3[2];
-	uint8_t  timeout_l;		/* Timeout - LSB. */
-	uint8_t  timeout_h;		/* Timeout - MSB. */
-	uint8_t  reserved_4[40];
+	uint8_t reserved[2];
+	uint8_t operators;
+	uint8_t reserved_1[5];
+	uint8_t status;
+	uint8_t reserved_2;
+	uint8_t command_count;
+	uint8_t immediate_notify_count;
+	uint8_t reserved_3[2];
+	uint8_t timeout_l;		/* Timeout - LSB. */
+	uint8_t timeout_h;		/* Timeout - MSB. */
+	uint8_t reserved_4[40];
 } modify_lun_entry_t;
 
 /*
@@ -785,21 +757,21 @@
  */
 #define	IMMEDIATE_NOTIFY_TYPE	0xD	/* Immediate notify entry */
 typedef struct immediate_notify_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
-	uint8_t  initiator_id_l;
-	uint8_t  initiator_id_h;
-	uint8_t  lun_l;
-	uint8_t  lun_h;
-	uint8_t  reserved_1[4];
+	uint8_t initiator_id_l;
+	uint8_t initiator_id_h;
+	uint8_t lun_l;
+	uint8_t lun_h;
+	uint8_t reserved_1[4];
 	uint16_t status;
-	uint8_t  task_flags_l;
-	uint8_t  task_flags_h;
+	uint8_t task_flags_l;
+	uint8_t task_flags_h;
 	uint16_t sequence_id;
-	uint8_t  reserved_3[40];
+	uint8_t reserved_3[40];
 	uint16_t ox_id;
 } immediate_notify_entry_t;
 
@@ -807,10 +779,10 @@
  * ISP24xx queue - Immediate Notify IOCB structure definition.
  */
 typedef struct immd_notify_24xx_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t reserved;
 	uint16_t n_port_hdl;
 	uint16_t reserved_1;
@@ -817,15 +789,15 @@
 	uint16_t flags;
 	uint16_t srr_rx_id;
 	uint16_t status;
-	uint8_t  status_subcode;
-	uint8_t  reserved_2;
+	uint8_t status_subcode;
+	uint8_t reserved_2;
 	uint32_t receive_exchange_address;
 	uint32_t srr_relative_offset;
 	uint16_t srr_iu;
 	uint16_t srr_ox_id;
-	uint8_t  reserved_3[19];
-	uint8_t  vp_index;
-	uint8_t  reserved_4[10];
+	uint8_t reserved_3[19];
+	uint8_t vp_index;
+	uint8_t reserved_4[10];
 	uint16_t ox_id;
 } immd_notify_24xx_entry_t;
 
@@ -835,22 +807,22 @@
  */
 #define	NOTIFY_ACKNOWLEDGE_TYPE	0xE	/* Immediate notify entry */
 typedef struct notify_acknowledge_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
-	uint8_t  initiator_id_l;
-	uint8_t  initiator_id_h;
-	uint8_t  reserved_1[2];
-	uint8_t  flags_l;
-	uint8_t  flags_h;
-	uint8_t  reserved_2[2];
+	uint8_t initiator_id_l;
+	uint8_t initiator_id_h;
+	uint8_t reserved_1[2];
+	uint8_t flags_l;
+	uint8_t flags_h;
+	uint8_t reserved_2[2];
 	uint16_t status;
-	uint8_t  task_flags_l;
-	uint8_t  task_flags_h;
+	uint8_t task_flags_l;
+	uint8_t task_flags_h;
 	uint16_t sequence_id;
-	uint8_t  reserved_3[42];
+	uint8_t reserved_3[42];
 } notify_acknowledge_entry_t;
 
 /*
@@ -857,10 +829,10 @@
  * ISP24xx queue - Notify Acknowledge IOCB structure definition.
  */
 typedef struct notify_ack_24xx_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;
 	uint16_t n_port_hdl;
 	uint16_t reserved_1;
@@ -867,18 +839,18 @@
 	uint16_t flags;
 	uint16_t srr_rx_id;
 	uint16_t status;
-	uint8_t  status_subcode;
-	uint8_t  reserved_2;
+	uint8_t status_subcode;
+	uint8_t reserved_2;
 	uint32_t receive_exchange_address;
 	uint32_t srr_relative_offset;
 	uint16_t srr_iu;
 	uint16_t srr_flags;
-	uint8_t  reserved_3[19];
-	uint8_t  vp_index;
-	uint8_t  srr_reject_vendor_unique;
-	uint8_t  srr_reject_code_explanation;
-	uint8_t  srr_reject_code;
-	uint8_t  reserved_4[7];
+	uint8_t reserved_3[19];
+	uint8_t vp_index;
+	uint8_t srr_reject_vendor_unique;
+	uint8_t srr_reject_code_explanation;
+	uint8_t srr_reject_code;
+	uint8_t reserved_4[7];
 	uint16_t ox_id;
 } notify_ack_24xx_entry_t;
 
@@ -917,12 +889,12 @@
  */
 #define	ATIO_24xx_TYPE		0x06
 typedef struct atio_24xx_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
 	uint16_t len_attr;		/* System defined. */
 	uint32_t receive_exchange_address;
-	uint8_t  frame_hdr[24];
-	uint8_t  payload[32];
+	uint8_t frame_hdr[24];
+	uint8_t payload[32];
 } atio_24xx_entry_t;
 
 /*
@@ -929,67 +901,59 @@
  * ISP queue -	Continue Target I/O with extended LUN support
  *		entry structure definition.
  */
-#define	CTIO_TYPE_2   0x17
-#define	CTIO_TYPE_3   0x1F
+#define	CTIO_TYPE_2	0x17
+#define	CTIO_TYPE_3	0x1F
 typedef struct ctio_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
-	uint8_t  initiator_id_l;
-	uint8_t  initiator_id_h;
+	uint8_t initiator_id_l;
+	uint8_t initiator_id_h;
 	uint16_t rx_id;
-	uint8_t  flags_l;
-	uint8_t  flags_h;
+	uint8_t flags_l;
+	uint8_t flags_h;
 	uint16_t status;
 	uint16_t timeout;
-	uint8_t  dseg_count_l;
-	uint8_t  dseg_count_h;
+	uint8_t dseg_count_l;
+	uint8_t dseg_count_h;
 	uint32_t relative_offset;
 	uint32_t residual_transfer_length;
-	uint8_t  reserved_1[4];
+	uint8_t reserved_1[4];
 
 	union {
 		struct {
-			uint8_t  reserved_2[2];
-			uint8_t  scsi_status_l;
-			uint8_t  scsi_status_h;
+			uint8_t reserved_2[2];
+			uint8_t scsi_status_l;
+			uint8_t scsi_status_h;
 			uint32_t byte_count;
-			uint32_t dseg_0_address;
-			uint32_t dseg_0_length;
-			uint32_t dseg_1_address;
-			uint32_t dseg_1_length;
-			uint32_t dseg_2_address;
-			uint32_t dseg_2_length;
+			ql_32bit_data_seg_t	dseg[3];
 		}s0_32bit;
 
 		struct {
-			uint8_t  reserved_3[2];
-			uint8_t  scsi_status_l;
-			uint8_t  scsi_status_h;
+			uint8_t reserved_3[2];
+			uint8_t scsi_status_l;
+			uint8_t scsi_status_h;
 			uint32_t byte_count;
-			uint32_t dseg_0_address[2];
-			uint32_t dseg_0_length;
-			uint32_t dseg_1_address[2];
-			uint32_t dseg_1_length;
+			ql_64bit_data_seg_t	dseg[2];
 		}s0_64bit;
 
 		struct {
-			uint8_t  sense_length_l;
-			uint8_t  sense_length_h;
-			uint8_t  scsi_status_l;
-			uint8_t  scsi_status_h;
-			uint8_t  response_length_l;
-			uint8_t  response_length_h;
-			uint8_t  response_info[26];
+			uint8_t sense_length_l;
+			uint8_t sense_length_h;
+			uint8_t scsi_status_l;
+			uint8_t scsi_status_h;
+			uint8_t response_length_l;
+			uint8_t response_length_h;
+			uint8_t response_info[26];
 		}s1;
 
 		struct {
-			uint8_t  reserved_4[2];
+			uint8_t reserved_4[2];
 			uint32_t response_length;
 			uint32_t response_pointer;
-			uint8_t  reserved[16];
+			uint8_t reserved[16];
 		}s2;
 	}type;
 } ctio_entry_t;
@@ -1000,18 +964,18 @@
  */
 #define	CTIO_24xx_TYPE		0x12
 typedef struct ctio_snd_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;
 	uint16_t n_port_hdl;
 	uint16_t timeout;
 	uint16_t dseg_count;
-	uint8_t  vp_index;
-	uint8_t  flags;
+	uint8_t vp_index;
+	uint8_t flags;
 	uint8_t initiator_id[3];
-	uint8_t  reserved_1;
+	uint8_t reserved_1;
 	uint32_t receive_exchange_address;
 
 	union {
@@ -1025,9 +989,7 @@
 			uint32_t reserved_3;
 			uint32_t transfer_length;
 			uint32_t reserved_4;
-			uint32_t dseg_0_address_l;
-			uint32_t dseg_0_address_h;
-			uint32_t dseg_0_length;
+			ql_64bit_data_seg_t	dseg;
 		}s0;
 
 		struct {
@@ -1038,7 +1000,7 @@
 			uint16_t scsi_status;
 			uint16_t response_length;
 			uint16_t reserved_2;
-			uint8_t  rsp_sense_data[24];
+			uint8_t rsp_sense_data[24];
 		}s1;
 
 		struct {
@@ -1046,12 +1008,10 @@
 			uint16_t flags;
 			uint32_t residual_length;
 			uint16_t ox_id;
-			uint8_t  reserved_3[10];
+			uint8_t reserved_3[10];
 			uint32_t transfer_length;
 			uint32_t reserved_4;
-			uint32_t dseg_0_address_l;
-			uint32_t dseg_0_address_h;
-			uint32_t dseg_0_length;
+			ql_64bit_data_seg_t	dseg;
 		}s2;
 	}type;
 } ctio_snd_entry_t;
@@ -1061,20 +1021,20 @@
  *		Firmware structure definition.
  */
 typedef struct ctio_rcv_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;
 	uint16_t status;
 	uint16_t timeout;
 	uint16_t dseg_count;
-	uint8_t  reserved[6];
+	uint8_t reserved[6];
 
-	uint8_t  vp_index;
-	uint8_t  flags;
+	uint8_t vp_index;
+	uint8_t flags;
 	uint8_t initiator_id[3];
-	uint8_t  reserved_1;
+	uint8_t reserved_1;
 	uint32_t receive_exchange_address;
 
 	union {
@@ -1088,9 +1048,7 @@
 			uint32_t reserved_3;
 			uint32_t transfer_length;
 			uint32_t reserved_4;
-			uint32_t dseg_0_address_l;
-			uint32_t dseg_0_address_h;
-			uint32_t dseg_0_length;
+			ql_64bit_data_seg_t	dseg;
 		}s0;
 
 		struct {
@@ -1101,7 +1059,7 @@
 			uint16_t scsi_status;
 			uint16_t response_length;
 			uint16_t reserved_2;
-			uint8_t  rsp_sense_data[24];
+			uint8_t rsp_sense_data[24];
 		}s1;
 
 		struct {
@@ -1109,12 +1067,10 @@
 			uint16_t flags;
 			uint32_t residual_length;
 			uint16_t ox_id;
-			uint8_t  reserved_3[10];
+			uint8_t reserved_3[10];
 			uint32_t transfer_length;
 			uint32_t reserved_4;
-			uint32_t dseg_0_address_l;
-			uint32_t dseg_0_address_h;
-			uint32_t dseg_0_length;
+			ql_64bit_data_seg_t	dseg;
 		}s2;
 	}type;
 } ctio_rcv_entry_t;
@@ -1125,27 +1081,22 @@
 #define	IP_TYPE			0x13
 #define	IP_DATA_SEGMENTS	3	/* Number of data segments. */
 typedef struct ip_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
-	uint8_t  loop_id_l;		/* device id - LSB */
-	uint8_t  loop_id_h;		/* device id - MSB */
+	uint8_t loop_id_l;		/* device id - LSB */
+	uint8_t loop_id_h;		/* device id - MSB */
 	uint16_t comp_status;		/* Completion status. */
-	uint8_t  control_flags_l;	/* Control flags - LSB. */
-	uint8_t  control_flags_h;	/* Control flags - MSB. */
-	uint8_t  reserved_1[2];
+	uint8_t control_flags_l;	/* Control flags - LSB. */
+	uint8_t control_flags_h;	/* Control flags - MSB. */
+	uint8_t reserved_1[2];
 	uint16_t timeout;		/* Command timeout. */
 	uint16_t dseg_count;		/* Data segment count. */
-	uint8_t  reserved_2[16];
+	uint8_t reserved_2[16];
 	uint32_t byte_count;		/* Total byte count. */
-	uint32_t dseg_0_address;	/* Data segment 0 address. */
-	uint32_t dseg_0_length;		/* Data segment 0 length. */
-	uint32_t dseg_1_address;	/* Data segment 1 address. */
-	uint32_t dseg_1_length;		/* Data segment 1 length. */
-	uint32_t dseg_2_address;	/* Data segment 2 address. */
-	uint32_t dseg_2_length;		/* Data segment 2 length. */
+	ql_32bit_data_seg_t	dseg[3];	/* Data segments. */
 } ip_entry_t;
 
 /*
@@ -1154,25 +1105,22 @@
 #define	IP_A64_TYPE		0x1B
 #define	IP_A64_DATA_SEGMENTS	2	/* Number of data segments. */
 typedef struct ip_a64_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
-	uint8_t  reserved;
-	uint8_t  loop_id;		/* Loop ID */
+	uint8_t reserved;
+	uint8_t loop_id;		/* Loop ID */
 	uint16_t comp_status;		/* Completion status. */
-	uint8_t  control_flags_l;	/* Control flags - LSB. */
-	uint8_t  control_flags_h;	/* Control flags - MSB. */
-	uint8_t  reserved_1[2];
+	uint8_t control_flags_l;	/* Control flags - LSB. */
+	uint8_t control_flags_h;	/* Control flags - MSB. */
+	uint8_t reserved_1[2];
 	uint16_t timeout;		/* Command timeout. */
 	uint16_t dseg_count;		/* Data segment count. */
-	uint8_t  reserved_2[16];
+	uint8_t reserved_2[16];
 	uint32_t byte_count;		/* Total byte count. */
-	uint32_t dseg_0_address[2];	/* Data segment 0 address. */
-	uint32_t dseg_0_length;		/* Data segment 0 length. */
-	uint32_t dseg_1_address[2];	/* Data segment 1 address. */
-	uint32_t dseg_1_length;		/* Data segment 1 length. */
+	ql_64bit_data_seg_t	dseg[2];	/* Data segments. */
 } ip_a64_entry_t;
 
 /*
@@ -1181,24 +1129,23 @@
 #define	IP_CMD_TYPE		0x3B
 #define	IP_CMD_DATA_SEGMENTS	1
 typedef struct ip_cmd_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle. */
 	uint16_t hdl_status;		/* N_port hdl or Completion status */
 	uint16_t timeout_hdl;		/* N_port hdl or Command timeout */
 	uint16_t dseg_count;		/* Data segment count. */
-	uint8_t  reserved_1[6];
+	uint8_t reserved_1[6];
 	uint32_t exch_addr;
 	uint16_t control_flags;
 	uint16_t frame_hdr_cntrl_flgs;
-	uint8_t  reserved_2[12];
+	uint8_t reserved_2[12];
 	uint32_t sys_define_2;
 	uint32_t byte_count;		/* Total byte count. */
-	uint8_t  reserved_3[4];
-	uint32_t dseg_0_address[2];	/* Data segment 0 address. */
-	uint32_t dseg_0_length;		/* Data segment 0 length. */
+	uint8_t reserved_3[4];
+	ql_64bit_data_seg_t	dseg;	/* Data segments. */
 } ip_cmd_entry_t;
 
 /*
@@ -1217,16 +1164,16 @@
 #define	IP_RCVBUF_HANDLES	24	/* Buffer handles in entry. */
 #define	IP_RECEIVE_TYPE		0x23	/* IP receive entry */
 typedef struct ip_rcv_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  segment_count;		/* Segment count. */
-	uint8_t  entry_status;		/* Entry Status. */
-	uint8_t  s_id[3];		/* Source ID. */
-	uint8_t  reserved[2];
-	uint8_t  loop_id;		/* Loop ID */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t segment_count;		/* Segment count. */
+	uint8_t entry_status;		/* Entry Status. */
+	uint8_t s_id[3];		/* Source ID. */
+	uint8_t reserved[2];
+	uint8_t loop_id;		/* Loop ID */
 	uint16_t comp_status;		/* Completion status. */
-	uint8_t  class_of_srv_l;	/* Class of service - LSB. */
-	uint8_t  class_of_srv_h;	/* Class of service - MSB. */
+	uint8_t class_of_srv_l;	/* Class of service - LSB. */
+	uint8_t class_of_srv_h;	/* Class of service - MSB. */
 	uint16_t seq_length;		/* Sequence length. */
 	uint16_t buffer_handle[IP_RCVBUF_HANDLES]; /* Buffer handles. */
 } ip_rcv_entry_t;
@@ -1237,10 +1184,10 @@
 #define	IP_RCVBUF_CONT_HANDLES	30	/* Buffer handles in entry. */
 #define	IP_RECEIVE_CONT_TYPE	0x2B	/* IP receive continuation entry */
 typedef struct ip_rcv_cont_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  reserved;
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t reserved;
+	uint8_t entry_status;		/* Entry Status. */
 	uint16_t buffer_handle[IP_RCVBUF_CONT_HANDLES]; /* Buf handles */
 } ip_rcv_cont_entry_t;
 
@@ -1250,16 +1197,16 @@
 #define	IP_24XX_RCVBUF_HANDLES	4
 #define	IP_24XX_RECEIVE_TYPE	0x3c
 typedef struct ip_rcv_24xx_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  segment_count;		/* Segment count. */
-	uint8_t  entry_status;		/* Entry Status. */
-	uint8_t  s_id[3];		/* Source ID. */
-	uint8_t  reserved[1];
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t segment_count;		/* Segment count. */
+	uint8_t entry_status;		/* Entry Status. */
+	uint8_t s_id[3];		/* Source ID. */
+	uint8_t reserved[1];
 	uint16_t comp_status;		/* Completion status. */
 	uint16_t n_port_hdl;		/* Loop ID */
-	uint8_t  class_of_srv_l;	/* Class of service - LSB. */
-	uint8_t  class_of_srv_h;	/* Class of service - MSB. */
+	uint8_t class_of_srv_l;	/* Class of service - LSB. */
+	uint8_t class_of_srv_h;	/* Class of service - MSB. */
 	uint16_t seq_length;		/* Sequence length. */
 	uint16_t buffer_handle[IP_24XX_RCVBUF_HANDLES]; /* Buffer handles. */
 } ip_rcv_24xx_entry_t;
@@ -1278,17 +1225,17 @@
  */
 #define	IP_POOL_BUFFERS		4
 #define	IP_BUF_POOL_TYPE	0x3d
-typedef struct ip_buf_pool_entry  {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+typedef struct ip_buf_pool_entry {
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
 	uint16_t status;
 	uint16_t buffer_pool_id;
 	uint16_t option;
-	uint8_t  buffer_count;
-	uint8_t  buffer_count_h;
+	uint8_t buffer_count;
+	uint8_t buffer_count_h;
 	rcvbuf_t buffers[IP_POOL_BUFFERS];
 } ip_buf_pool_entry_t;
 /*
@@ -1296,28 +1243,28 @@
  */
 #define	VP_MODIFY_TYPE		0x31
 typedef struct vp_modify_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
 	uint16_t reserved;
 	uint16_t status;
-	uint8_t  command;
-	uint8_t  vp_count;
-	uint8_t  first_vp_index;
-	uint8_t  second_vp_index;
-	uint8_t  first_options;
-	uint8_t  first_hard_prev_addr;
-	uint8_t  reserved_2[2];
-	uint8_t  first_port_name[8];
-	uint8_t  first_node_name[8];
-	uint8_t  second_options;
-	uint8_t  second_hard_prev_addr;
-	uint8_t  reserved_3[2];
-	uint8_t  second_port_name[8];
-	uint8_t  second_node_name[8];
-	uint8_t  reserved_4[6];
+	uint8_t command;
+	uint8_t vp_count;
+	uint8_t first_vp_index;
+	uint8_t second_vp_index;
+	uint8_t first_options;
+	uint8_t first_hard_prev_addr;
+	uint8_t reserved_2[2];
+	uint8_t first_port_name[8];
+	uint8_t first_node_name[8];
+	uint8_t second_options;
+	uint8_t second_hard_prev_addr;
+	uint8_t reserved_3[2];
+	uint8_t second_port_name[8];
+	uint8_t second_node_name[8];
+	uint8_t reserved_4[6];
 	uint16_t fcf_index;
 } vp_modify_entry_t;
 
@@ -1332,19 +1279,19 @@
  */
 #define	VP_CONTROL_TYPE		0x30
 typedef struct vp_control_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
 	uint16_t vp_index_failed;
 	uint16_t status;
-	uint8_t  command;
-	uint8_t  command_h;
-	uint8_t  vp_count;
-	uint8_t  vp_count_h;
-	uint8_t  vp_index[16];
-	uint8_t  reserved[30];
+	uint8_t command;
+	uint8_t command_h;
+	uint8_t vp_count;
+	uint8_t vp_count_h;
+	uint8_t vp_index[16];
+	uint8_t reserved[30];
 	uint16_t fcf_index;
 } vp_control_entry_t;
 
@@ -1362,43 +1309,67 @@
  */
 #define	REPORT_ID_TYPE		0x32
 typedef struct report_id_0 {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
-	uint8_t  acq_cnt;		/* format 0 acquired, format 1 count */
-	uint8_t  setup;			/* format 0 */
-	uint8_t  reserved[2];
-	uint8_t  port_id[3];
-	uint8_t  format;
-	uint8_t  vp_index[16];
-	uint8_t  reserved_1[32];
+	uint8_t vp_acquired;
+	uint8_t vp_setup;
+	uint8_t reserved[2];
+	uint8_t port_id[3];
+	uint8_t format;
+	uint8_t vp_index[16];
+	uint8_t reserved_1[32];
 } report_id_0_t;
 
 typedef struct report_id_1 {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
 	uint16_t vp_count;
-	uint8_t  vp_index;
-	uint8_t  status;
-	uint8_t  port_id[3];
-	uint8_t  format;
-	uint8_t  reserved[48];
+	uint8_t vp_index;
+	uint8_t vp_status;
+	uint8_t port_id[3];
+	uint8_t format;
+	uint8_t reserved[48];
 } report_id_1_t;
 
+typedef struct report_id_acq {
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
+	uint32_t handle;		/* System handle */
+	uint8_t vp_acquired;
+	uint8_t vp_setup;
+	uint8_t vp_index;
+	uint8_t vp_status;
+	uint8_t port_id[3];
+	uint8_t format;
+	uint8_t status_subcode;
+	uint8_t flags;
+	uint16_t fip_flags;
+	uint16_t fcf_index;
+	uint16_t mac[3];
+	uint8_t reserved[4];
+	uint8_t ls_rjt_subcode;
+	uint8_t ls_rjt_explanation;
+	uint8_t ls_rjt_reason_code;
+	uint8_t reserved_1[29];
+} report_id_acq_t;
+
 /*
  * ISP2400 queue - Verify Menlo FW entry structure definition.
  */
 #define	VERIFY_MENLO_TYPE	0x1b
 typedef struct vfy_menlo_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
 	uint16_t options_status;
 	uint16_t failure_code;
@@ -1410,8 +1381,7 @@
 	uint32_t fw_size;
 	uint32_t fw_sequence_size;
 	uint32_t relative_offset;
-	uint32_t dseg_0_address[2];	/* Data segment 0 address. */
-	uint32_t dseg_0_length;		/* Data segment 0 length. */
+	ql_64bit_data_seg_t	dseg;	/* Data segments. */
 } vfy_menlo_entry_t;
 
 /*
@@ -1429,10 +1399,10 @@
  */
 #define	MENLO_DATA_TYPE		0x2b
 typedef struct menlo_data_entry {
-	uint8_t  entry_type;		/* Entry type. */
-	uint8_t  entry_count;		/* Entry count. */
-	uint8_t  sys_define;		/* System defined. */
-	uint8_t  entry_status;		/* Entry Status. */
+	uint8_t entry_type;		/* Entry type. */
+	uint8_t entry_count;		/* Entry count. */
+	uint8_t sys_define;		/* System defined. */
+	uint8_t entry_status;		/* Entry Status. */
 	uint32_t handle;		/* System handle */
 	uint16_t options_status;
 	uint16_t failure_code;
@@ -1444,8 +1414,7 @@
 	uint32_t reserved_2[3];
 	uint32_t total_byte_count;
 	uint32_t reserved_3;
-	uint32_t dseg_0_address[2];	/* Data segment 0 address. */
-	uint32_t dseg_0_length;		/* Data segment 0 length. */
+	ql_64bit_data_seg_t	dseg;	/* Data segments. */
 } menlo_data_entry_t;
 
 /*
@@ -1466,6 +1435,7 @@
 	vp_modify_entry_t	vpm;
 	vfy_menlo_entry_t	mvfy;
 	menlo_data_entry_t	mdata;
+	els_passthru_entry_t	els;
 } ql_mbx_iocb_t;
 
 /*
@@ -1476,16 +1446,18 @@
  * Global Function Prototypes in ql_iocb.c source file.
  */
 void ql_start_iocb(ql_adapter_state_t *, ql_srb_t *);
-void ql_isp_cmd(ql_adapter_state_t *);
-int ql_marker(ql_adapter_state_t *, uint16_t, uint16_t, uint8_t);
+int ql_marker(ql_adapter_state_t *, uint16_t, ql_lun_t *lq, uint8_t);
 void ql_isp_rcvbuf(ql_adapter_state_t *);
-void ql_command_iocb(ql_adapter_state_t *, ql_srb_t *, void *);
-void ql_ms_iocb(ql_adapter_state_t *, ql_srb_t *, void *);
-void ql_ip_iocb(ql_adapter_state_t *, ql_srb_t *, void *);
-void ql_command_24xx_iocb(ql_adapter_state_t *, ql_srb_t *, void *);
-void ql_ms_24xx_iocb(ql_adapter_state_t *, ql_srb_t *, void *);
-void ql_ip_24xx_iocb(ql_adapter_state_t *, ql_srb_t *, void *);
-void ql_els_24xx_iocb(ql_adapter_state_t *, ql_srb_t *, void *);
+void ql_command_iocb(ql_adapter_state_t *, ql_request_q_t *, ql_srb_t *,
+    void *);
+void ql_ms_iocb(ql_adapter_state_t *, ql_request_q_t *, ql_srb_t *, void *);
+void ql_ip_iocb(ql_adapter_state_t *, ql_request_q_t *, ql_srb_t *, void *);
+void ql_command_24xx_iocb(ql_adapter_state_t *, ql_request_q_t *, ql_srb_t *,
+    void *);
+void ql_ms_24xx_iocb(ql_adapter_state_t *, ql_request_q_t *, ql_srb_t *,
+    void *);
+void ql_ip_24xx_iocb(ql_adapter_state_t *, ql_request_q_t *, ql_srb_t *,
+    void *);
 
 #ifdef	__cplusplus
 }
