提交 52c82823 编写于 作者: B Bart Van Assche 提交者: James Bottomley

qla2xxx: Remove set-but-not-used variables

Detected these variables by building with W=1.
Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
Acked-by: NHimanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
上级 2374dd23
...@@ -884,7 +884,6 @@ qla2x00_sysfs_read_dcbx_tlv(struct file *filp, struct kobject *kobj, ...@@ -884,7 +884,6 @@ qla2x00_sysfs_read_dcbx_tlv(struct file *filp, struct kobject *kobj,
struct device, kobj))); struct device, kobj)));
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
int rval; int rval;
uint16_t actual_size;
if (!capable(CAP_SYS_ADMIN) || off != 0 || count > DCBX_TLV_DATA_SIZE) if (!capable(CAP_SYS_ADMIN) || off != 0 || count > DCBX_TLV_DATA_SIZE)
return 0; return 0;
...@@ -901,7 +900,6 @@ qla2x00_sysfs_read_dcbx_tlv(struct file *filp, struct kobject *kobj, ...@@ -901,7 +900,6 @@ qla2x00_sysfs_read_dcbx_tlv(struct file *filp, struct kobject *kobj,
} }
do_read: do_read:
actual_size = 0;
memset(ha->dcbx_tlv, 0, DCBX_TLV_DATA_SIZE); memset(ha->dcbx_tlv, 0, DCBX_TLV_DATA_SIZE);
rval = qla2x00_get_dcbx_params(vha, ha->dcbx_tlv_dma, rval = qla2x00_get_dcbx_params(vha, ha->dcbx_tlv_dma,
......
...@@ -1733,7 +1733,6 @@ qla24xx_process_bidir_cmd(struct fc_bsg_job *bsg_job) ...@@ -1733,7 +1733,6 @@ qla24xx_process_bidir_cmd(struct fc_bsg_job *bsg_job)
struct Scsi_Host *host = bsg_job->shost; struct Scsi_Host *host = bsg_job->shost;
scsi_qla_host_t *vha = shost_priv(host); scsi_qla_host_t *vha = shost_priv(host);
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
uint16_t thread_id;
uint32_t rval = EXT_STATUS_OK; uint32_t rval = EXT_STATUS_OK;
uint16_t req_sg_cnt = 0; uint16_t req_sg_cnt = 0;
uint16_t rsp_sg_cnt = 0; uint16_t rsp_sg_cnt = 0;
...@@ -1790,8 +1789,6 @@ qla24xx_process_bidir_cmd(struct fc_bsg_job *bsg_job) ...@@ -1790,8 +1789,6 @@ qla24xx_process_bidir_cmd(struct fc_bsg_job *bsg_job)
goto done; goto done;
} }
thread_id = bsg_job->request->rqst_data.h_vendor.vendor_cmd[1];
mutex_lock(&ha->selflogin_lock); mutex_lock(&ha->selflogin_lock);
if (vha->self_login_loop_id == 0) { if (vha->self_login_loop_id == 0) {
/* Initialize all required fields of fcport */ /* Initialize all required fields of fcport */
...@@ -2174,7 +2171,6 @@ qla24xx_bsg_request(struct fc_bsg_job *bsg_job) ...@@ -2174,7 +2171,6 @@ qla24xx_bsg_request(struct fc_bsg_job *bsg_job)
{ {
int ret = -EINVAL; int ret = -EINVAL;
struct fc_rport *rport; struct fc_rport *rport;
fc_port_t *fcport = NULL;
struct Scsi_Host *host; struct Scsi_Host *host;
scsi_qla_host_t *vha; scsi_qla_host_t *vha;
...@@ -2183,7 +2179,6 @@ qla24xx_bsg_request(struct fc_bsg_job *bsg_job) ...@@ -2183,7 +2179,6 @@ qla24xx_bsg_request(struct fc_bsg_job *bsg_job)
if (bsg_job->request->msgcode == FC_BSG_RPT_ELS) { if (bsg_job->request->msgcode == FC_BSG_RPT_ELS) {
rport = bsg_job->rport; rport = bsg_job->rport;
fcport = *(fc_port_t **) rport->dd_data;
host = rport_to_shost(rport); host = rport_to_shost(rport);
vha = shost_priv(host); vha = shost_priv(host);
} else { } else {
......
...@@ -117,7 +117,7 @@ qla27xx_dump_mpi_ram(struct qla_hw_data *ha, uint32_t addr, uint32_t *ram, ...@@ -117,7 +117,7 @@ qla27xx_dump_mpi_ram(struct qla_hw_data *ha, uint32_t addr, uint32_t *ram,
{ {
int rval; int rval;
uint32_t cnt, stat, timer, dwords, idx; uint32_t cnt, stat, timer, dwords, idx;
uint16_t mb0, mb1; uint16_t mb0;
struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
dma_addr_t dump_dma = ha->gid_list_dma; dma_addr_t dump_dma = ha->gid_list_dma;
uint32_t *dump = (uint32_t *)ha->gid_list; uint32_t *dump = (uint32_t *)ha->gid_list;
...@@ -161,7 +161,7 @@ qla27xx_dump_mpi_ram(struct qla_hw_data *ha, uint32_t addr, uint32_t *ram, ...@@ -161,7 +161,7 @@ qla27xx_dump_mpi_ram(struct qla_hw_data *ha, uint32_t addr, uint32_t *ram,
&ha->mbx_cmd_flags); &ha->mbx_cmd_flags);
mb0 = RD_REG_WORD(&reg->mailbox0); mb0 = RD_REG_WORD(&reg->mailbox0);
mb1 = RD_REG_WORD(&reg->mailbox1); RD_REG_WORD(&reg->mailbox1);
WRT_REG_DWORD(&reg->hccr, WRT_REG_DWORD(&reg->hccr,
HCCRX_CLR_RISC_INT); HCCRX_CLR_RISC_INT);
...@@ -1039,7 +1039,6 @@ qla24xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) ...@@ -1039,7 +1039,6 @@ qla24xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
{ {
int rval; int rval;
uint32_t cnt; uint32_t cnt;
uint32_t risc_address;
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
uint32_t __iomem *dmp_reg; uint32_t __iomem *dmp_reg;
...@@ -1047,7 +1046,6 @@ qla24xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) ...@@ -1047,7 +1046,6 @@ qla24xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
uint16_t __iomem *mbx_reg; uint16_t __iomem *mbx_reg;
unsigned long flags; unsigned long flags;
struct qla24xx_fw_dump *fw; struct qla24xx_fw_dump *fw;
uint32_t ext_mem_cnt;
void *nxt; void *nxt;
void *nxt_chain; void *nxt_chain;
uint32_t *last_chain = NULL; uint32_t *last_chain = NULL;
...@@ -1056,7 +1054,6 @@ qla24xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) ...@@ -1056,7 +1054,6 @@ qla24xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
if (IS_P3P_TYPE(ha)) if (IS_P3P_TYPE(ha))
return; return;
risc_address = ext_mem_cnt = 0;
flags = 0; flags = 0;
ha->fw_dump_cap_flags = 0; ha->fw_dump_cap_flags = 0;
...@@ -1294,7 +1291,6 @@ qla25xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) ...@@ -1294,7 +1291,6 @@ qla25xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
{ {
int rval; int rval;
uint32_t cnt; uint32_t cnt;
uint32_t risc_address;
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
uint32_t __iomem *dmp_reg; uint32_t __iomem *dmp_reg;
...@@ -1302,12 +1298,10 @@ qla25xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) ...@@ -1302,12 +1298,10 @@ qla25xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
uint16_t __iomem *mbx_reg; uint16_t __iomem *mbx_reg;
unsigned long flags; unsigned long flags;
struct qla25xx_fw_dump *fw; struct qla25xx_fw_dump *fw;
uint32_t ext_mem_cnt;
void *nxt, *nxt_chain; void *nxt, *nxt_chain;
uint32_t *last_chain = NULL; uint32_t *last_chain = NULL;
struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev);
risc_address = ext_mem_cnt = 0;
flags = 0; flags = 0;
ha->fw_dump_cap_flags = 0; ha->fw_dump_cap_flags = 0;
...@@ -1613,7 +1607,6 @@ qla81xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) ...@@ -1613,7 +1607,6 @@ qla81xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
{ {
int rval; int rval;
uint32_t cnt; uint32_t cnt;
uint32_t risc_address;
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
uint32_t __iomem *dmp_reg; uint32_t __iomem *dmp_reg;
...@@ -1621,12 +1614,10 @@ qla81xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) ...@@ -1621,12 +1614,10 @@ qla81xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
uint16_t __iomem *mbx_reg; uint16_t __iomem *mbx_reg;
unsigned long flags; unsigned long flags;
struct qla81xx_fw_dump *fw; struct qla81xx_fw_dump *fw;
uint32_t ext_mem_cnt;
void *nxt, *nxt_chain; void *nxt, *nxt_chain;
uint32_t *last_chain = NULL; uint32_t *last_chain = NULL;
struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev);
risc_address = ext_mem_cnt = 0;
flags = 0; flags = 0;
ha->fw_dump_cap_flags = 0; ha->fw_dump_cap_flags = 0;
...@@ -1933,8 +1924,7 @@ void ...@@ -1933,8 +1924,7 @@ void
qla83xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) qla83xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
{ {
int rval; int rval;
uint32_t cnt, reg_data; uint32_t cnt;
uint32_t risc_address;
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
uint32_t __iomem *dmp_reg; uint32_t __iomem *dmp_reg;
...@@ -1942,12 +1932,10 @@ qla83xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) ...@@ -1942,12 +1932,10 @@ qla83xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
uint16_t __iomem *mbx_reg; uint16_t __iomem *mbx_reg;
unsigned long flags; unsigned long flags;
struct qla83xx_fw_dump *fw; struct qla83xx_fw_dump *fw;
uint32_t ext_mem_cnt;
void *nxt, *nxt_chain; void *nxt, *nxt_chain;
uint32_t *last_chain = NULL; uint32_t *last_chain = NULL;
struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev);
risc_address = ext_mem_cnt = 0;
flags = 0; flags = 0;
ha->fw_dump_cap_flags = 0; ha->fw_dump_cap_flags = 0;
...@@ -1979,16 +1967,16 @@ qla83xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) ...@@ -1979,16 +1967,16 @@ qla83xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
WRT_REG_DWORD(&reg->iobase_addr, 0x6000); WRT_REG_DWORD(&reg->iobase_addr, 0x6000);
dmp_reg = &reg->iobase_window; dmp_reg = &reg->iobase_window;
reg_data = RD_REG_DWORD(dmp_reg); RD_REG_DWORD(dmp_reg);
WRT_REG_DWORD(dmp_reg, 0); WRT_REG_DWORD(dmp_reg, 0);
dmp_reg = &reg->unused_4_1[0]; dmp_reg = &reg->unused_4_1[0];
reg_data = RD_REG_DWORD(dmp_reg); RD_REG_DWORD(dmp_reg);
WRT_REG_DWORD(dmp_reg, 0); WRT_REG_DWORD(dmp_reg, 0);
WRT_REG_DWORD(&reg->iobase_addr, 0x6010); WRT_REG_DWORD(&reg->iobase_addr, 0x6010);
dmp_reg = &reg->unused_4_1[2]; dmp_reg = &reg->unused_4_1[2];
reg_data = RD_REG_DWORD(dmp_reg); RD_REG_DWORD(dmp_reg);
WRT_REG_DWORD(dmp_reg, 0); WRT_REG_DWORD(dmp_reg, 0);
/* select PCR and disable ecc checking and correction */ /* select PCR and disable ecc checking and correction */
......
...@@ -1127,7 +1127,7 @@ qla24xx_reset_risc(scsi_qla_host_t *vha) ...@@ -1127,7 +1127,7 @@ qla24xx_reset_risc(scsi_qla_host_t *vha)
unsigned long flags = 0; unsigned long flags = 0;
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
struct device_reg_24xx __iomem *reg = &ha->iobase->isp24; struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;
uint32_t cnt, d2; uint32_t cnt;
uint16_t wd; uint16_t wd;
static int abts_cnt; /* ISP abort retry counts */ static int abts_cnt; /* ISP abort retry counts */
int rval = QLA_SUCCESS; int rval = QLA_SUCCESS;
...@@ -1159,7 +1159,7 @@ qla24xx_reset_risc(scsi_qla_host_t *vha) ...@@ -1159,7 +1159,7 @@ qla24xx_reset_risc(scsi_qla_host_t *vha)
udelay(100); udelay(100);
/* Wait for firmware to complete NVRAM accesses. */ /* Wait for firmware to complete NVRAM accesses. */
d2 = (uint32_t) RD_REG_WORD(&reg->mailbox0); RD_REG_WORD(&reg->mailbox0);
for (cnt = 10000; RD_REG_WORD(&reg->mailbox0) != 0 && for (cnt = 10000; RD_REG_WORD(&reg->mailbox0) != 0 &&
rval == QLA_SUCCESS; cnt--) { rval == QLA_SUCCESS; cnt--) {
barrier(); barrier();
...@@ -1178,7 +1178,7 @@ qla24xx_reset_risc(scsi_qla_host_t *vha) ...@@ -1178,7 +1178,7 @@ qla24xx_reset_risc(scsi_qla_host_t *vha)
RD_REG_DWORD(&reg->mailbox0)); RD_REG_DWORD(&reg->mailbox0));
/* Wait for soft-reset to complete. */ /* Wait for soft-reset to complete. */
d2 = RD_REG_DWORD(&reg->ctrl_status); RD_REG_DWORD(&reg->ctrl_status);
for (cnt = 0; cnt < 6000000; cnt++) { for (cnt = 0; cnt < 6000000; cnt++) {
barrier(); barrier();
if ((RD_REG_DWORD(&reg->ctrl_status) & if ((RD_REG_DWORD(&reg->ctrl_status) &
...@@ -1221,7 +1221,7 @@ qla24xx_reset_risc(scsi_qla_host_t *vha) ...@@ -1221,7 +1221,7 @@ qla24xx_reset_risc(scsi_qla_host_t *vha)
WRT_REG_DWORD(&reg->hccr, HCCRX_CLR_RISC_RESET); WRT_REG_DWORD(&reg->hccr, HCCRX_CLR_RISC_RESET);
RD_REG_DWORD(&reg->hccr); RD_REG_DWORD(&reg->hccr);
d2 = (uint32_t) RD_REG_WORD(&reg->mailbox0); RD_REG_WORD(&reg->mailbox0);
for (cnt = 6000000; RD_REG_WORD(&reg->mailbox0) != 0 && for (cnt = 6000000; RD_REG_WORD(&reg->mailbox0) != 0 &&
rval == QLA_SUCCESS; cnt--) { rval == QLA_SUCCESS; cnt--) {
barrier(); barrier();
...@@ -3856,12 +3856,10 @@ qla2x00_fabric_dev_login(scsi_qla_host_t *vha, fc_port_t *fcport, ...@@ -3856,12 +3856,10 @@ qla2x00_fabric_dev_login(scsi_qla_host_t *vha, fc_port_t *fcport,
uint16_t *next_loopid) uint16_t *next_loopid)
{ {
int rval; int rval;
int retry;
uint8_t opts; uint8_t opts;
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
rval = QLA_SUCCESS; rval = QLA_SUCCESS;
retry = 0;
if (IS_ALOGIO_CAPABLE(ha)) { if (IS_ALOGIO_CAPABLE(ha)) {
if (fcport->flags & FCF_ASYNC_SENT) if (fcport->flags & FCF_ASYNC_SENT)
......
...@@ -310,7 +310,7 @@ void qla2x00_build_scsi_iocbs_64(srb_t *sp, cmd_entry_t *cmd_pkt, ...@@ -310,7 +310,7 @@ void qla2x00_build_scsi_iocbs_64(srb_t *sp, cmd_entry_t *cmd_pkt,
int int
qla2x00_start_scsi(srb_t *sp) qla2x00_start_scsi(srb_t *sp)
{ {
int ret, nseg; int nseg;
unsigned long flags; unsigned long flags;
scsi_qla_host_t *vha; scsi_qla_host_t *vha;
struct scsi_cmnd *cmd; struct scsi_cmnd *cmd;
...@@ -327,7 +327,6 @@ qla2x00_start_scsi(srb_t *sp) ...@@ -327,7 +327,6 @@ qla2x00_start_scsi(srb_t *sp)
struct rsp_que *rsp; struct rsp_que *rsp;
/* Setup device pointers. */ /* Setup device pointers. */
ret = 0;
vha = sp->fcport->vha; vha = sp->fcport->vha;
ha = vha->hw; ha = vha->hw;
reg = &ha->iobase->isp; reg = &ha->iobase->isp;
...@@ -710,7 +709,6 @@ qla24xx_build_scsi_iocbs(srb_t *sp, struct cmd_type_7 *cmd_pkt, ...@@ -710,7 +709,6 @@ qla24xx_build_scsi_iocbs(srb_t *sp, struct cmd_type_7 *cmd_pkt,
struct scsi_cmnd *cmd; struct scsi_cmnd *cmd;
struct scatterlist *sg; struct scatterlist *sg;
int i; int i;
struct req_que *req;
cmd = GET_CMD_SP(sp); cmd = GET_CMD_SP(sp);
...@@ -725,7 +723,6 @@ qla24xx_build_scsi_iocbs(srb_t *sp, struct cmd_type_7 *cmd_pkt, ...@@ -725,7 +723,6 @@ qla24xx_build_scsi_iocbs(srb_t *sp, struct cmd_type_7 *cmd_pkt,
} }
vha = sp->fcport->vha; vha = sp->fcport->vha;
req = vha->req;
/* Set transfer direction */ /* Set transfer direction */
if (cmd->sc_data_direction == DMA_TO_DEVICE) { if (cmd->sc_data_direction == DMA_TO_DEVICE) {
...@@ -933,11 +930,9 @@ qla24xx_walk_and_build_sglist_no_difb(struct qla_hw_data *ha, srb_t *sp, ...@@ -933,11 +930,9 @@ qla24xx_walk_and_build_sglist_no_difb(struct qla_hw_data *ha, srb_t *sp,
dma_addr_t sle_dma; dma_addr_t sle_dma;
uint32_t sle_dma_len, tot_prot_dma_len = 0; uint32_t sle_dma_len, tot_prot_dma_len = 0;
struct scsi_cmnd *cmd; struct scsi_cmnd *cmd;
struct scsi_qla_host *vha;
memset(&sgx, 0, sizeof(struct qla2_sgx)); memset(&sgx, 0, sizeof(struct qla2_sgx));
if (sp) { if (sp) {
vha = sp->fcport->vha;
cmd = GET_CMD_SP(sp); cmd = GET_CMD_SP(sp);
prot_int = cmd->device->sector_size; prot_int = cmd->device->sector_size;
...@@ -947,7 +942,6 @@ qla24xx_walk_and_build_sglist_no_difb(struct qla_hw_data *ha, srb_t *sp, ...@@ -947,7 +942,6 @@ qla24xx_walk_and_build_sglist_no_difb(struct qla_hw_data *ha, srb_t *sp,
sg_prot = scsi_prot_sglist(cmd); sg_prot = scsi_prot_sglist(cmd);
} else if (tc) { } else if (tc) {
vha = tc->vha;
prot_int = tc->blk_sz; prot_int = tc->blk_sz;
sgx.tot_bytes = tc->bufflen; sgx.tot_bytes = tc->bufflen;
sgx.cur_sg = tc->sg; sgx.cur_sg = tc->sg;
...@@ -1047,15 +1041,12 @@ qla24xx_walk_and_build_sglist(struct qla_hw_data *ha, srb_t *sp, uint32_t *dsd, ...@@ -1047,15 +1041,12 @@ qla24xx_walk_and_build_sglist(struct qla_hw_data *ha, srb_t *sp, uint32_t *dsd,
int i; int i;
uint16_t used_dsds = tot_dsds; uint16_t used_dsds = tot_dsds;
struct scsi_cmnd *cmd; struct scsi_cmnd *cmd;
struct scsi_qla_host *vha;
if (sp) { if (sp) {
cmd = GET_CMD_SP(sp); cmd = GET_CMD_SP(sp);
sgl = scsi_sglist(cmd); sgl = scsi_sglist(cmd);
vha = sp->fcport->vha;
} else if (tc) { } else if (tc) {
sgl = tc->sg; sgl = tc->sg;
vha = tc->vha;
} else { } else {
BUG(); BUG();
return 1; return 1;
...@@ -1231,7 +1222,6 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt, ...@@ -1231,7 +1222,6 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,
uint32_t *cur_dsd, *fcp_dl; uint32_t *cur_dsd, *fcp_dl;
scsi_qla_host_t *vha; scsi_qla_host_t *vha;
struct scsi_cmnd *cmd; struct scsi_cmnd *cmd;
int sgc;
uint32_t total_bytes = 0; uint32_t total_bytes = 0;
uint32_t data_bytes; uint32_t data_bytes;
uint32_t dif_bytes; uint32_t dif_bytes;
...@@ -1247,7 +1237,6 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt, ...@@ -1247,7 +1237,6 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,
cmd = GET_CMD_SP(sp); cmd = GET_CMD_SP(sp);
sgc = 0;
/* Update entry type to indicate Command Type CRC_2 IOCB */ /* Update entry type to indicate Command Type CRC_2 IOCB */
*((uint32_t *)(&cmd_pkt->entry_type)) = *((uint32_t *)(&cmd_pkt->entry_type)) =
__constant_cpu_to_le32(COMMAND_TYPE_CRC_2); __constant_cpu_to_le32(COMMAND_TYPE_CRC_2);
...@@ -1442,7 +1431,7 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt, ...@@ -1442,7 +1431,7 @@ qla24xx_build_scsi_crc_2_iocbs(srb_t *sp, struct cmd_type_crc_2 *cmd_pkt,
int int
qla24xx_start_scsi(srb_t *sp) qla24xx_start_scsi(srb_t *sp)
{ {
int ret, nseg; int nseg;
unsigned long flags; unsigned long flags;
uint32_t *clr_ptr; uint32_t *clr_ptr;
uint32_t index; uint32_t index;
...@@ -1458,8 +1447,6 @@ qla24xx_start_scsi(srb_t *sp) ...@@ -1458,8 +1447,6 @@ qla24xx_start_scsi(srb_t *sp)
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
/* Setup device pointers. */ /* Setup device pointers. */
ret = 0;
qla25xx_set_que(sp, &rsp); qla25xx_set_que(sp, &rsp);
req = vha->req; req = vha->req;
...@@ -2088,7 +2075,6 @@ qla2x00_ct_iocb(srb_t *sp, ms_iocb_entry_t *ct_iocb) ...@@ -2088,7 +2075,6 @@ qla2x00_ct_iocb(srb_t *sp, ms_iocb_entry_t *ct_iocb)
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
struct fc_bsg_job *bsg_job = sp->u.bsg_job; struct fc_bsg_job *bsg_job = sp->u.bsg_job;
int loop_iterartion = 0; int loop_iterartion = 0;
int cont_iocb_prsnt = 0;
int entry_count = 1; int entry_count = 1;
memset(ct_iocb, 0, sizeof(ms_iocb_entry_t)); memset(ct_iocb, 0, sizeof(ms_iocb_entry_t));
...@@ -2139,7 +2125,6 @@ qla2x00_ct_iocb(srb_t *sp, ms_iocb_entry_t *ct_iocb) ...@@ -2139,7 +2125,6 @@ qla2x00_ct_iocb(srb_t *sp, ms_iocb_entry_t *ct_iocb)
vha->hw->req_q_map[0]); vha->hw->req_q_map[0]);
cur_dsd = (uint32_t *) cont_pkt->dseg_0_address; cur_dsd = (uint32_t *) cont_pkt->dseg_0_address;
avail_dsds = 5; avail_dsds = 5;
cont_iocb_prsnt = 1;
entry_count++; entry_count++;
} }
...@@ -2167,7 +2152,6 @@ qla24xx_ct_iocb(srb_t *sp, struct ct_entry_24xx *ct_iocb) ...@@ -2167,7 +2152,6 @@ qla24xx_ct_iocb(srb_t *sp, struct ct_entry_24xx *ct_iocb)
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
struct fc_bsg_job *bsg_job = sp->u.bsg_job; struct fc_bsg_job *bsg_job = sp->u.bsg_job;
int loop_iterartion = 0; int loop_iterartion = 0;
int cont_iocb_prsnt = 0;
int entry_count = 1; int entry_count = 1;
ct_iocb->entry_type = CT_IOCB_TYPE; ct_iocb->entry_type = CT_IOCB_TYPE;
...@@ -2214,7 +2198,6 @@ qla24xx_ct_iocb(srb_t *sp, struct ct_entry_24xx *ct_iocb) ...@@ -2214,7 +2198,6 @@ qla24xx_ct_iocb(srb_t *sp, struct ct_entry_24xx *ct_iocb)
ha->req_q_map[0]); ha->req_q_map[0]);
cur_dsd = (uint32_t *) cont_pkt->dseg_0_address; cur_dsd = (uint32_t *) cont_pkt->dseg_0_address;
avail_dsds = 5; avail_dsds = 5;
cont_iocb_prsnt = 1;
entry_count++; entry_count++;
} }
...@@ -2237,7 +2220,7 @@ qla24xx_ct_iocb(srb_t *sp, struct ct_entry_24xx *ct_iocb) ...@@ -2237,7 +2220,7 @@ qla24xx_ct_iocb(srb_t *sp, struct ct_entry_24xx *ct_iocb)
int int
qla82xx_start_scsi(srb_t *sp) qla82xx_start_scsi(srb_t *sp)
{ {
int ret, nseg; int nseg;
unsigned long flags; unsigned long flags;
struct scsi_cmnd *cmd; struct scsi_cmnd *cmd;
uint32_t *clr_ptr; uint32_t *clr_ptr;
...@@ -2257,7 +2240,6 @@ qla82xx_start_scsi(srb_t *sp) ...@@ -2257,7 +2240,6 @@ qla82xx_start_scsi(srb_t *sp)
struct rsp_que *rsp = NULL; struct rsp_que *rsp = NULL;
/* Setup device pointers. */ /* Setup device pointers. */
ret = 0;
reg = &ha->iobase->isp82; reg = &ha->iobase->isp82;
cmd = GET_CMD_SP(sp); cmd = GET_CMD_SP(sp);
req = vha->req; req = vha->req;
......
...@@ -575,7 +575,7 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) ...@@ -575,7 +575,7 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
struct device_reg_24xx __iomem *reg24 = &ha->iobase->isp24; struct device_reg_24xx __iomem *reg24 = &ha->iobase->isp24;
struct device_reg_82xx __iomem *reg82 = &ha->iobase->isp82; struct device_reg_82xx __iomem *reg82 = &ha->iobase->isp82;
uint32_t rscn_entry, host_pid, tmp_pid; uint32_t rscn_entry, host_pid;
unsigned long flags; unsigned long flags;
fc_port_t *fcport = NULL; fc_port_t *fcport = NULL;
...@@ -998,7 +998,6 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) ...@@ -998,7 +998,6 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
list_for_each_entry(fcport, &vha->vp_fcports, list) { list_for_each_entry(fcport, &vha->vp_fcports, list) {
if (atomic_read(&fcport->state) != FCS_ONLINE) if (atomic_read(&fcport->state) != FCS_ONLINE)
continue; continue;
tmp_pid = fcport->d_id.b24;
if (fcport->d_id.b24 == rscn_entry) { if (fcport->d_id.b24 == rscn_entry) {
qla2x00_mark_device_lost(vha, fcport, 0, 0); qla2x00_mark_device_lost(vha, fcport, 0, 0);
break; break;
......
...@@ -1865,7 +1865,6 @@ qla24xx_login_fabric(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain, ...@@ -1865,7 +1865,6 @@ qla24xx_login_fabric(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain,
uint32_t iop[2]; uint32_t iop[2];
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
struct req_que *req; struct req_que *req;
struct rsp_que *rsp;
ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1061, ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1061,
"Entered %s.\n", __func__); "Entered %s.\n", __func__);
...@@ -1874,7 +1873,6 @@ qla24xx_login_fabric(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain, ...@@ -1874,7 +1873,6 @@ qla24xx_login_fabric(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain,
req = ha->req_q_map[0]; req = ha->req_q_map[0];
else else
req = vha->req; req = vha->req;
rsp = req->rsp;
lg = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &lg_dma); lg = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &lg_dma);
if (lg == NULL) { if (lg == NULL) {
...@@ -2142,7 +2140,6 @@ qla24xx_fabric_logout(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain, ...@@ -2142,7 +2140,6 @@ qla24xx_fabric_logout(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain,
dma_addr_t lg_dma; dma_addr_t lg_dma;
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
struct req_que *req; struct req_que *req;
struct rsp_que *rsp;
ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x106d, ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x106d,
"Entered %s.\n", __func__); "Entered %s.\n", __func__);
...@@ -2159,7 +2156,6 @@ qla24xx_fabric_logout(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain, ...@@ -2159,7 +2156,6 @@ qla24xx_fabric_logout(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain,
req = ha->req_q_map[0]; req = ha->req_q_map[0];
else else
req = vha->req; req = vha->req;
rsp = req->rsp;
lg->entry_type = LOGINOUT_PORT_IOCB_TYPE; lg->entry_type = LOGINOUT_PORT_IOCB_TYPE;
lg->entry_count = 1; lg->entry_count = 1;
lg->handle = MAKE_HANDLE(req->id, lg->handle); lg->handle = MAKE_HANDLE(req->id, lg->handle);
......
...@@ -371,7 +371,6 @@ qla2x00_do_dpc_vp(scsi_qla_host_t *vha) ...@@ -371,7 +371,6 @@ qla2x00_do_dpc_vp(scsi_qla_host_t *vha)
void void
qla2x00_do_dpc_all_vps(scsi_qla_host_t *vha) qla2x00_do_dpc_all_vps(scsi_qla_host_t *vha)
{ {
int ret;
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
scsi_qla_host_t *vp; scsi_qla_host_t *vp;
unsigned long flags = 0; unsigned long flags = 0;
...@@ -392,7 +391,7 @@ qla2x00_do_dpc_all_vps(scsi_qla_host_t *vha) ...@@ -392,7 +391,7 @@ qla2x00_do_dpc_all_vps(scsi_qla_host_t *vha)
atomic_inc(&vp->vref_count); atomic_inc(&vp->vref_count);
spin_unlock_irqrestore(&ha->vport_slock, flags); spin_unlock_irqrestore(&ha->vport_slock, flags);
ret = qla2x00_do_dpc_vp(vp); qla2x00_do_dpc_vp(vp);
spin_lock_irqsave(&ha->vport_slock, flags); spin_lock_irqsave(&ha->vport_slock, flags);
atomic_dec(&vp->vref_count); atomic_dec(&vp->vref_count);
......
...@@ -1317,10 +1317,10 @@ int ...@@ -1317,10 +1317,10 @@ int
qlafx00_configure_devices(scsi_qla_host_t *vha) qlafx00_configure_devices(scsi_qla_host_t *vha)
{ {
int rval; int rval;
unsigned long flags, save_flags; unsigned long flags;
rval = QLA_SUCCESS; rval = QLA_SUCCESS;
save_flags = flags = vha->dpc_flags; flags = vha->dpc_flags;
ql_dbg(ql_dbg_disc, vha, 0x2090, ql_dbg(ql_dbg_disc, vha, 0x2090,
"Configure devices -- dpc flags =0x%lx\n", flags); "Configure devices -- dpc flags =0x%lx\n", flags);
...@@ -2279,7 +2279,6 @@ qlafx00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt) ...@@ -2279,7 +2279,6 @@ qlafx00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
struct sts_entry_fx00 *sts; struct sts_entry_fx00 *sts;
__le16 comp_status; __le16 comp_status;
__le16 scsi_status; __le16 scsi_status;
uint16_t ox_id;
__le16 lscsi_status; __le16 lscsi_status;
int32_t resid; int32_t resid;
uint32_t sense_len, par_sense_len, rsp_info_len, resid_len, uint32_t sense_len, par_sense_len, rsp_info_len, resid_len,
...@@ -2344,7 +2343,6 @@ qlafx00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt) ...@@ -2344,7 +2343,6 @@ qlafx00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
fcport = sp->fcport; fcport = sp->fcport;
ox_id = 0;
sense_len = par_sense_len = rsp_info_len = resid_len = sense_len = par_sense_len = rsp_info_len = resid_len =
fw_resid_len = 0; fw_resid_len = 0;
if (scsi_status & cpu_to_le16((uint16_t)SS_SENSE_LEN_VALID)) if (scsi_status & cpu_to_le16((uint16_t)SS_SENSE_LEN_VALID))
...@@ -3071,7 +3069,7 @@ qlafx00_build_scsi_iocbs(srb_t *sp, struct cmd_type_7_fx00 *cmd_pkt, ...@@ -3071,7 +3069,7 @@ qlafx00_build_scsi_iocbs(srb_t *sp, struct cmd_type_7_fx00 *cmd_pkt,
int int
qlafx00_start_scsi(srb_t *sp) qlafx00_start_scsi(srb_t *sp)
{ {
int ret, nseg; int nseg;
unsigned long flags; unsigned long flags;
uint32_t index; uint32_t index;
uint32_t handle; uint32_t handle;
...@@ -3088,8 +3086,6 @@ qlafx00_start_scsi(srb_t *sp) ...@@ -3088,8 +3086,6 @@ qlafx00_start_scsi(srb_t *sp)
struct scsi_lun llun; struct scsi_lun llun;
/* Setup device pointers. */ /* Setup device pointers. */
ret = 0;
rsp = ha->rsp_q_map[0]; rsp = ha->rsp_q_map[0];
req = vha->req; req = vha->req;
......
...@@ -1740,8 +1740,8 @@ qla82xx_pci_config(scsi_qla_host_t *vha) ...@@ -1740,8 +1740,8 @@ qla82xx_pci_config(scsi_qla_host_t *vha)
ret = pci_set_mwi(ha->pdev); ret = pci_set_mwi(ha->pdev);
ha->chip_revision = ha->pdev->revision; ha->chip_revision = ha->pdev->revision;
ql_dbg(ql_dbg_init, vha, 0x0043, ql_dbg(ql_dbg_init, vha, 0x0043,
"Chip revision:%d.\n", "Chip revision:%d; pci_set_mwi() returned %d.\n",
ha->chip_revision); ha->chip_revision, ret);
return 0; return 0;
} }
...@@ -2671,7 +2671,7 @@ qla82xx_write_flash_data(struct scsi_qla_host *vha, uint32_t *dwptr, ...@@ -2671,7 +2671,7 @@ qla82xx_write_flash_data(struct scsi_qla_host *vha, uint32_t *dwptr,
{ {
int ret; int ret;
uint32_t liter; uint32_t liter;
uint32_t sec_mask, rest_addr; uint32_t rest_addr;
dma_addr_t optrom_dma; dma_addr_t optrom_dma;
void *optrom = NULL; void *optrom = NULL;
int page_mode = 0; int page_mode = 0;
...@@ -2693,7 +2693,6 @@ qla82xx_write_flash_data(struct scsi_qla_host *vha, uint32_t *dwptr, ...@@ -2693,7 +2693,6 @@ qla82xx_write_flash_data(struct scsi_qla_host *vha, uint32_t *dwptr,
} }
rest_addr = ha->fdt_block_size - 1; rest_addr = ha->fdt_block_size - 1;
sec_mask = ~rest_addr;
ret = qla82xx_unprotect_flash(ha); ret = qla82xx_unprotect_flash(ha);
if (ret) { if (ret) {
...@@ -2789,7 +2788,6 @@ qla82xx_start_iocbs(scsi_qla_host_t *vha) ...@@ -2789,7 +2788,6 @@ qla82xx_start_iocbs(scsi_qla_host_t *vha)
{ {
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
struct req_que *req = ha->req_q_map[0]; struct req_que *req = ha->req_q_map[0];
struct device_reg_82xx __iomem *reg;
uint32_t dbval; uint32_t dbval;
/* Adjust ring index. */ /* Adjust ring index. */
...@@ -2800,7 +2798,6 @@ qla82xx_start_iocbs(scsi_qla_host_t *vha) ...@@ -2800,7 +2798,6 @@ qla82xx_start_iocbs(scsi_qla_host_t *vha)
} else } else
req->ring_ptr++; req->ring_ptr++;
reg = &ha->iobase->isp82;
dbval = 0x04 | (ha->portnum << 5); dbval = 0x04 | (ha->portnum << 5);
dbval = dbval | (req->id << 8) | (req->ring_index << 16); dbval = dbval | (req->id << 8) | (req->ring_index << 16);
......
...@@ -462,12 +462,11 @@ qla8044_flash_lock(scsi_qla_host_t *vha) ...@@ -462,12 +462,11 @@ qla8044_flash_lock(scsi_qla_host_t *vha)
static void static void
qla8044_flash_unlock(scsi_qla_host_t *vha) qla8044_flash_unlock(scsi_qla_host_t *vha)
{ {
int ret_val;
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
/* Reading FLASH_UNLOCK register unlocks the Flash */ /* Reading FLASH_UNLOCK register unlocks the Flash */
qla8044_wr_reg(ha, QLA8044_FLASH_LOCK_ID, 0xFF); qla8044_wr_reg(ha, QLA8044_FLASH_LOCK_ID, 0xFF);
ret_val = qla8044_rd_reg(ha, QLA8044_FLASH_UNLOCK); qla8044_rd_reg(ha, QLA8044_FLASH_UNLOCK);
} }
...@@ -2992,7 +2991,7 @@ qla8044_minidump_process_rddfe(struct scsi_qla_host *vha, ...@@ -2992,7 +2991,7 @@ qla8044_minidump_process_rddfe(struct scsi_qla_host *vha,
uint32_t addr1, addr2, value, data, temp, wrVal; uint32_t addr1, addr2, value, data, temp, wrVal;
uint8_t stride, stride2; uint8_t stride, stride2;
uint16_t count; uint16_t count;
uint32_t poll, mask, data_size, modify_mask; uint32_t poll, mask, modify_mask;
uint32_t wait_count = 0; uint32_t wait_count = 0;
uint32_t *data_ptr = *d_ptr; uint32_t *data_ptr = *d_ptr;
...@@ -3009,7 +3008,6 @@ qla8044_minidump_process_rddfe(struct scsi_qla_host *vha, ...@@ -3009,7 +3008,6 @@ qla8044_minidump_process_rddfe(struct scsi_qla_host *vha,
poll = rddfe->poll; poll = rddfe->poll;
mask = rddfe->mask; mask = rddfe->mask;
modify_mask = rddfe->modify_mask; modify_mask = rddfe->modify_mask;
data_size = rddfe->data_size;
addr2 = addr1 + stride; addr2 = addr1 + stride;
...@@ -3091,7 +3089,7 @@ qla8044_minidump_process_rdmdio(struct scsi_qla_host *vha, ...@@ -3091,7 +3089,7 @@ qla8044_minidump_process_rdmdio(struct scsi_qla_host *vha,
uint8_t stride1, stride2; uint8_t stride1, stride2;
uint32_t addr3, addr4, addr5, addr6, addr7; uint32_t addr3, addr4, addr5, addr6, addr7;
uint16_t count, loop_cnt; uint16_t count, loop_cnt;
uint32_t poll, mask; uint32_t mask;
uint32_t *data_ptr = *d_ptr; uint32_t *data_ptr = *d_ptr;
struct qla8044_minidump_entry_rdmdio *rdmdio; struct qla8044_minidump_entry_rdmdio *rdmdio;
...@@ -3105,7 +3103,6 @@ qla8044_minidump_process_rdmdio(struct scsi_qla_host *vha, ...@@ -3105,7 +3103,6 @@ qla8044_minidump_process_rdmdio(struct scsi_qla_host *vha,
stride2 = rdmdio->stride_2; stride2 = rdmdio->stride_2;
count = rdmdio->count; count = rdmdio->count;
poll = rdmdio->poll;
mask = rdmdio->mask; mask = rdmdio->mask;
value2 = rdmdio->value_2; value2 = rdmdio->value_2;
...@@ -3164,7 +3161,7 @@ qla8044_minidump_process_rdmdio(struct scsi_qla_host *vha, ...@@ -3164,7 +3161,7 @@ qla8044_minidump_process_rdmdio(struct scsi_qla_host *vha,
static uint32_t qla8044_minidump_process_pollwr(struct scsi_qla_host *vha, static uint32_t qla8044_minidump_process_pollwr(struct scsi_qla_host *vha,
struct qla8044_minidump_entry_hdr *entry_hdr, uint32_t **d_ptr) struct qla8044_minidump_entry_hdr *entry_hdr, uint32_t **d_ptr)
{ {
uint32_t addr1, addr2, value1, value2, poll, mask, r_value; uint32_t addr1, addr2, value1, value2, poll, r_value;
uint32_t wait_count = 0; uint32_t wait_count = 0;
struct qla8044_minidump_entry_pollwr *pollwr_hdr; struct qla8044_minidump_entry_pollwr *pollwr_hdr;
...@@ -3175,7 +3172,6 @@ static uint32_t qla8044_minidump_process_pollwr(struct scsi_qla_host *vha, ...@@ -3175,7 +3172,6 @@ static uint32_t qla8044_minidump_process_pollwr(struct scsi_qla_host *vha,
value2 = pollwr_hdr->value_2; value2 = pollwr_hdr->value_2;
poll = pollwr_hdr->poll; poll = pollwr_hdr->poll;
mask = pollwr_hdr->mask;
while (wait_count < poll) { while (wait_count < poll) {
qla8044_rd_reg_indirect(vha, addr1, &r_value); qla8044_rd_reg_indirect(vha, addr1, &r_value);
......
...@@ -2973,7 +2973,6 @@ qla2x00_shutdown(struct pci_dev *pdev) ...@@ -2973,7 +2973,6 @@ qla2x00_shutdown(struct pci_dev *pdev)
static void static void
qla2x00_delete_all_vps(struct qla_hw_data *ha, scsi_qla_host_t *base_vha) qla2x00_delete_all_vps(struct qla_hw_data *ha, scsi_qla_host_t *base_vha)
{ {
struct Scsi_Host *scsi_host;
scsi_qla_host_t *vha; scsi_qla_host_t *vha;
unsigned long flags; unsigned long flags;
...@@ -2984,7 +2983,7 @@ qla2x00_delete_all_vps(struct qla_hw_data *ha, scsi_qla_host_t *base_vha) ...@@ -2984,7 +2983,7 @@ qla2x00_delete_all_vps(struct qla_hw_data *ha, scsi_qla_host_t *base_vha)
BUG_ON(base_vha->list.next == &ha->vp_list); BUG_ON(base_vha->list.next == &ha->vp_list);
/* This assumes first entry in ha->vp_list is always base vha */ /* This assumes first entry in ha->vp_list is always base vha */
vha = list_first_entry(&base_vha->list, scsi_qla_host_t, list); vha = list_first_entry(&base_vha->list, scsi_qla_host_t, list);
scsi_host = scsi_host_get(vha->host); scsi_host_get(vha->host);
spin_unlock_irqrestore(&ha->vport_slock, flags); spin_unlock_irqrestore(&ha->vport_slock, flags);
mutex_unlock(&ha->vport_lock); mutex_unlock(&ha->vport_lock);
...@@ -4793,7 +4792,6 @@ qla2x00_disable_board_on_pci_error(struct work_struct *work) ...@@ -4793,7 +4792,6 @@ qla2x00_disable_board_on_pci_error(struct work_struct *work)
static int static int
qla2x00_do_dpc(void *data) qla2x00_do_dpc(void *data)
{ {
int rval;
scsi_qla_host_t *base_vha; scsi_qla_host_t *base_vha;
struct qla_hw_data *ha; struct qla_hw_data *ha;
...@@ -5025,7 +5023,7 @@ qla2x00_do_dpc(void *data) ...@@ -5025,7 +5023,7 @@ qla2x00_do_dpc(void *data)
if (!(test_and_set_bit(LOOP_RESYNC_ACTIVE, if (!(test_and_set_bit(LOOP_RESYNC_ACTIVE,
&base_vha->dpc_flags))) { &base_vha->dpc_flags))) {
rval = qla2x00_loop_resync(base_vha); qla2x00_loop_resync(base_vha);
clear_bit(LOOP_RESYNC_ACTIVE, clear_bit(LOOP_RESYNC_ACTIVE,
&base_vha->dpc_flags); &base_vha->dpc_flags);
......
...@@ -2077,7 +2077,6 @@ static inline int ...@@ -2077,7 +2077,6 @@ static inline int
qlt_build_ctio_crc2_pkt(struct qla_tgt_prm *prm, scsi_qla_host_t *vha) qlt_build_ctio_crc2_pkt(struct qla_tgt_prm *prm, scsi_qla_host_t *vha)
{ {
uint32_t *cur_dsd; uint32_t *cur_dsd;
int sgc;
uint32_t transfer_length = 0; uint32_t transfer_length = 0;
uint32_t data_bytes; uint32_t data_bytes;
uint32_t dif_bytes; uint32_t dif_bytes;
...@@ -2094,7 +2093,6 @@ qlt_build_ctio_crc2_pkt(struct qla_tgt_prm *prm, scsi_qla_host_t *vha) ...@@ -2094,7 +2093,6 @@ qlt_build_ctio_crc2_pkt(struct qla_tgt_prm *prm, scsi_qla_host_t *vha)
struct atio_from_isp *atio = &prm->cmd->atio; struct atio_from_isp *atio = &prm->cmd->atio;
uint16_t t16; uint16_t t16;
sgc = 0;
ha = vha->hw; ha = vha->hw;
pkt = (struct ctio_crc2_to_fw *)vha->req->ring_ptr; pkt = (struct ctio_crc2_to_fw *)vha->req->ring_ptr;
...@@ -2563,7 +2561,7 @@ qlt_handle_dif_error(struct scsi_qla_host *vha, struct qla_tgt_cmd *cmd, ...@@ -2563,7 +2561,7 @@ qlt_handle_dif_error(struct scsi_qla_host *vha, struct qla_tgt_cmd *cmd,
/* Update protection tag */ /* Update protection tag */
if (cmd->prot_sg_cnt) { if (cmd->prot_sg_cnt) {
uint32_t i, j = 0, k = 0, num_ent; uint32_t i, k = 0, num_ent;
struct scatterlist *sg, *sgl; struct scatterlist *sg, *sgl;
...@@ -2576,7 +2574,6 @@ qlt_handle_dif_error(struct scsi_qla_host *vha, struct qla_tgt_cmd *cmd, ...@@ -2576,7 +2574,6 @@ qlt_handle_dif_error(struct scsi_qla_host *vha, struct qla_tgt_cmd *cmd,
k += num_ent; k += num_ent;
continue; continue;
} }
j = blocks_done - k - 1;
k = blocks_done; k = blocks_done;
break; break;
} }
...@@ -3063,7 +3060,6 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha, uint32_t handle, ...@@ -3063,7 +3060,6 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha, uint32_t handle,
{ {
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
struct se_cmd *se_cmd; struct se_cmd *se_cmd;
const struct target_core_fabric_ops *tfo;
struct qla_tgt_cmd *cmd; struct qla_tgt_cmd *cmd;
if (handle & CTIO_INTERMEDIATE_HANDLE_MARK) { if (handle & CTIO_INTERMEDIATE_HANDLE_MARK) {
...@@ -3081,7 +3077,6 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha, uint32_t handle, ...@@ -3081,7 +3077,6 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha, uint32_t handle,
return; return;
se_cmd = &cmd->se_cmd; se_cmd = &cmd->se_cmd;
tfo = se_cmd->se_tfo;
cmd->cmd_sent_to_fw = 0; cmd->cmd_sent_to_fw = 0;
qlt_unmap_sg(vha, cmd); qlt_unmap_sg(vha, cmd);
...@@ -3179,13 +3174,9 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha, uint32_t handle, ...@@ -3179,13 +3174,9 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha, uint32_t handle,
if (cmd->state == QLA_TGT_STATE_PROCESSED) { if (cmd->state == QLA_TGT_STATE_PROCESSED) {
; ;
} else if (cmd->state == QLA_TGT_STATE_NEED_DATA) { } else if (cmd->state == QLA_TGT_STATE_NEED_DATA) {
int rx_status = 0;
cmd->state = QLA_TGT_STATE_DATA_IN; cmd->state = QLA_TGT_STATE_DATA_IN;
if (unlikely(status != CTIO_SUCCESS)) if (status == CTIO_SUCCESS)
rx_status = -EIO;
else
cmd->write_data_transferred = 1; cmd->write_data_transferred = 1;
ha->tgt.tgt_ops->handle_data(cmd); ha->tgt.tgt_ops->handle_data(cmd);
...@@ -3580,12 +3571,11 @@ static int qlt_handle_task_mgmt(struct scsi_qla_host *vha, void *iocb) ...@@ -3580,12 +3571,11 @@ static int qlt_handle_task_mgmt(struct scsi_qla_host *vha, void *iocb)
struct qla_tgt *tgt; struct qla_tgt *tgt;
struct qla_tgt_sess *sess; struct qla_tgt_sess *sess;
uint32_t lun, unpacked_lun; uint32_t lun, unpacked_lun;
int lun_size, fn; int fn;
tgt = vha->vha_tgt.qla_tgt; tgt = vha->vha_tgt.qla_tgt;
lun = a->u.isp24.fcp_cmnd.lun; lun = a->u.isp24.fcp_cmnd.lun;
lun_size = sizeof(a->u.isp24.fcp_cmnd.lun);
fn = a->u.isp24.fcp_cmnd.task_mgmt_flags; fn = a->u.isp24.fcp_cmnd.task_mgmt_flags;
sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha, sess = ha->tgt.tgt_ops->find_sess_by_s_id(vha,
a->u.isp24.fcp_hdr.s_id); a->u.isp24.fcp_hdr.s_id);
...@@ -5044,7 +5034,7 @@ static void qlt_tmr_work(struct qla_tgt *tgt, ...@@ -5044,7 +5034,7 @@ static void qlt_tmr_work(struct qla_tgt *tgt,
uint8_t *s_id = NULL; /* to hide compiler warnings */ uint8_t *s_id = NULL; /* to hide compiler warnings */
int rc; int rc;
uint32_t lun, unpacked_lun; uint32_t lun, unpacked_lun;
int lun_size, fn; int fn;
void *iocb; void *iocb;
spin_lock_irqsave(&ha->hardware_lock, flags); spin_lock_irqsave(&ha->hardware_lock, flags);
...@@ -5071,7 +5061,6 @@ static void qlt_tmr_work(struct qla_tgt *tgt, ...@@ -5071,7 +5061,6 @@ static void qlt_tmr_work(struct qla_tgt *tgt,
iocb = a; iocb = a;
lun = a->u.isp24.fcp_cmnd.lun; lun = a->u.isp24.fcp_cmnd.lun;
lun_size = sizeof(lun);
fn = a->u.isp24.fcp_cmnd.task_mgmt_flags; fn = a->u.isp24.fcp_cmnd.task_mgmt_flags;
unpacked_lun = scsilun_to_int((struct scsi_lun *)&lun); unpacked_lun = scsilun_to_int((struct scsi_lun *)&lun);
......
...@@ -805,9 +805,8 @@ static void ...@@ -805,9 +805,8 @@ static void
qla27xx_driver_info(struct qla27xx_fwdt_template *tmp) qla27xx_driver_info(struct qla27xx_fwdt_template *tmp)
{ {
uint8_t v[] = { 0, 0, 0, 0, 0, 0 }; uint8_t v[] = { 0, 0, 0, 0, 0, 0 };
int rval = 0;
rval = sscanf(qla2x00_version_str, "%hhu.%hhu.%hhu.%hhu.%hhu.%hhu", sscanf(qla2x00_version_str, "%hhu.%hhu.%hhu.%hhu.%hhu.%hhu",
v+0, v+1, v+2, v+3, v+4, v+5); v+0, v+1, v+2, v+3, v+4, v+5);
tmp->driver_info[0] = v[3] << 24 | v[2] << 16 | v[1] << 8 | v[0]; tmp->driver_info[0] = v[3] << 24 | v[2] << 16 | v[1] << 8 | v[0];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册