aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_scsi.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2012-09-29 11:31:28 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-10-08 07:09:08 -0400
commit876dd7d06cbdfcffb93f42fd734b6d46c27e3ca3 (patch)
tree8df525493d4034634932248e39ad109afa48ae53 /drivers/scsi/lpfc/lpfc_scsi.c
parent4c1b64bad4755e66c649c89653dadb0206c7b30a (diff)
[SCSI] lpfc 8.3.35: Fixed kernel warning on spinlock usage on some distributions
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 64013f3097ad..41ee7d5c415a 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -3829,9 +3829,9 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
3829 cmd->scsi_done(cmd); 3829 cmd->scsi_done(cmd);
3830 3830
3831 if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) { 3831 if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) {
3832 spin_lock_irq(&phba->hbalock); 3832 spin_lock_irqsave(&phba->hbalock, flags);
3833 lpfc_cmd->pCmd = NULL; 3833 lpfc_cmd->pCmd = NULL;
3834 spin_unlock_irq(&phba->hbalock); 3834 spin_unlock_irqrestore(&phba->hbalock, flags);
3835 3835
3836 /* 3836 /*
3837 * If there is a thread waiting for command completion 3837 * 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 } 3871 }
3872 } 3872 }
3873 3873
3874 spin_lock_irq(&phba->hbalock); 3874 spin_lock_irqsave(&phba->hbalock, flags);
3875 lpfc_cmd->pCmd = NULL; 3875 lpfc_cmd->pCmd = NULL;
3876 spin_unlock_irq(&phba->hbalock); 3876 spin_unlock_irqrestore(&phba->hbalock, flags);
3877 3877
3878 /* 3878 /*
3879 * If there is a thread waiting for command completion 3879 * If there is a thread waiting for command completion
@@ -4398,16 +4398,17 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)
4398 struct lpfc_scsi_buf *lpfc_cmd; 4398 struct lpfc_scsi_buf *lpfc_cmd;
4399 IOCB_t *cmd, *icmd; 4399 IOCB_t *cmd, *icmd;
4400 int ret = SUCCESS, status = 0; 4400 int ret = SUCCESS, status = 0;
4401 unsigned long flags;
4401 DECLARE_WAIT_QUEUE_HEAD_ONSTACK(waitq); 4402 DECLARE_WAIT_QUEUE_HEAD_ONSTACK(waitq);
4402 4403
4403 status = fc_block_scsi_eh(cmnd); 4404 status = fc_block_scsi_eh(cmnd);
4404 if (status != 0 && status != SUCCESS) 4405 if (status != 0 && status != SUCCESS)
4405 return status; 4406 return status;
4406 4407
4407 spin_lock_irq(&phba->hbalock); 4408 spin_lock_irqsave(&phba->hbalock, flags);
4408 /* driver queued commands are in process of being flushed */ 4409 /* driver queued commands are in process of being flushed */
4409 if (phba->hba_flag & HBA_FCP_IOQ_FLUSH) { 4410 if (phba->hba_flag & HBA_FCP_IOQ_FLUSH) {
4410 spin_unlock_irq(&phba->hbalock); 4411 spin_unlock_irqrestore(&phba->hbalock, flags);
4411 lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, 4412 lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP,
4412 "3168 SCSI Layer abort requested I/O has been " 4413 "3168 SCSI Layer abort requested I/O has been "
4413 "flushed by LLD.\n"); 4414 "flushed by LLD.\n");
@@ -4416,7 +4417,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)
4416 4417
4417 lpfc_cmd = (struct lpfc_scsi_buf *)cmnd->host_scribble; 4418 lpfc_cmd = (struct lpfc_scsi_buf *)cmnd->host_scribble;
4418 if (!lpfc_cmd || !lpfc_cmd->pCmd) { 4419 if (!lpfc_cmd || !lpfc_cmd->pCmd) {
4419 spin_unlock_irq(&phba->hbalock); 4420 spin_unlock_irqrestore(&phba->hbalock, flags);
4420 lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, 4421 lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP,
4421 "2873 SCSI Layer I/O Abort Request IO CMPL Status " 4422 "2873 SCSI Layer I/O Abort Request IO CMPL Status "
4422 "x%x ID %d LUN %d\n", 4423 "x%x ID %d LUN %d\n",
@@ -4427,7 +4428,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)
4427 iocb = &lpfc_cmd->cur_iocbq; 4428 iocb = &lpfc_cmd->cur_iocbq;
4428 /* the command is in process of being cancelled */ 4429 /* the command is in process of being cancelled */
4429 if (!(iocb->iocb_flag & LPFC_IO_ON_TXCMPLQ)) { 4430 if (!(iocb->iocb_flag & LPFC_IO_ON_TXCMPLQ)) {
4430 spin_unlock_irq(&phba->hbalock); 4431 spin_unlock_irqrestore(&phba->hbalock, flags);
4431 lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, 4432 lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP,
4432 "3169 SCSI Layer abort requested I/O has been " 4433 "3169 SCSI Layer abort requested I/O has been "
4433 "cancelled by LLD.\n"); 4434 "cancelled by LLD.\n");
@@ -4484,7 +4485,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)
4484 abtsiocb->iocb_cmpl = lpfc_sli_abort_fcp_cmpl; 4485 abtsiocb->iocb_cmpl = lpfc_sli_abort_fcp_cmpl;
4485 abtsiocb->vport = vport; 4486 abtsiocb->vport = vport;
4486 /* no longer need the lock after this point */ 4487 /* no longer need the lock after this point */
4487 spin_unlock_irq(&phba->hbalock); 4488 spin_unlock_irqrestore(&phba->hbalock, flags);
4488 4489
4489 if (lpfc_sli_issue_iocb(phba, LPFC_FCP_RING, abtsiocb, 0) == 4490 if (lpfc_sli_issue_iocb(phba, LPFC_FCP_RING, abtsiocb, 0) ==
4490 IOCB_ERROR) { 4491 IOCB_ERROR) {
@@ -4516,7 +4517,7 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)
4516 goto out; 4517 goto out;
4517 4518
4518out_unlock: 4519out_unlock:
4519 spin_unlock_irq(&phba->hbalock); 4520 spin_unlock_irqrestore(&phba->hbalock, flags);
4520out: 4521out:
4521 lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, 4522 lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP,
4522 "0749 SCSI Layer I/O Abort Request Status x%x ID %d " 4523 "0749 SCSI Layer I/O Abort Request Status x%x ID %d "