Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282271
b: refs/heads/master
c: 8a28896
h: refs/heads/master
i:
  282269: 3f89282
  282267: dccebd4
  282263: b884e2b
  282255: 263a1fb
  282239: baf507b
v: v3
  • Loading branch information
Sarang Radke authored and James Bottomley committed Dec 15, 2011
1 parent b94d0cf commit aaffec4
Show file tree
Hide file tree
Showing 2 changed files with 21 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: 9acf753393cde200e9d25574c6d7d2cf57636001
refs/heads/master: 8a288960192591c405767d98ebe372f66df1a6c6
20 changes: 20 additions & 0 deletions trunk/drivers/scsi/qla4xxx/ql4_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -2806,6 +2806,7 @@ static void qla4xxx_do_dpc(struct work_struct *work)
**/
static void qla4xxx_free_adapter(struct scsi_qla_host *ha)
{
qla4xxx_abort_active_cmds(ha, DID_NO_CONNECT << 16);

if (test_bit(AF_INTERRUPTS_ON, &ha->flags)) {
/* Turn-off interrupts on the card. */
Expand Down Expand Up @@ -4815,6 +4816,20 @@ static int qla4xxx_eh_target_reset(struct scsi_cmnd *cmd)
return SUCCESS;
}

/**
* qla4xxx_is_eh_active - check if error handler is running
* @shost: Pointer to SCSI Host struct
*
* This routine finds that if reset host is called in EH
* scenario or from some application like sg_reset
**/
static int qla4xxx_is_eh_active(struct Scsi_Host *shost)
{
if (shost->shost_state == SHOST_RECOVERY)
return 1;
return 0;
}

/**
* qla4xxx_eh_host_reset - kernel callback
* @cmd: Pointer to Linux's SCSI command structure
Expand All @@ -4832,6 +4847,11 @@ static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd)
if (ql4xdontresethba) {
DEBUG2(printk("scsi%ld: %s: Don't Reset HBA\n",
ha->host_no, __func__));

/* Clear outstanding srb in queues */
if (qla4xxx_is_eh_active(cmd->device->host))
qla4xxx_abort_active_cmds(ha, DID_ABORT << 16);

return FAILED;
}

Expand Down

0 comments on commit aaffec4

Please sign in to comment.