aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi/be_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/be2iscsi/be_main.c')
-rw-r--r--drivers/scsi/be2iscsi/be_main.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 932cb8ab8db6..687d535894a9 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -2042,10 +2042,9 @@ static void beiscsi_init_wrb_handle(struct beiscsi_hba *phba)
2042 } 2042 }
2043 idx = 0; 2043 idx = 0;
2044 pwrb = mem_descr_wrb->mem_array[idx].virtual_address; 2044 pwrb = mem_descr_wrb->mem_array[idx].virtual_address;
2045 num_cxn_wrb = 2045 num_cxn_wrb = (mem_descr_wrb->mem_array[idx].size) /
2046 ((mem_descr_wrb->mem_array[idx].size) / (sizeof(struct iscsi_wrb)) * 2046 ((sizeof(struct iscsi_wrb) *
2047 phba->params.wrbs_per_cxn); 2047 phba->params.wrbs_per_cxn));
2048
2049 for (index = 0; index < phba->params.cxns_per_ctrl; index += 2) { 2048 for (index = 0; index < phba->params.cxns_per_ctrl; index += 2) {
2050 pwrb_context = &phwi_ctrlr->wrb_context[index]; 2049 pwrb_context = &phwi_ctrlr->wrb_context[index];
2051 if (num_cxn_wrb) { 2050 if (num_cxn_wrb) {
@@ -2058,9 +2057,9 @@ static void beiscsi_init_wrb_handle(struct beiscsi_hba *phba)
2058 } else { 2057 } else {
2059 idx++; 2058 idx++;
2060 pwrb = mem_descr_wrb->mem_array[idx].virtual_address; 2059 pwrb = mem_descr_wrb->mem_array[idx].virtual_address;
2061 num_cxn_wrb = ((mem_descr_wrb->mem_array[idx].size) / 2060 num_cxn_wrb = (mem_descr_wrb->mem_array[idx].size) /
2062 (sizeof(struct iscsi_wrb)) * 2061 ((sizeof(struct iscsi_wrb) *
2063 phba->params.wrbs_per_cxn); 2062 phba->params.wrbs_per_cxn));
2064 for (j = 0; j < phba->params.wrbs_per_cxn; j++) { 2063 for (j = 0; j < phba->params.wrbs_per_cxn; j++) {
2065 pwrb_handle = pwrb_context->pwrb_handle_base[j]; 2064 pwrb_handle = pwrb_context->pwrb_handle_base[j];
2066 pwrb_handle->pwrb = pwrb; 2065 pwrb_handle->pwrb = pwrb;