mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-05 02:38:20 +00:00
[SCSI] be2iscsi: Fixing memory allocation for connection
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> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
parent
90a289e876
commit
ed58ea2ab5
@ -359,7 +359,7 @@ static void beiscsi_get_params(struct beiscsi_hba *phba)
|
|||||||
+ BE2_TMFS
|
+ BE2_TMFS
|
||||||
+ BE2_NOPOUT_REQ));
|
+ BE2_NOPOUT_REQ));
|
||||||
phba->params.cxns_per_ctrl = phba->fw_config.iscsi_cid_count;
|
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.icds_per_ctrl = phba->fw_config.iscsi_icd_count;;
|
||||||
phba->params.num_sge_per_io = BE2_SGE;
|
phba->params.num_sge_per_io = BE2_SGE;
|
||||||
phba->params.defpdu_hdr_sz = BE2_DEFPDU_HDR_SZ;
|
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) /
|
num_cxn_wrb = (mem_descr_wrb->mem_array[idx].size) /
|
||||||
((sizeof(struct iscsi_wrb) *
|
((sizeof(struct iscsi_wrb) *
|
||||||
phba->params.wrbs_per_cxn));
|
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];
|
pwrb_context = &phwi_ctrlr->wrb_context[index];
|
||||||
if (num_cxn_wrb) {
|
if (num_cxn_wrb) {
|
||||||
for (j = 0; j < phba->params.wrbs_per_cxn; j++) {
|
for (j = 0; j < phba->params.wrbs_per_cxn; j++) {
|
||||||
|
@ -498,8 +498,6 @@ struct hwi_async_entry {
|
|||||||
struct list_head data_busy_list;
|
struct list_head data_busy_list;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define BE_MIN_ASYNC_ENTRIES 128
|
|
||||||
|
|
||||||
struct hwi_async_pdu_context {
|
struct hwi_async_pdu_context {
|
||||||
struct {
|
struct {
|
||||||
struct be_bus_address pa_base;
|
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
|
* This is a varying size list! Do not add anything
|
||||||
* after this entry!!
|
* 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
|
#define PDUCQE_CODE_MASK 0x0000003F
|
||||||
|
Loading…
x
Reference in New Issue
Block a user