diff options
Diffstat (limited to 'drivers/scsi/be2iscsi/be_mgmt.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_mgmt.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c index 317bcd042ced..72617b650a7e 100644 --- a/drivers/scsi/be2iscsi/be_mgmt.c +++ b/drivers/scsi/be2iscsi/be_mgmt.c | |||
@@ -145,14 +145,15 @@ unsigned char mgmt_epfw_cleanup(struct beiscsi_hba *phba, unsigned short chute) | |||
145 | } | 145 | } |
146 | 146 | ||
147 | unsigned char mgmt_invalidate_icds(struct beiscsi_hba *phba, | 147 | unsigned char mgmt_invalidate_icds(struct beiscsi_hba *phba, |
148 | unsigned int icd, unsigned int cid) | 148 | struct invalidate_command_table *inv_tbl, |
149 | unsigned int num_invalidate, unsigned int cid) | ||
149 | { | 150 | { |
150 | struct be_dma_mem nonemb_cmd; | 151 | struct be_dma_mem nonemb_cmd; |
151 | struct be_ctrl_info *ctrl = &phba->ctrl; | 152 | struct be_ctrl_info *ctrl = &phba->ctrl; |
152 | struct be_mcc_wrb *wrb; | 153 | struct be_mcc_wrb *wrb; |
153 | struct be_sge *sge; | 154 | struct be_sge *sge; |
154 | struct invalidate_commands_params_in *req; | 155 | struct invalidate_commands_params_in *req; |
155 | unsigned int tag = 0; | 156 | unsigned int i, tag = 0; |
156 | 157 | ||
157 | spin_lock(&ctrl->mbox_lock); | 158 | spin_lock(&ctrl->mbox_lock); |
158 | tag = alloc_mcc_tag(phba); | 159 | tag = alloc_mcc_tag(phba); |
@@ -183,9 +184,12 @@ unsigned char mgmt_invalidate_icds(struct beiscsi_hba *phba, | |||
183 | sizeof(*req)); | 184 | sizeof(*req)); |
184 | req->ref_handle = 0; | 185 | req->ref_handle = 0; |
185 | req->cleanup_type = CMD_ISCSI_COMMAND_INVALIDATE; | 186 | req->cleanup_type = CMD_ISCSI_COMMAND_INVALIDATE; |
186 | req->icd_count = 0; | 187 | for (i = 0; i < num_invalidate; i++) { |
187 | req->table[req->icd_count].icd = icd; | 188 | req->table[i].icd = inv_tbl->icd; |
188 | req->table[req->icd_count].cid = cid; | 189 | req->table[i].cid = inv_tbl->cid; |
190 | req->icd_count++; | ||
191 | inv_tbl++; | ||
192 | } | ||
189 | sge->pa_hi = cpu_to_le32(upper_32_bits(nonemb_cmd.dma)); | 193 | sge->pa_hi = cpu_to_le32(upper_32_bits(nonemb_cmd.dma)); |
190 | sge->pa_lo = cpu_to_le32(nonemb_cmd.dma & 0xFFFFFFFF); | 194 | sge->pa_lo = cpu_to_le32(nonemb_cmd.dma & 0xFFFFFFFF); |
191 | sge->len = cpu_to_le32(nonemb_cmd.size); | 195 | sge->len = cpu_to_le32(nonemb_cmd.size); |