[PATCH] lpfc 8.1.3: Fix polling mode panic
[linux-2.6.git] / drivers / scsi / lpfc / lpfc_scsi.c
index 094f18f1fa05c0ba6ba3aa580a151497d2804c08..f93799873721290c38b774b9668ad5bb0dd91365 100644 (file)
@@ -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) &&