* [PATCH 6/7] be2iscsi: Fixing memory allocation for connection V2
@ 2010-02-20 2:35 Jayamohan Kallickal
0 siblings, 0 replies; only message in thread
From: Jayamohan Kallickal @ 2010-02-20 2:35 UTC (permalink / raw)
To: linux-scsi; +Cc: James.Bottomley, michaelc
This patch fixes some situations where enough resources were not
avaialable when targets exceeded a certain limit
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
---
drivers/scsi/be2iscsi/be_main.c | 4 ++--
drivers/scsi/be2iscsi/be_main.h | 4 +---
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index b5dca45..5887d7a 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -359,7 +359,7 @@ static void beiscsi_get_params(struct beiscsi_hba *phba)
+ BE2_TMFS
+ BE2_NOPOUT_REQ));
phba->params.cxns_per_ctrl = phba->fw_config.iscsi_cid_count;
- phba->params.asyncpdus_per_ctrl = phba->fw_config.iscsi_cid_count;;
+ phba->params.asyncpdus_per_ctrl = phba->fw_config.iscsi_cid_count * 2;
phba->params.icds_per_ctrl = phba->fw_config.iscsi_icd_count;;
phba->params.num_sge_per_io = BE2_SGE;
phba->params.defpdu_hdr_sz = BE2_DEFPDU_HDR_SZ;
@@ -2169,7 +2169,7 @@ static void beiscsi_init_wrb_handle(struct beiscsi_hba *phba)
num_cxn_wrb = (mem_descr_wrb->mem_array[idx].size) /
((sizeof(struct iscsi_wrb) *
phba->params.wrbs_per_cxn));
- for (index = 0; index < phba->params.cxns_per_ctrl; index += 2) {
+ for (index = 0; index < phba->params.cxns_per_ctrl * 2; index += 2) {
pwrb_context = &phwi_ctrlr->wrb_context[index];
if (num_cxn_wrb) {
for (j = 0; j < phba->params.wrbs_per_cxn; j++) {
diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h
index d4d31dc..87ec212 100644
--- a/drivers/scsi/be2iscsi/be_main.h
+++ b/drivers/scsi/be2iscsi/be_main.h
@@ -498,8 +498,6 @@ struct hwi_async_entry {
struct list_head data_busy_list;
};
-#define BE_MIN_ASYNC_ENTRIES 128
-
struct hwi_async_pdu_context {
struct {
struct be_bus_address pa_base;
@@ -540,7 +538,7 @@ struct hwi_async_pdu_context {
* This is a varying size list! Do not add anything
* after this entry!!
*/
- struct hwi_async_entry async_entry[BE_MIN_ASYNC_ENTRIES];
+ struct hwi_async_entry async_entry[BE2_MAX_SESSIONS * 2];
};
#define PDUCQE_CODE_MASK 0x0000003F
--
1.6.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-20 2:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-20 2:35 [PATCH 6/7] be2iscsi: Fixing memory allocation for connection V2 Jayamohan Kallickal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox