diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2008-04-03 16:13:19 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-07 13:19:13 -0400 |
commit | cb8dacbf1110d8bd39413f3116ff1720f757854e (patch) | |
tree | 8d58f215c7a1091f7e760359c56d1316d9c80f7d /drivers/scsi/qla2xxx/qla_init.c | |
parent | 0971de7f56f809f40edae6fd372745e429e970e9 (diff) |
[SCSI] qla2xxx: Add hardware trace-logging support.
Recent ISPs have a region within FLASH which acts as a repository
for the logging of serious hardware and software failures.
Currently, the region is large enough to support up to 255
entries.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index e773697cd8d5..e9a7c2d13855 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -500,6 +500,7 @@ qla2x00_reset_chip(scsi_qla_host_t *ha) | |||
500 | static inline void | 500 | static inline void |
501 | qla24xx_reset_risc(scsi_qla_host_t *ha) | 501 | qla24xx_reset_risc(scsi_qla_host_t *ha) |
502 | { | 502 | { |
503 | int hw_evt = 0; | ||
503 | unsigned long flags = 0; | 504 | unsigned long flags = 0; |
504 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; | 505 | struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; |
505 | uint32_t cnt, d2; | 506 | uint32_t cnt, d2; |
@@ -528,6 +529,8 @@ qla24xx_reset_risc(scsi_qla_host_t *ha) | |||
528 | d2 = (uint32_t) RD_REG_WORD(®->mailbox0); | 529 | d2 = (uint32_t) RD_REG_WORD(®->mailbox0); |
529 | barrier(); | 530 | barrier(); |
530 | } | 531 | } |
532 | if (cnt == 0) | ||
533 | hw_evt = 1; | ||
531 | 534 | ||
532 | /* Wait for soft-reset to complete. */ | 535 | /* Wait for soft-reset to complete. */ |
533 | d2 = RD_REG_DWORD(®->ctrl_status); | 536 | d2 = RD_REG_DWORD(®->ctrl_status); |
@@ -536,6 +539,10 @@ qla24xx_reset_risc(scsi_qla_host_t *ha) | |||
536 | d2 = RD_REG_DWORD(®->ctrl_status); | 539 | d2 = RD_REG_DWORD(®->ctrl_status); |
537 | barrier(); | 540 | barrier(); |
538 | } | 541 | } |
542 | if (cnt == 0 || hw_evt) | ||
543 | qla2xxx_hw_event_log(ha, HW_EVENT_RESET_ERR, | ||
544 | RD_REG_WORD(®->mailbox1), RD_REG_WORD(®->mailbox2), | ||
545 | RD_REG_WORD(®->mailbox3)); | ||
539 | 546 | ||
540 | WRT_REG_DWORD(®->hccr, HCCRX_SET_RISC_RESET); | 547 | WRT_REG_DWORD(®->hccr, HCCRX_SET_RISC_RESET); |
541 | RD_REG_DWORD(®->hccr); | 548 | RD_REG_DWORD(®->hccr); |
@@ -1555,6 +1562,10 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) | |||
1555 | qla_printk(KERN_WARNING, ha, "Falling back to functioning (yet " | 1562 | qla_printk(KERN_WARNING, ha, "Falling back to functioning (yet " |
1556 | "invalid -- WWPN) defaults.\n"); | 1563 | "invalid -- WWPN) defaults.\n"); |
1557 | 1564 | ||
1565 | if (chksum) | ||
1566 | qla2xxx_hw_event_log(ha, HW_EVENT_NVRAM_CHKSUM_ERR, 0, | ||
1567 | MSW(chksum), LSW(chksum)); | ||
1568 | |||
1558 | /* | 1569 | /* |
1559 | * Set default initialization control block. | 1570 | * Set default initialization control block. |
1560 | */ | 1571 | */ |