diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2008-04-03 13:13:19 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-07 12:19:13 -0500 |
commit | cb8dacbf1110d8bd39413f3116ff1720f757854e (patch) | |
tree | 8d58f215c7a1091f7e760359c56d1316d9c80f7d /drivers/scsi/qla2xxx/qla_os.c | |
parent | 0971de7f56f809f40edae6fd372745e429e970e9 (diff) | |
download | linux-cb8dacbf1110d8bd39413f3116ff1720f757854e.tar.gz linux-cb8dacbf1110d8bd39413f3116ff1720f757854e.tar.bz2 linux-cb8dacbf1110d8bd39413f3116ff1720f757854e.zip |
[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_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index eb77067533ab..3d290417bfc6 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -1690,6 +1690,8 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ha->gid_list_info_size = 8; ha->optrom_size = OPTROM_SIZE_25XX; ha->isp_ops = &qla25xx_isp_ops; + ha->hw_event_start = PCI_FUNC(pdev->devfn) ? + FA_HW_EVENT1_ADDR: FA_HW_EVENT0_ADDR; } host->can_queue = ha->request_q_length + 128; @@ -2244,6 +2246,23 @@ qla2x00_post_aen_work(struct scsi_qla_host *ha, enum fc_host_event_code code, return qla2x00_post_work(ha, e, 1); } +int +qla2x00_post_hwe_work(struct scsi_qla_host *ha, uint16_t code, uint16_t d1, + uint16_t d2, uint16_t d3) +{ + struct qla_work_evt *e; + + e = qla2x00_alloc_work(ha, QLA_EVT_HWE_LOG, 1); + if (!e) + return QLA_FUNCTION_FAILED; + + e->u.hwe.code = code; + e->u.hwe.d1 = d1; + e->u.hwe.d2 = d2; + e->u.hwe.d3 = d3; + return qla2x00_post_work(ha, e, 1); +} + static void qla2x00_do_work(struct scsi_qla_host *ha) { @@ -2260,6 +2279,10 @@ qla2x00_do_work(struct scsi_qla_host *ha) fc_host_post_event(ha->host, fc_get_event_number(), e->u.aen.code, e->u.aen.data); break; + case QLA_EVT_HWE_LOG: + qla2xxx_hw_event_log(ha, e->u.hwe.code, e->u.hwe.d1, + e->u.hwe.d2, e->u.hwe.d3); + break; } if (e->flags & QLA_EVT_FLAG_FREE) kfree(e); |