提交 876dd7d0 编写于 作者: J James Smart 提交者: James Bottomley

[SCSI] lpfc 8.3.35: Fixed kernel warning on spinlock usage on some distributions

Signed-off-by: NJames Smart <james.smart@emulex.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 4c1b64ba
...@@ -3829,9 +3829,9 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, ...@@ -3829,9 +3829,9 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
cmd->scsi_done(cmd); cmd->scsi_done(cmd);
if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) { if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) {
spin_lock_irq(&phba->hbalock); spin_lock_irqsave(&phba->hbalock, flags);
lpfc_cmd->pCmd = NULL; lpfc_cmd->pCmd = NULL;
spin_unlock_irq(&phba->hbalock); spin_unlock_irqrestore(&phba->hbalock, flags);
/* /*
* If there is a thread waiting for command completion * If there is a thread waiting for command completion
...@@ -3871,9 +3871,9 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, ...@@ -3871,9 +3871,9 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
} }
} }
spin_lock_irq(&phba->hbalock); spin_lock_irqsave(&phba->hbalock, flags);
lpfc_cmd->pCmd = NULL; lpfc_cmd->pCmd = NULL;
spin_unlock_irq(&phba->hbalock); spin_unlock_irqrestore(&phba->hbalock, flags);
/* /*
* If there is a thread waiting for command completion * If there is a thread waiting for command completion
...@@ -4398,16 +4398,17 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) ...@@ -4398,16 +4398,17 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)
struct lpfc_scsi_buf *lpfc_cmd; struct lpfc_scsi_buf *lpfc_cmd;
IOCB_t *cmd, *icmd; IOCB_t *cmd, *icmd;
int ret = SUCCESS, status = 0; int ret = SUCCESS, status = 0;
unsigned long flags;
DECLARE_WAIT_QUEUE_HEAD_ONSTACK(waitq); DECLARE_WAIT_QUEUE_HEAD_ONSTACK(waitq);
status = fc_block_scsi_eh(cmnd); status = fc_block_scsi_eh(cmnd);
if (status != 0 && status != SUCCESS) if (status != 0 && status != SUCCESS)
return status; return status;
spin_lock_irq(&phba->hbalock); spin_lock_irqsave(&phba->hbalock, flags);
/* driver queued commands are in process of being flushed */ /* driver queued commands are in process of being flushed */
if (phba->hba_flag & HBA_FCP_IOQ_FLUSH) { if (phba->hba_flag & HBA_FCP_IOQ_FLUSH) {
spin_unlock_irq(&phba->hbalock); spin_unlock_irqrestore(&phba->hbalock, flags);
lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP,
"3168 SCSI Layer abort requested I/O has been " "3168 SCSI Layer abort requested I/O has been "
"flushed by LLD.\n"); "flushed by LLD.\n");
...@@ -4416,7 +4417,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) ...@@ -4416,7 +4417,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)
lpfc_cmd = (struct lpfc_scsi_buf *)cmnd->host_scribble; lpfc_cmd = (struct lpfc_scsi_buf *)cmnd->host_scribble;
if (!lpfc_cmd || !lpfc_cmd->pCmd) { if (!lpfc_cmd || !lpfc_cmd->pCmd) {
spin_unlock_irq(&phba->hbalock); spin_unlock_irqrestore(&phba->hbalock, flags);
lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP,
"2873 SCSI Layer I/O Abort Request IO CMPL Status " "2873 SCSI Layer I/O Abort Request IO CMPL Status "
"x%x ID %d LUN %d\n", "x%x ID %d LUN %d\n",
...@@ -4427,7 +4428,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) ...@@ -4427,7 +4428,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)
iocb = &lpfc_cmd->cur_iocbq; iocb = &lpfc_cmd->cur_iocbq;
/* the command is in process of being cancelled */ /* the command is in process of being cancelled */
if (!(iocb->iocb_flag & LPFC_IO_ON_TXCMPLQ)) { if (!(iocb->iocb_flag & LPFC_IO_ON_TXCMPLQ)) {
spin_unlock_irq(&phba->hbalock); spin_unlock_irqrestore(&phba->hbalock, flags);
lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP,
"3169 SCSI Layer abort requested I/O has been " "3169 SCSI Layer abort requested I/O has been "
"cancelled by LLD.\n"); "cancelled by LLD.\n");
...@@ -4484,7 +4485,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) ...@@ -4484,7 +4485,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)
abtsiocb->iocb_cmpl = lpfc_sli_abort_fcp_cmpl; abtsiocb->iocb_cmpl = lpfc_sli_abort_fcp_cmpl;
abtsiocb->vport = vport; abtsiocb->vport = vport;
/* no longer need the lock after this point */ /* no longer need the lock after this point */
spin_unlock_irq(&phba->hbalock); spin_unlock_irqrestore(&phba->hbalock, flags);
if (lpfc_sli_issue_iocb(phba, LPFC_FCP_RING, abtsiocb, 0) == if (lpfc_sli_issue_iocb(phba, LPFC_FCP_RING, abtsiocb, 0) ==
IOCB_ERROR) { IOCB_ERROR) {
...@@ -4516,7 +4517,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) ...@@ -4516,7 +4517,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)
goto out; goto out;
out_unlock: out_unlock:
spin_unlock_irq(&phba->hbalock); spin_unlock_irqrestore(&phba->hbalock, flags);
out: out:
lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP,
"0749 SCSI Layer I/O Abort Request Status x%x ID %d " "0749 SCSI Layer I/O Abort Request Status x%x ID %d "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册