* [PATCH 4/11] lpfc 10.2.8000.0: Fixed kernel panic in lpfc_abort_handler
@ 2014-04-04 17:51 James Smart
0 siblings, 0 replies; only message in thread
From: James Smart @ 2014-04-04 17:51 UTC (permalink / raw)
To: linux-scsi
Fixed kernel panic in lpfc_abort_handler
Signed-off-by: James Smart <james.smart@emulex.com>
---
lpfc_init.c | 5 ++++-
lpfc_scsi.c | 12 ++++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
diff -upNr a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
--- a/drivers/scsi/lpfc/lpfc_init.c 2014-04-03 10:24:21.152308548 -0400
+++ b/drivers/scsi/lpfc/lpfc_init.c 2014-04-03 10:24:22.340308608 -0400
@@ -4664,7 +4664,10 @@ lpfc_reset_hba(struct lpfc_hba *phba)
phba->link_state = LPFC_HBA_ERROR;
return;
}
- lpfc_offline_prep(phba, LPFC_MBX_WAIT);
+ if (phba->sli.sli_flag & LPFC_SLI_ACTIVE)
+ lpfc_offline_prep(phba, LPFC_MBX_WAIT);
+ else
+ lpfc_offline_prep(phba, LPFC_MBX_NO_WAIT);
lpfc_offline(phba);
lpfc_sli_brdrestart(phba);
lpfc_online(phba);
diff -upNr a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
--- a/drivers/scsi/lpfc/lpfc_scsi.c 2014-04-03 10:24:16.597308319 -0400
+++ b/drivers/scsi/lpfc/lpfc_scsi.c 2014-04-03 10:24:22.342308608 -0400
@@ -4834,6 +4834,14 @@ lpfc_abort_handler(struct scsi_cmnd *cmn
BUG_ON(iocb->context1 != lpfc_cmd);
+ /* abort issued in recovery is still in progress */
+ if (iocb->iocb_flag & LPFC_DRIVER_ABORTED) {
+ lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP,
+ "3389 SCSI Layer I/O Abort Request is pending\n");
+ spin_unlock_irqrestore(&phba->hbalock, flags);
+ goto wait_for_cmpl;
+ }
+
abtsiocb = __lpfc_sli_get_iocbq(phba);
if (abtsiocb == NULL) {
ret = FAILED;
@@ -4886,12 +4894,16 @@ lpfc_abort_handler(struct scsi_cmnd *cmn
lpfc_sli_handle_fast_ring_event(phba,
&phba->sli.ring[LPFC_FCP_RING], HA_R0RE_REQ);
+wait_for_cmpl:
lpfc_cmd->waitq = &waitq;
/* Wait for abort to complete */
wait_event_timeout(waitq,
(lpfc_cmd->pCmd != cmnd),
msecs_to_jiffies(2*vport->cfg_devloss_tmo*1000));
+
+ spin_lock_irqsave(shost->host_lock, flags);
lpfc_cmd->waitq = NULL;
+ spin_unlock_irqrestore(shost->host_lock, flags);
if (lpfc_cmd->pCmd == cmnd) {
ret = FAILED;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-04-04 17:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-04 17:51 [PATCH 4/11] lpfc 10.2.8000.0: Fixed kernel panic in lpfc_abort_handler James Smart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox