diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/be2iscsi/be_main.c | 15 | ||||
-rw-r--r-- | drivers/scsi/be2iscsi/be_main.h | 13 |
2 files changed, 21 insertions, 7 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 3328eb8e69f0..8a142cee8a56 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c | |||
@@ -3325,8 +3325,19 @@ static void find_num_cpus(struct beiscsi_hba *phba) | |||
3325 | 3325 | ||
3326 | num_cpus = num_online_cpus(); | 3326 | num_cpus = num_online_cpus(); |
3327 | 3327 | ||
3328 | phba->num_cpus = (num_cpus >= BEISCSI_MAX_NUM_CPU) ? | 3328 | switch (phba->generation) { |
3329 | (BEISCSI_MAX_NUM_CPU - 1) : num_cpus; | 3329 | case BE_GEN2: |
3330 | case BE_GEN3: | ||
3331 | phba->num_cpus = (num_cpus > BEISCSI_MAX_NUM_CPUS) ? | ||
3332 | BEISCSI_MAX_NUM_CPUS : num_cpus; | ||
3333 | break; | ||
3334 | case BE_GEN4: | ||
3335 | phba->num_cpus = (num_cpus > OC_SKH_MAX_NUM_CPUS) ? | ||
3336 | OC_SKH_MAX_NUM_CPUS : num_cpus; | ||
3337 | break; | ||
3338 | default: | ||
3339 | phba->num_cpus = 1; | ||
3340 | } | ||
3330 | } | 3341 | } |
3331 | 3342 | ||
3332 | static int hwi_init_port(struct beiscsi_hba *phba) | 3343 | static int hwi_init_port(struct beiscsi_hba *phba) |
diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h index 5302d3762f77..2e534f3b7bfe 100644 --- a/drivers/scsi/be2iscsi/be_main.h +++ b/drivers/scsi/be2iscsi/be_main.h | |||
@@ -64,8 +64,11 @@ | |||
64 | #define BE2_DEFPDU_HDR_SZ 64 | 64 | #define BE2_DEFPDU_HDR_SZ 64 |
65 | #define BE2_DEFPDU_DATA_SZ 8192 | 65 | #define BE2_DEFPDU_DATA_SZ 8192 |
66 | 66 | ||
67 | #define MAX_CPUS 31 | 67 | #define MAX_CPUS 64 |
68 | #define BEISCSI_MAX_NUM_CPU 8 | 68 | #define BEISCSI_MAX_NUM_CPUS 7 |
69 | #define OC_SKH_MAX_NUM_CPUS 63 | ||
70 | |||
71 | |||
69 | #define BEISCSI_SGLIST_ELEMENTS 30 | 72 | #define BEISCSI_SGLIST_ELEMENTS 30 |
70 | 73 | ||
71 | #define BEISCSI_CMD_PER_LUN 128 /* scsi_host->cmd_per_lun */ | 74 | #define BEISCSI_CMD_PER_LUN 128 /* scsi_host->cmd_per_lun */ |
@@ -279,8 +282,8 @@ struct beiscsi_hba { | |||
279 | unsigned short asic_revision; | 282 | unsigned short asic_revision; |
280 | unsigned int num_cpus; | 283 | unsigned int num_cpus; |
281 | unsigned int nxt_cqid; | 284 | unsigned int nxt_cqid; |
282 | struct msix_entry msix_entries[MAX_CPUS + 1]; | 285 | struct msix_entry msix_entries[MAX_CPUS]; |
283 | char *msi_name[MAX_CPUS + 1]; | 286 | char *msi_name[MAX_CPUS]; |
284 | bool msix_enabled; | 287 | bool msix_enabled; |
285 | struct be_mem_descriptor *init_mem; | 288 | struct be_mem_descriptor *init_mem; |
286 | 289 | ||
@@ -841,7 +844,7 @@ struct hwi_context_memory { | |||
841 | u16 max_eqd; /* in usecs */ | 844 | u16 max_eqd; /* in usecs */ |
842 | u16 cur_eqd; /* in usecs */ | 845 | u16 cur_eqd; /* in usecs */ |
843 | struct be_eq_obj be_eq[MAX_CPUS]; | 846 | struct be_eq_obj be_eq[MAX_CPUS]; |
844 | struct be_queue_info be_cq[MAX_CPUS]; | 847 | struct be_queue_info be_cq[MAX_CPUS - 1]; |
845 | 848 | ||
846 | struct be_queue_info be_def_hdrq; | 849 | struct be_queue_info be_def_hdrq; |
847 | struct be_queue_info be_def_dataq; | 850 | struct be_queue_info be_def_dataq; |