aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/lpfc/lpfc_scsi.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2008-04-07 10:16:05 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-04-10 07:53:12 -0500
commit97eab63490452f0a5242fa94ddaa9b727d69cb25 (patch)
treeb85d3bf226d4acf208981f1fcdbc9fde98d1c6a6 /drivers/scsi/lpfc/lpfc_scsi.c
parent9b37960523afb1b519b406dec4c4f3155b82b2ba (diff)
[SCSI] lpfc 8.2.6 : Miscellaneous Fixes
Miscellaneous Fixes - Allow WRITE_VPARAM command when the virtual port is in a stopped state - Fixed handling of our queue depth max that was unconditionally raising the depth on all vports, rather than just the vport affected. - Fix race in interrupt handler for mailbox processing that did not take out the host lock. - Removed unused functions: find_node, findnode_rpi, and fabric_abort_flogi - Correct misspelled word unsolicited in message 0146 - Correct HW-error 5 handling - it should not reset the adapter - Correct handling of IOCBs, which did not null out our pCmd field before invoking the midlayer io done function. - Changed our maximum supported target id to 4096 Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 6df8bc003a8..0910a9ab76a 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -169,6 +169,9 @@ lpfc_ramp_up_queue_handler(struct lpfc_hba *phba)
for(i = 0; i <= phba->max_vpi && vports[i] != NULL; i++) {
shost = lpfc_shost_from_vport(vports[i]);
shost_for_each_device(sdev, shost) {
+ if (vports[i]->cfg_lun_queue_depth <=
+ sdev->queue_depth)
+ continue;
if (sdev->ordered_tags)
scsi_adjust_queue_depth(sdev,
MSG_ORDERED_TAG,
@@ -606,6 +609,9 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
result = cmd->result;
sdev = cmd->device;
lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd);
+ spin_lock_irqsave(sdev->host->host_lock, flags);
+ lpfc_cmd->pCmd = NULL; /* This must be done before scsi_done */
+ spin_unlock_irqrestore(sdev->host->host_lock, flags);
cmd->scsi_done(cmd);
if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) {
@@ -614,7 +620,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
* wake up the thread.
*/
spin_lock_irqsave(sdev->host->host_lock, flags);
- lpfc_cmd->pCmd = NULL;
if (lpfc_cmd->waitq)
wake_up(lpfc_cmd->waitq);
spin_unlock_irqrestore(sdev->host->host_lock, flags);
@@ -685,7 +690,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
* wake up the thread.
*/
spin_lock_irqsave(sdev->host->host_lock, flags);
- lpfc_cmd->pCmd = NULL;
if (lpfc_cmd->waitq)
wake_up(lpfc_cmd->waitq);
spin_unlock_irqrestore(sdev->host->host_lock, flags);