Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40324
b: refs/heads/master
c: 18c6c12
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Vasquez authored and James Bottomley committed Oct 25, 2006
1 parent 8ee4709 commit 5ed8150
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f1663ad5dbb801e03c4c99c24d698ad5dba9aaff
refs/heads/master: 18c6c12759813c988bb05796d1b3352e98ae77de
1 change: 1 addition & 0 deletions trunk/drivers/scsi/qla2xxx/qla_gbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ extern void qla2x00_update_fcport(scsi_qla_host_t *, fc_port_t *);
extern void qla2x00_reg_remote_port(scsi_qla_host_t *, fc_port_t *);

extern void qla2x00_alloc_fw_dump(scsi_qla_host_t *);
extern void qla2x00_try_to_stop_firmware(scsi_qla_host_t *);

/*
* Global Data in qla_os.c source file.
Expand Down
21 changes: 21 additions & 0 deletions trunk/drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -3948,3 +3948,24 @@ qla24xx_load_risc(scsi_qla_host_t *ha, uint32_t *srisc_addr)
fail_fw_integrity:
return QLA_FUNCTION_FAILED;
}

void
qla2x00_try_to_stop_firmware(scsi_qla_host_t *ha)
{
int ret, retries;

if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha))
return;

ret = qla2x00_stop_firmware(ha);
for (retries = 5; ret != QLA_SUCCESS && retries ; retries--) {
qla2x00_reset_chip(ha);
if (qla2x00_chip_diag(ha) != QLA_SUCCESS)
continue;
if (qla2x00_setup_chip(ha) != QLA_SUCCESS)
continue;
qla_printk(KERN_INFO, ha,
"Attempting retry of stop-firmware command...\n");
ret = qla2x00_stop_firmware(ha);
}
}
6 changes: 3 additions & 3 deletions trunk/drivers/scsi/qla2xxx/qla_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -1712,17 +1712,17 @@ qla2x00_free_device(scsi_qla_host_t *ha)
if (ha->eft)
qla2x00_trace_control(ha, TC_DISABLE, 0, 0);

ha->flags.online = 0;

/* Stop currently executing firmware. */
qla2x00_stop_firmware(ha);
qla2x00_try_to_stop_firmware(ha);

/* turn-off interrupts on the card */
if (ha->interrupts_on)
ha->isp_ops.disable_intrs(ha);

qla2x00_mem_free(ha);

ha->flags.online = 0;

/* Detach interrupts */
if (ha->host->irq)
free_irq(ha->host->irq, ha);
Expand Down

0 comments on commit 5ed8150

Please sign in to comment.