diff options
author | James Smart <James.Smart@Emulex.Com> | 2008-12-04 22:39:29 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-12-29 12:24:26 -0500 |
commit | eaf15d5b5605e1a403f631489de30a49fd66905d (patch) | |
tree | 24d79af30d8d2053c8159cf0fa23ca37aaf1bd0e /drivers/scsi/lpfc/lpfc_scsi.c | |
parent | 8f34f4cea3234ae347c4b0ffa302ffb85f140838 (diff) |
[SCSI] lpfc 8.3.0 : Fix several minor issues
- Avoid polling HBA Error Attention when HBA's PCI channel is offline
due to PCI EEH
- Fix handling of RSCN with non-zero event qualifiers
- Remove unnecessary sleeps during HBA initialization which slow down
driver load
- Fix internal and external loopback on FCoE HBAs
- Fix incorrect decrement of cmd_pending count in lpfc_queuecomand
error path
- Fix reporting of port busy events to management application
- Rename lpfc_adjust_queue_depth() to lpfc_rampdown_queue_depth() for
consistency with its partner lpfc_rampup_queue_depth()
- Delete redundant lpfc_cmd->start_time = jiffies assignment in
lpfc_queuecommand()
- Fix handling for ELS, mailbox and heartbeat time outs in the worker
thread by removing unnecessary checking of the work_port_events
flags.
- Fix NULL pointer dereference in lpfc_prep_els_iocb
- In lpfc_device_recov_npr_node(), move clearing of NLP_NPR_2B_DISC
flag after call to lpfc_cancel_retry_delay_tmo() to keep
targets-in-discovery count correct
- Remove lpfc_probe_one()'s call to scsi_scan_host() which could cause
concurrent SCSI scans to step on each other
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.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index cf6b2d40a923..51e6a6394951 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -148,7 +148,7 @@ lpfc_send_sdev_queuedepth_change_event(struct lpfc_hba *phba, | |||
148 | } | 148 | } |
149 | 149 | ||
150 | /** | 150 | /** |
151 | * lpfc_adjust_queue_depth: Post RAMP_DOWN_QUEUE event for worker thread. | 151 | * lpfc_rampdown_queue_depth: Post RAMP_DOWN_QUEUE event to worker thread. |
152 | * @phba: The Hba for which this call is being executed. | 152 | * @phba: The Hba for which this call is being executed. |
153 | * | 153 | * |
154 | * This routine is called when there is resource error in driver or firmware. | 154 | * This routine is called when there is resource error in driver or firmware. |
@@ -159,7 +159,7 @@ lpfc_send_sdev_queuedepth_change_event(struct lpfc_hba *phba, | |||
159 | * This routine should be called with no lock held. | 159 | * This routine should be called with no lock held. |
160 | **/ | 160 | **/ |
161 | void | 161 | void |
162 | lpfc_adjust_queue_depth(struct lpfc_hba *phba) | 162 | lpfc_rampdown_queue_depth(struct lpfc_hba *phba) |
163 | { | 163 | { |
164 | unsigned long flags; | 164 | unsigned long flags; |
165 | uint32_t evt_posted; | 165 | uint32_t evt_posted; |
@@ -1551,7 +1551,7 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) | |||
1551 | 1551 | ||
1552 | lpfc_cmd = lpfc_get_scsi_buf(phba); | 1552 | lpfc_cmd = lpfc_get_scsi_buf(phba); |
1553 | if (lpfc_cmd == NULL) { | 1553 | if (lpfc_cmd == NULL) { |
1554 | lpfc_adjust_queue_depth(phba); | 1554 | lpfc_rampdown_queue_depth(phba); |
1555 | 1555 | ||
1556 | lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP, | 1556 | lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP, |
1557 | "0707 driver's buffer pool is empty, " | 1557 | "0707 driver's buffer pool is empty, " |
@@ -1559,7 +1559,6 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) | |||
1559 | goto out_host_busy; | 1559 | goto out_host_busy; |
1560 | } | 1560 | } |
1561 | 1561 | ||
1562 | lpfc_cmd->start_time = jiffies; | ||
1563 | /* | 1562 | /* |
1564 | * Store the midlayer's command structure for the completion phase | 1563 | * Store the midlayer's command structure for the completion phase |
1565 | * and complete the command initialization. | 1564 | * and complete the command initialization. |
@@ -1580,9 +1579,10 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) | |||
1580 | atomic_inc(&ndlp->cmd_pending); | 1579 | atomic_inc(&ndlp->cmd_pending); |
1581 | err = lpfc_sli_issue_iocb(phba, &phba->sli.ring[psli->fcp_ring], | 1580 | err = lpfc_sli_issue_iocb(phba, &phba->sli.ring[psli->fcp_ring], |
1582 | &lpfc_cmd->cur_iocbq, SLI_IOCB_RET_IOCB); | 1581 | &lpfc_cmd->cur_iocbq, SLI_IOCB_RET_IOCB); |
1583 | if (err) | 1582 | if (err) { |
1583 | atomic_dec(&ndlp->cmd_pending); | ||
1584 | goto out_host_busy_free_buf; | 1584 | goto out_host_busy_free_buf; |
1585 | 1585 | } | |
1586 | if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) { | 1586 | if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) { |
1587 | lpfc_sli_poll_fcp_ring(phba); | 1587 | lpfc_sli_poll_fcp_ring(phba); |
1588 | if (phba->cfg_poll & DISABLE_FCP_RING_INT) | 1588 | if (phba->cfg_poll & DISABLE_FCP_RING_INT) |
@@ -1592,7 +1592,6 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) | |||
1592 | return 0; | 1592 | return 0; |
1593 | 1593 | ||
1594 | out_host_busy_free_buf: | 1594 | out_host_busy_free_buf: |
1595 | atomic_dec(&ndlp->cmd_pending); | ||
1596 | lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); | 1595 | lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); |
1597 | lpfc_release_scsi_buf(phba, lpfc_cmd); | 1596 | lpfc_release_scsi_buf(phba, lpfc_cmd); |
1598 | out_host_busy: | 1597 | out_host_busy: |