diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index e5eb40d2c512..051b3b3bd625 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -1293,7 +1293,6 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc, | |||
1293 | uint32_t *reftag, uint16_t *apptag, uint32_t new_guard) | 1293 | uint32_t *reftag, uint16_t *apptag, uint32_t new_guard) |
1294 | { | 1294 | { |
1295 | struct scatterlist *sgpe; /* s/g prot entry */ | 1295 | struct scatterlist *sgpe; /* s/g prot entry */ |
1296 | struct scatterlist *sgde; /* s/g data entry */ | ||
1297 | struct lpfc_scsi_buf *lpfc_cmd = NULL; | 1296 | struct lpfc_scsi_buf *lpfc_cmd = NULL; |
1298 | struct scsi_dif_tuple *src = NULL; | 1297 | struct scsi_dif_tuple *src = NULL; |
1299 | struct lpfc_nodelist *ndlp; | 1298 | struct lpfc_nodelist *ndlp; |
@@ -1309,7 +1308,6 @@ lpfc_bg_err_inject(struct lpfc_hba *phba, struct scsi_cmnd *sc, | |||
1309 | return 0; | 1308 | return 0; |
1310 | 1309 | ||
1311 | sgpe = scsi_prot_sglist(sc); | 1310 | sgpe = scsi_prot_sglist(sc); |
1312 | sgde = scsi_sglist(sc); | ||
1313 | lba = scsi_get_lba(sc); | 1311 | lba = scsi_get_lba(sc); |
1314 | 1312 | ||
1315 | /* First check if we need to match the LBA */ | 1313 | /* First check if we need to match the LBA */ |
@@ -1882,7 +1880,6 @@ lpfc_bg_setup_bpl(struct lpfc_hba *phba, struct scsi_cmnd *sc, | |||
1882 | #endif | 1880 | #endif |
1883 | uint32_t checking = 1; | 1881 | uint32_t checking = 1; |
1884 | uint32_t reftag; | 1882 | uint32_t reftag; |
1885 | unsigned blksize; | ||
1886 | uint8_t txop, rxop; | 1883 | uint8_t txop, rxop; |
1887 | 1884 | ||
1888 | status = lpfc_sc_to_bg_opcodes(phba, sc, &txop, &rxop); | 1885 | status = lpfc_sc_to_bg_opcodes(phba, sc, &txop, &rxop); |
@@ -1890,7 +1887,6 @@ lpfc_bg_setup_bpl(struct lpfc_hba *phba, struct scsi_cmnd *sc, | |||
1890 | goto out; | 1887 | goto out; |
1891 | 1888 | ||
1892 | /* extract some info from the scsi command for pde*/ | 1889 | /* extract some info from the scsi command for pde*/ |
1893 | blksize = lpfc_cmd_blksize(sc); | ||
1894 | reftag = (uint32_t)scsi_get_lba(sc); /* Truncate LBA */ | 1890 | reftag = (uint32_t)scsi_get_lba(sc); /* Truncate LBA */ |
1895 | 1891 | ||
1896 | #ifdef CONFIG_SCSI_LPFC_DEBUG_FS | 1892 | #ifdef CONFIG_SCSI_LPFC_DEBUG_FS |
@@ -2263,7 +2259,6 @@ lpfc_bg_setup_sgl(struct lpfc_hba *phba, struct scsi_cmnd *sc, | |||
2263 | dma_addr_t physaddr; | 2259 | dma_addr_t physaddr; |
2264 | int i = 0, num_sge = 0, status; | 2260 | int i = 0, num_sge = 0, status; |
2265 | uint32_t reftag; | 2261 | uint32_t reftag; |
2266 | unsigned blksize; | ||
2267 | uint8_t txop, rxop; | 2262 | uint8_t txop, rxop; |
2268 | #ifdef CONFIG_SCSI_LPFC_DEBUG_FS | 2263 | #ifdef CONFIG_SCSI_LPFC_DEBUG_FS |
2269 | uint32_t rc; | 2264 | uint32_t rc; |
@@ -2277,7 +2272,6 @@ lpfc_bg_setup_sgl(struct lpfc_hba *phba, struct scsi_cmnd *sc, | |||
2277 | goto out; | 2272 | goto out; |
2278 | 2273 | ||
2279 | /* extract some info from the scsi command for pde*/ | 2274 | /* extract some info from the scsi command for pde*/ |
2280 | blksize = lpfc_cmd_blksize(sc); | ||
2281 | reftag = (uint32_t)scsi_get_lba(sc); /* Truncate LBA */ | 2275 | reftag = (uint32_t)scsi_get_lba(sc); /* Truncate LBA */ |
2282 | 2276 | ||
2283 | #ifdef CONFIG_SCSI_LPFC_DEBUG_FS | 2277 | #ifdef CONFIG_SCSI_LPFC_DEBUG_FS |
@@ -2881,7 +2875,7 @@ lpfc_calc_bg_err(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) | |||
2881 | struct scsi_cmnd *cmd = lpfc_cmd->pCmd; | 2875 | struct scsi_cmnd *cmd = lpfc_cmd->pCmd; |
2882 | struct scsi_dif_tuple *src = NULL; | 2876 | struct scsi_dif_tuple *src = NULL; |
2883 | uint8_t *data_src = NULL; | 2877 | uint8_t *data_src = NULL; |
2884 | uint16_t guard_tag, guard_type; | 2878 | uint16_t guard_tag; |
2885 | uint16_t start_app_tag, app_tag; | 2879 | uint16_t start_app_tag, app_tag; |
2886 | uint32_t start_ref_tag, ref_tag; | 2880 | uint32_t start_ref_tag, ref_tag; |
2887 | int prot, protsegcnt; | 2881 | int prot, protsegcnt; |
@@ -2922,7 +2916,6 @@ lpfc_calc_bg_err(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) | |||
2922 | data_len = sgde->length; | 2916 | data_len = sgde->length; |
2923 | if ((data_len & (blksize - 1)) == 0) | 2917 | if ((data_len & (blksize - 1)) == 0) |
2924 | chk_guard = 1; | 2918 | chk_guard = 1; |
2925 | guard_type = scsi_host_get_guard(cmd->device->host); | ||
2926 | 2919 | ||
2927 | src = (struct scsi_dif_tuple *)sg_virt(sgpe); | 2920 | src = (struct scsi_dif_tuple *)sg_virt(sgpe); |
2928 | start_ref_tag = (uint32_t)scsi_get_lba(cmd); /* Truncate LBA */ | 2921 | start_ref_tag = (uint32_t)scsi_get_lba(cmd); /* Truncate LBA */ |
@@ -3908,12 +3901,10 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
3908 | struct lpfc_rport_data *rdata = lpfc_cmd->rdata; | 3901 | struct lpfc_rport_data *rdata = lpfc_cmd->rdata; |
3909 | struct lpfc_nodelist *pnode = rdata->pnode; | 3902 | struct lpfc_nodelist *pnode = rdata->pnode; |
3910 | struct scsi_cmnd *cmd; | 3903 | struct scsi_cmnd *cmd; |
3911 | int result; | ||
3912 | int depth; | 3904 | int depth; |
3913 | unsigned long flags; | 3905 | unsigned long flags; |
3914 | struct lpfc_fast_path_event *fast_path_evt; | 3906 | struct lpfc_fast_path_event *fast_path_evt; |
3915 | struct Scsi_Host *shost; | 3907 | struct Scsi_Host *shost; |
3916 | uint32_t queue_depth, scsi_id; | ||
3917 | uint32_t logit = LOG_FCP; | 3908 | uint32_t logit = LOG_FCP; |
3918 | 3909 | ||
3919 | /* Sanity check on return of outstanding command */ | 3910 | /* Sanity check on return of outstanding command */ |
@@ -4095,7 +4086,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
4095 | } | 4086 | } |
4096 | 4087 | ||
4097 | lpfc_update_stats(phba, lpfc_cmd); | 4088 | lpfc_update_stats(phba, lpfc_cmd); |
4098 | result = cmd->result; | ||
4099 | if (vport->cfg_max_scsicmpl_time && | 4089 | if (vport->cfg_max_scsicmpl_time && |
4100 | time_after(jiffies, lpfc_cmd->start_time + | 4090 | time_after(jiffies, lpfc_cmd->start_time + |
4101 | msecs_to_jiffies(vport->cfg_max_scsicmpl_time))) { | 4091 | msecs_to_jiffies(vport->cfg_max_scsicmpl_time))) { |
@@ -4132,8 +4122,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
4132 | lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); | 4122 | lpfc_scsi_unprep_dma_buf(phba, lpfc_cmd); |
4133 | 4123 | ||
4134 | /* The sdev is not guaranteed to be valid post scsi_done upcall. */ | 4124 | /* The sdev is not guaranteed to be valid post scsi_done upcall. */ |
4135 | queue_depth = cmd->device->queue_depth; | ||
4136 | scsi_id = cmd->device->id; | ||
4137 | cmd->scsi_done(cmd); | 4125 | cmd->scsi_done(cmd); |
4138 | 4126 | ||
4139 | if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) { | 4127 | if (phba->cfg_poll & ENABLE_FCP_RING_POLLING) { |