aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx
diff options
context:
space:
mode:
authorDavid C Somayajulu <david.somayajulu@qlogic.com>2007-05-23 20:50:55 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-26 12:47:27 -0400
commit5c8bfc9449b64b3726262bcaa914eeeafdd47ed3 (patch)
tree229a6059a2eb8ead5b419220cb43702912f47084 /drivers/scsi/qla4xxx
parent0187106664e1bbc1a17398e6125b8206d6c7079d (diff)
[SCSI] qla4xxx: ql4_def.h log all AENs and cleanup
Add support for logging all AENs and clean up Signed-off-by: David Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla4xxx')
-rw-r--r--drivers/scsi/qla4xxx/ql4_def.h78
1 files changed, 39 insertions, 39 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
index 6f4cf2dd2f4a..accaf690eaf0 100644
--- a/drivers/scsi/qla4xxx/ql4_def.h
+++ b/drivers/scsi/qla4xxx/ql4_def.h
@@ -122,8 +122,7 @@
122 122
123#define ISCSI_IPADDR_SIZE 4 /* IP address size */ 123#define ISCSI_IPADDR_SIZE 4 /* IP address size */
124#define ISCSI_ALIAS_SIZE 32 /* ISCSI Alais name size */ 124#define ISCSI_ALIAS_SIZE 32 /* ISCSI Alais name size */
125#define ISCSI_NAME_SIZE 255 /* ISCSI Name size - 125#define ISCSI_NAME_SIZE 0xE0 /* ISCSI Name size */
126 * usually a string */
127 126
128#define LSDW(x) ((u32)((u64)(x))) 127#define LSDW(x) ((u32)((u64)(x)))
129#define MSDW(x) ((u32)((((u64)(x)) >> 16) >> 16)) 128#define MSDW(x) ((u32)((((u64)(x)) >> 16) >> 16))
@@ -187,9 +186,21 @@ struct srb {
187 u_long u_start; /* Time when we handed the cmd to F/W */ 186 u_long u_start; /* Time when we handed the cmd to F/W */
188}; 187};
189 188
190 /* 189/*
191 * Device Database (DDB) structure 190 * Asynchronous Event Queue structure
192 */ 191 */
192struct aen {
193 uint32_t mbox_sts[MBOX_AEN_REG_COUNT];
194};
195
196struct ql4_aen_log {
197 int count;
198 struct aen entry[MAX_AEN_ENTRIES];
199};
200
201/*
202 * Device Database (DDB) structure
203 */
193struct ddb_entry { 204struct ddb_entry {
194 struct list_head list; /* ddb list */ 205 struct list_head list; /* ddb list */
195 struct scsi_qla_host *ha; 206 struct scsi_qla_host *ha;
@@ -254,13 +265,6 @@ struct ddb_entry {
254#define DF_ISNS_DISCOVERED 2 /* Device was discovered via iSNS */ 265#define DF_ISNS_DISCOVERED 2 /* Device was discovered via iSNS */
255#define DF_FO_MASKED 3 266#define DF_FO_MASKED 3
256 267
257/*
258 * Asynchronous Event Queue structure
259 */
260struct aen {
261 uint32_t mbox_sts[MBOX_AEN_REG_COUNT];
262};
263
264 268
265#include "ql4_fw.h" 269#include "ql4_fw.h"
266#include "ql4_nvram.h" 270#include "ql4_nvram.h"
@@ -270,31 +274,31 @@ struct aen {
270 */ 274 */
271struct scsi_qla_host { 275struct scsi_qla_host {
272 /* Linux adapter configuration data */ 276 /* Linux adapter configuration data */
273 struct Scsi_Host *host; /* pointer to host data */
274 uint32_t tot_ddbs;
275 unsigned long flags; 277 unsigned long flags;
276 278
277#define AF_ONLINE 0 /* 0x00000001 */ 279#define AF_ONLINE 0 /* 0x00000001 */
278#define AF_INIT_DONE 1 /* 0x00000002 */ 280#define AF_INIT_DONE 1 /* 0x00000002 */
279#define AF_MBOX_COMMAND 2 /* 0x00000004 */ 281#define AF_MBOX_COMMAND 2 /* 0x00000004 */
280#define AF_MBOX_COMMAND_DONE 3 /* 0x00000008 */ 282#define AF_MBOX_COMMAND_DONE 3 /* 0x00000008 */
281#define AF_INTERRUPTS_ON 6 /* 0x00000040 Not Used */ 283#define AF_INTERRUPTS_ON 6 /* 0x00000040 */
282#define AF_GET_CRASH_RECORD 7 /* 0x00000080 */ 284#define AF_GET_CRASH_RECORD 7 /* 0x00000080 */
283#define AF_LINK_UP 8 /* 0x00000100 */ 285#define AF_LINK_UP 8 /* 0x00000100 */
284#define AF_IRQ_ATTACHED 10 /* 0x00000400 */ 286#define AF_IRQ_ATTACHED 10 /* 0x00000400 */
285#define AF_ISNS_CMD_IN_PROCESS 12 /* 0x00001000 */ 287#define AF_DISABLE_ACB_COMPLETE 11 /* 0x00000800 */
286#define AF_ISNS_CMD_DONE 13 /* 0x00002000 */
287 288
288 unsigned long dpc_flags; 289 unsigned long dpc_flags;
289 290
290#define DPC_RESET_HA 1 /* 0x00000002 */ 291#define DPC_RESET_HA 1 /* 0x00000002 */
291#define DPC_RETRY_RESET_HA 2 /* 0x00000004 */ 292#define DPC_RETRY_RESET_HA 2 /* 0x00000004 */
292#define DPC_RELOGIN_DEVICE 3 /* 0x00000008 */ 293#define DPC_RELOGIN_DEVICE 3 /* 0x00000008 */
293#define DPC_RESET_HA_DESTROY_DDB_LIST 4 /* 0x00000010 */ 294#define DPC_RESET_HA_DESTROY_DDB_LIST 4 /* 0x00000010 */
294#define DPC_RESET_HA_INTR 5 /* 0x00000020 */ 295#define DPC_RESET_HA_INTR 5 /* 0x00000020 */
295#define DPC_ISNS_RESTART 7 /* 0x00000080 */ 296#define DPC_ISNS_RESTART 7 /* 0x00000080 */
296#define DPC_AEN 9 /* 0x00000200 */ 297#define DPC_AEN 9 /* 0x00000200 */
297#define DPC_GET_DHCP_IP_ADDR 15 /* 0x00008000 */ 298#define DPC_GET_DHCP_IP_ADDR 15 /* 0x00008000 */
299
300 struct Scsi_Host *host; /* pointer to host data */
301 uint32_t tot_ddbs;
298 302
299 uint16_t iocb_cnt; 303 uint16_t iocb_cnt;
300 uint16_t iocb_hiwat; 304 uint16_t iocb_hiwat;
@@ -344,6 +348,7 @@ struct scsi_qla_host {
344 uint32_t firmware_version[2]; 348 uint32_t firmware_version[2];
345 uint32_t patch_number; 349 uint32_t patch_number;
346 uint32_t build_number; 350 uint32_t build_number;
351 uint32_t board_id;
347 352
348 /* --- From Init_FW --- */ 353 /* --- From Init_FW --- */
349 /* init_cb_t *init_cb; */ 354 /* init_cb_t *init_cb; */
@@ -363,7 +368,6 @@ struct scsi_qla_host {
363 368
364 /* --- From GetFwState --- */ 369 /* --- From GetFwState --- */
365 uint32_t firmware_state; 370 uint32_t firmware_state;
366 uint32_t board_id;
367 uint32_t addl_fw_state; 371 uint32_t addl_fw_state;
368 372
369 /* Linux kernel thread */ 373 /* Linux kernel thread */
@@ -414,6 +418,8 @@ struct scsi_qla_host {
414 uint16_t aen_out; 418 uint16_t aen_out;
415 struct aen aen_q[MAX_AEN_ENTRIES]; 419 struct aen aen_q[MAX_AEN_ENTRIES];
416 420
421 struct ql4_aen_log aen_log;/* tracks all aens */
422
417 /* This mutex protects several threads to do mailbox commands 423 /* This mutex protects several threads to do mailbox commands
418 * concurrently. 424 * concurrently.
419 */ 425 */
@@ -585,10 +591,4 @@ static inline void ql4xxx_unlock_drvr(struct scsi_qla_host *a)
585#define FLUSH_DDB_CHANGED_AENS 1 591#define FLUSH_DDB_CHANGED_AENS 1
586#define RELOGIN_DDB_CHANGED_AENS 2 592#define RELOGIN_DDB_CHANGED_AENS 2
587 593
588#include "ql4_version.h"
589#include "ql4_glbl.h"
590#include "ql4_dbg.h"
591#include "ql4_inline.h"
592
593
594#endif /*_QLA4XXX_H */ 594#endif /*_QLA4XXX_H */