Commit b808608b authored by Jamie Wellnitz's avatar Jamie Wellnitz Committed by James Bottomley
Browse files

[PATCH] lpfc 8.1.3: Fix polling mode panic



Fix polling mode panic

Cause: Race between interrupt driven and polling path in harvesting iocbs
from
the response ring.

Signed-off-by: default avatarJamie Wellnitz <Jamie.Wellnitz@emulex.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 66a9ed66
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -467,6 +467,11 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
	sdev = cmd->device;
	cmd->scsi_done(cmd);

	if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) {
		lpfc_release_scsi_buf(phba, lpfc_cmd);
		return;
	}

	if (!result && pnode != NULL &&
	   ((jiffies - pnode->last_ramp_up_time) >
		LPFC_Q_RAMP_UP_INTERVAL * HZ) &&
+11 −6
Original line number Diff line number Diff line
@@ -1154,6 +1154,10 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba,
			cmdiocbq = lpfc_sli_iocbq_lookup(phba, pring,
							 &rspiocbq);
			if ((cmdiocbq) && (cmdiocbq->iocb_cmpl)) {
				if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) {
					(cmdiocbq->iocb_cmpl)(phba, cmdiocbq,
							      &rspiocbq);
				} else {
					spin_unlock_irqrestore(
						phba->host->host_lock, iflag);
					(cmdiocbq->iocb_cmpl)(phba, cmdiocbq,
@@ -1161,6 +1165,7 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba * phba,
					spin_lock_irqsave(phba->host->host_lock,
							  iflag);
				}
			}
			break;
		default:
			if (irsp->ulpCommand == CMD_ADAPTER_MSG) {