diff options
author | John Soni Jose <sony.john-n@emulex.com> | 2012-10-20 04:43:32 +0530 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-11-27 08:59:37 +0400 |
commit | 22abeef0fa251ec0c93e377da66800ebd881fdc7 (patch) | |
tree | 7252522aabd80e6787b0278a0dc8122e6117b79a /drivers/scsi/be2iscsi/be_main.c | |
parent | 139a1b1e777144aa745f10741e2fe09b93e63c38 (diff) | |
download | linux-22abeef0fa251ec0c93e377da66800ebd881fdc7.tar.bz2 |
[SCSI] be2iscsi: Fix max EQ supported by the driver.
Fix the max EQ created when driver is loaded. Max EQ for
for new adapters will be 64.
Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_main.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_main.c | 15 |
1 files changed, 13 insertions, 2 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) num_cpus = num_online_cpus(); - phba->num_cpus = (num_cpus >= BEISCSI_MAX_NUM_CPU) ? - (BEISCSI_MAX_NUM_CPU - 1) : num_cpus; + switch (phba->generation) { + case BE_GEN2: + case BE_GEN3: + phba->num_cpus = (num_cpus > BEISCSI_MAX_NUM_CPUS) ? + BEISCSI_MAX_NUM_CPUS : num_cpus; + break; + case BE_GEN4: + phba->num_cpus = (num_cpus > OC_SKH_MAX_NUM_CPUS) ? + OC_SKH_MAX_NUM_CPUS : num_cpus; + break; + default: + phba->num_cpus = 1; + } } static int hwi_init_port(struct beiscsi_hba *phba) |