[SCSI] lpfc 8.3.15: BSG, Discovery, and Misc fixes
- BSG interface related: - Fix node reference count if node is active - Warn if we're overwriting an active CT context - Discovery related: - Clear "Ignore Reg Login" flag when purging mailbox queue - Pay attention to return code for fc_block_scsi_eh() - Stall device loss code if we're almost done when it fires (we're logged in, but PRLI is outstanding) - Bugs - Correct DIF code for endianness issues - Correct where we had missed points to check txq on i/o completion/cleanup Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
committed by
James Bottomley
parent
75576bb9b2
commit
589a52d6a9
@@ -623,6 +623,7 @@ lpfc_sli4_fcp_xri_aborted(struct lpfc_hba *phba,
|
||||
unsigned long iflag = 0;
|
||||
struct lpfc_iocbq *iocbq;
|
||||
int i;
|
||||
struct lpfc_sli_ring *pring = &phba->sli.ring[LPFC_ELS_RING];
|
||||
|
||||
spin_lock_irqsave(&phba->hbalock, iflag);
|
||||
spin_lock(&phba->sli4_hba.abts_scsi_buf_list_lock);
|
||||
@@ -651,6 +652,8 @@ lpfc_sli4_fcp_xri_aborted(struct lpfc_hba *phba,
|
||||
psb = container_of(iocbq, struct lpfc_scsi_buf, cur_iocbq);
|
||||
psb->exch_busy = 0;
|
||||
spin_unlock_irqrestore(&phba->hbalock, iflag);
|
||||
if (pring->txq_cnt)
|
||||
lpfc_worker_wake_up(phba);
|
||||
return;
|
||||
|
||||
}
|
||||
@@ -1322,6 +1325,10 @@ lpfc_bg_setup_bpl(struct lpfc_hba *phba, struct scsi_cmnd *sc,
|
||||
bf_set(pde5_type, pde5, LPFC_PDE5_DESCRIPTOR);
|
||||
pde5->reftag = reftag;
|
||||
|
||||
/* Endian convertion if necessary for PDE5 */
|
||||
pde5->word0 = cpu_to_le32(pde5->word0);
|
||||
pde5->reftag = cpu_to_le32(pde5->reftag);
|
||||
|
||||
/* advance bpl and increment bde count */
|
||||
num_bde++;
|
||||
bpl++;
|
||||
@@ -1340,6 +1347,11 @@ lpfc_bg_setup_bpl(struct lpfc_hba *phba, struct scsi_cmnd *sc,
|
||||
bf_set(pde6_ai, pde6, 1);
|
||||
bf_set(pde6_apptagval, pde6, apptagval);
|
||||
|
||||
/* Endian convertion if necessary for PDE6 */
|
||||
pde6->word0 = cpu_to_le32(pde6->word0);
|
||||
pde6->word1 = cpu_to_le32(pde6->word1);
|
||||
pde6->word2 = cpu_to_le32(pde6->word2);
|
||||
|
||||
/* advance bpl and increment bde count */
|
||||
num_bde++;
|
||||
bpl++;
|
||||
@@ -1447,6 +1459,10 @@ lpfc_bg_setup_bpl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc,
|
||||
bf_set(pde5_type, pde5, LPFC_PDE5_DESCRIPTOR);
|
||||
pde5->reftag = reftag;
|
||||
|
||||
/* Endian convertion if necessary for PDE5 */
|
||||
pde5->word0 = cpu_to_le32(pde5->word0);
|
||||
pde5->reftag = cpu_to_le32(pde5->reftag);
|
||||
|
||||
/* advance bpl and increment bde count */
|
||||
num_bde++;
|
||||
bpl++;
|
||||
@@ -1463,6 +1479,11 @@ lpfc_bg_setup_bpl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc,
|
||||
bf_set(pde6_ai, pde6, 1);
|
||||
bf_set(pde6_apptagval, pde6, apptagval);
|
||||
|
||||
/* Endian convertion if necessary for PDE6 */
|
||||
pde6->word0 = cpu_to_le32(pde6->word0);
|
||||
pde6->word1 = cpu_to_le32(pde6->word1);
|
||||
pde6->word2 = cpu_to_le32(pde6->word2);
|
||||
|
||||
/* advance bpl and increment bde count */
|
||||
num_bde++;
|
||||
bpl++;
|
||||
@@ -1474,7 +1495,6 @@ lpfc_bg_setup_bpl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc,
|
||||
prot_bde->addrLow = le32_to_cpu(putPaddrHigh(protphysaddr));
|
||||
protgroup_len = sg_dma_len(sgpe);
|
||||
|
||||
|
||||
/* must be integer multiple of the DIF block length */
|
||||
BUG_ON(protgroup_len % 8);
|
||||
|
||||
@@ -3047,7 +3067,9 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd)
|
||||
int ret = SUCCESS;
|
||||
DECLARE_WAIT_QUEUE_HEAD_ONSTACK(waitq);
|
||||
|
||||
fc_block_scsi_eh(cmnd);
|
||||
ret = fc_block_scsi_eh(cmnd);
|
||||
if (ret)
|
||||
return ret;
|
||||
lpfc_cmd = (struct lpfc_scsi_buf *)cmnd->host_scribble;
|
||||
BUG_ON(!lpfc_cmd);
|
||||
|
||||
@@ -3365,7 +3387,9 @@ lpfc_device_reset_handler(struct scsi_cmnd *cmnd)
|
||||
return FAILED;
|
||||
}
|
||||
pnode = rdata->pnode;
|
||||
fc_block_scsi_eh(cmnd);
|
||||
status = fc_block_scsi_eh(cmnd);
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
status = lpfc_chk_tgt_mapped(vport, cmnd);
|
||||
if (status == FAILED) {
|
||||
@@ -3430,7 +3454,9 @@ lpfc_target_reset_handler(struct scsi_cmnd *cmnd)
|
||||
return FAILED;
|
||||
}
|
||||
pnode = rdata->pnode;
|
||||
fc_block_scsi_eh(cmnd);
|
||||
status = fc_block_scsi_eh(cmnd);
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
status = lpfc_chk_tgt_mapped(vport, cmnd);
|
||||
if (status == FAILED) {
|
||||
@@ -3496,7 +3522,9 @@ lpfc_bus_reset_handler(struct scsi_cmnd *cmnd)
|
||||
fc_host_post_vendor_event(shost, fc_get_event_number(),
|
||||
sizeof(scsi_event), (char *)&scsi_event, LPFC_NL_VENDOR_ID);
|
||||
|
||||
fc_block_scsi_eh(cmnd);
|
||||
ret = fc_block_scsi_eh(cmnd);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* Since the driver manages a single bus device, reset all
|
||||
|
Reference in New Issue
Block a user