Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328812
b: refs/heads/master
c: 92e3af6
h: refs/heads/master
v: v3
  • Loading branch information
James Smart authored and James Bottomley committed Sep 14, 2012
1 parent adb12ae commit d143675
Show file tree
Hide file tree
Showing 2 changed files with 10 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: 1c13bf664894b34ace55fce49cc49598267787b7
refs/heads/master: 92e3af663ab6ef7db888f3d3ffb7568fab870127
12 changes: 9 additions & 3 deletions trunk/drivers/scsi/lpfc/lpfc_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -3829,12 +3829,15 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
cmd->scsi_done(cmd);

if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) {
spin_lock_irq(&phba->hbalock);
lpfc_cmd->pCmd = NULL;
spin_unlock_irq(&phba->hbalock);

/*
* If there is a thread waiting for command completion
* wake up the thread.
*/
spin_lock_irqsave(shost->host_lock, flags);
lpfc_cmd->pCmd = NULL;
if (lpfc_cmd->waitq)
wake_up(lpfc_cmd->waitq);
spin_unlock_irqrestore(shost->host_lock, flags);
Expand Down Expand Up @@ -3868,12 +3871,15 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
}
}

spin_lock_irq(&phba->hbalock);
lpfc_cmd->pCmd = NULL;
spin_unlock_irq(&phba->hbalock);

/*
* If there is a thread waiting for command completion
* wake up the thread.
*/
spin_lock_irqsave(shost->host_lock, flags);
lpfc_cmd->pCmd = NULL;
if (lpfc_cmd->waitq)
wake_up(lpfc_cmd->waitq);
spin_unlock_irqrestore(shost->host_lock, flags);
Expand Down Expand Up @@ -4409,7 +4415,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)
}

lpfc_cmd = (struct lpfc_scsi_buf *)cmnd->host_scribble;
if (!lpfc_cmd) {
if (!lpfc_cmd || !lpfc_cmd->pCmd) {
spin_unlock_irq(&phba->hbalock);
lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP,
"2873 SCSI Layer I/O Abort Request IO CMPL Status "
Expand Down

0 comments on commit d143675

Please sign in to comment.