diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2006-10-13 12:33:38 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-10-25 18:13:04 -0400 |
commit | 18c6c12759813c988bb05796d1b3352e98ae77de (patch) | |
tree | 4766e8b68a3ed124efc9c2c43b12a067eccf7bff /drivers/scsi/qla2xxx/qla_init.c | |
parent | f1663ad5dbb801e03c4c99c24d698ad5dba9aaff (diff) |
[SCSI] qla2xxx: Workaround D3 power-management issues.
Early ISP2432 parts have a known hardware issue when coming
out of a D3 hot state. This issue can result in a hung PCIe
link. Recent firmwares contain a workaround whereby the
stop-firmware mailbox command prevents the ISP from entering
the D3 hot state.
In order to ensure that the workaround succeeded the driver
must verify that the stop-firmware mailbox command completes
successfully. In the event of a failure, the driver
attempts a shutdown-retry after resetting the ISP and
re-executing firmware.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index d5e0a124c4f4..08cb5e3fb553 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -3948,3 +3948,24 @@ qla24xx_load_risc(scsi_qla_host_t *ha, uint32_t *srisc_addr) | |||
3948 | fail_fw_integrity: | 3948 | fail_fw_integrity: |
3949 | return QLA_FUNCTION_FAILED; | 3949 | return QLA_FUNCTION_FAILED; |
3950 | } | 3950 | } |
3951 | |||
3952 | void | ||
3953 | qla2x00_try_to_stop_firmware(scsi_qla_host_t *ha) | ||
3954 | { | ||
3955 | int ret, retries; | ||
3956 | |||
3957 | if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) | ||
3958 | return; | ||
3959 | |||
3960 | ret = qla2x00_stop_firmware(ha); | ||
3961 | for (retries = 5; ret != QLA_SUCCESS && retries ; retries--) { | ||
3962 | qla2x00_reset_chip(ha); | ||
3963 | if (qla2x00_chip_diag(ha) != QLA_SUCCESS) | ||
3964 | continue; | ||
3965 | if (qla2x00_setup_chip(ha) != QLA_SUCCESS) | ||
3966 | continue; | ||
3967 | qla_printk(KERN_INFO, ha, | ||
3968 | "Attempting retry of stop-firmware command...\n"); | ||
3969 | ret = qla2x00_stop_firmware(ha); | ||
3970 | } | ||
3971 | } | ||