aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_def.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_def.h')
-rw-r--r--drivers/scsi/qla4xxx/ql4_def.h45
1 files changed, 42 insertions, 3 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
index bfe68545203f..7f2492e88be7 100644
--- a/drivers/scsi/qla4xxx/ql4_def.h
+++ b/drivers/scsi/qla4xxx/ql4_def.h
@@ -150,8 +150,6 @@
150#define QL4_SESS_RECOVERY_TMO 120 /* iSCSI session */ 150#define QL4_SESS_RECOVERY_TMO 120 /* iSCSI session */
151 /* recovery timeout */ 151 /* recovery timeout */
152 152
153#define MSB(x) ((uint8_t)((uint16_t)(x) >> 8))
154#define LSW(x) ((uint16_t)(x))
155#define LSDW(x) ((u32)((u64)(x))) 153#define LSDW(x) ((u32)((u64)(x)))
156#define MSDW(x) ((u32)((((u64)(x)) >> 16) >> 16)) 154#define MSDW(x) ((u32)((((u64)(x)) >> 16) >> 16))
157 155
@@ -223,6 +221,15 @@ struct srb {
223 uint16_t reserved2; 221 uint16_t reserved2;
224}; 222};
225 223
224/* Mailbox request block structure */
225struct mrb {
226 struct scsi_qla_host *ha;
227 struct mbox_cmd_iocb *mbox;
228 uint32_t mbox_cmd;
229 uint16_t iocb_cnt; /* Number of used iocbs */
230 uint32_t pid;
231};
232
226/* 233/*
227 * Asynchronous Event Queue structure 234 * Asynchronous Event Queue structure
228 */ 235 */
@@ -265,7 +272,7 @@ struct ddb_entry {
265 * retried */ 272 * retried */
266 uint32_t default_time2wait; /* Default Min time between 273 uint32_t default_time2wait; /* Default Min time between
267 * relogins (+aens) */ 274 * relogins (+aens) */
268 275 uint16_t chap_tbl_idx;
269}; 276};
270 277
271struct qla_ddb_index { 278struct qla_ddb_index {
@@ -284,6 +291,7 @@ struct ql4_tuple_ddb {
284 uint16_t options; 291 uint16_t options;
285#define DDB_OPT_IPV6 0x0e0e 292#define DDB_OPT_IPV6 0x0e0e
286#define DDB_OPT_IPV4 0x0f0f 293#define DDB_OPT_IPV4 0x0f0f
294 uint8_t isid[6];
287}; 295};
288 296
289/* 297/*
@@ -303,7 +311,28 @@ struct ql4_tuple_ddb {
303#define DF_ISNS_DISCOVERED 2 /* Device was discovered via iSNS */ 311#define DF_ISNS_DISCOVERED 2 /* Device was discovered via iSNS */
304#define DF_FO_MASKED 3 312#define DF_FO_MASKED 3
305 313
314enum qla4_work_type {
315 QLA4_EVENT_AEN,
316 QLA4_EVENT_PING_STATUS,
317};
306 318
319struct qla4_work_evt {
320 struct list_head list;
321 enum qla4_work_type type;
322 union {
323 struct {
324 enum iscsi_host_event_code code;
325 uint32_t data_size;
326 uint8_t data[0];
327 } aen;
328 struct {
329 uint32_t status;
330 uint32_t pid;
331 uint32_t data_size;
332 uint8_t data[0];
333 } ping;
334 } u;
335};
307 336
308struct ql82xx_hw_data { 337struct ql82xx_hw_data {
309 /* Offsets for flash/nvram access (set to ~0 if not used). */ 338 /* Offsets for flash/nvram access (set to ~0 if not used). */
@@ -657,6 +686,7 @@ struct scsi_qla_host {
657 struct dma_pool *chap_dma_pool; 686 struct dma_pool *chap_dma_pool;
658 uint8_t *chap_list; /* CHAP table cache */ 687 uint8_t *chap_list; /* CHAP table cache */
659 struct mutex chap_sem; 688 struct mutex chap_sem;
689
660#define CHAP_DMA_BLOCK_SIZE 512 690#define CHAP_DMA_BLOCK_SIZE 512
661 struct workqueue_struct *task_wq; 691 struct workqueue_struct *task_wq;
662 unsigned long ddb_idx_map[MAX_DDB_ENTRIES / BITS_PER_LONG]; 692 unsigned long ddb_idx_map[MAX_DDB_ENTRIES / BITS_PER_LONG];
@@ -674,6 +704,15 @@ struct scsi_qla_host {
674 uint16_t sec_ddb_idx; 704 uint16_t sec_ddb_idx;
675 int is_reset; 705 int is_reset;
676 uint16_t temperature; 706 uint16_t temperature;
707
708 /* event work list */
709 struct list_head work_list;
710 spinlock_t work_lock;
711
712 /* mbox iocb */
713#define MAX_MRB 128
714 struct mrb *active_mrb_array[MAX_MRB];
715 uint32_t mrb_index;
677}; 716};
678 717
679struct ql4_task_data { 718struct ql4_task_data {