Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282272
b: refs/heads/master
c: 8e0f3a6
h: refs/heads/master
v: v3
  • Loading branch information
Sarang Radke authored and James Bottomley committed Dec 15, 2011
1 parent aaffec4 commit 665cffe
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a288960192591c405767d98ebe372f66df1a6c6
refs/heads/master: 8e0f3a66a2833eaad618584c2bac89a8ae2efce7
21 changes: 21 additions & 0 deletions trunk/drivers/scsi/qla4xxx/ql4_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -2414,6 +2414,7 @@ static int qla4xxx_recover_adapter(struct scsi_qla_host *ha)
{
int status = QLA_ERROR;
uint8_t reset_chip = 0;
uint32_t dev_state;

/* Stall incoming I/O until we are done */
scsi_block_requests(ha->host);
Expand Down Expand Up @@ -2501,6 +2502,25 @@ static int qla4xxx_recover_adapter(struct scsi_qla_host *ha)
* Since we don't want to block the DPC for too long
* with multiple resets in the same thread,
* utilize DPC to retry */
if (is_qla8022(ha)) {
qla4_8xxx_idc_lock(ha);
dev_state = qla4_8xxx_rd_32(ha, QLA82XX_CRB_DEV_STATE);
qla4_8xxx_idc_unlock(ha);
if (dev_state == QLA82XX_DEV_FAILED) {
ql4_printk(KERN_INFO, ha, "%s: don't retry "
"recover adapter. H/W is in Failed "
"state\n", __func__);
qla4xxx_dead_adapter_cleanup(ha);
clear_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags);
clear_bit(DPC_RESET_HA, &ha->dpc_flags);
clear_bit(DPC_RESET_HA_FW_CONTEXT,
&ha->dpc_flags);
status = QLA_ERROR;

goto exit_recover;
}
}

if (!test_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags)) {
ha->retry_reset_ha_cnt = MAX_RESET_HA_RETRIES;
DEBUG2(printk("scsi%ld: recover adapter - retrying "
Expand Down Expand Up @@ -2539,6 +2559,7 @@ static int qla4xxx_recover_adapter(struct scsi_qla_host *ha)
clear_bit(DPC_RETRY_RESET_HA, &ha->dpc_flags);
}

exit_recover:
ha->adapter_error_count++;

if (test_bit(AF_ONLINE, &ha->flags))
Expand Down

0 comments on commit 665cffe

Please sign in to comment.