aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi/be_main.c
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohank@gmail.com>2013-09-28 18:35:54 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-10-25 04:58:09 -0400
commit68c26a3afc6693d08181c1757f943bd005d03c2f (patch)
treef9c1d2ac8ca5d643c1f222b7be89c17445639629 /drivers/scsi/be2iscsi/be_main.c
parentd3fea9af00fc69f60a792f5e0ea1e51fabd7c633 (diff)
[SCSI] be2iscsi: Fix MSIx creation for SKH-R adapter
The MSIx to be created for SKH-R adapter should be based on eq_count returned by get_fw_config. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> 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.c45
1 files changed, 29 insertions, 16 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index de948d36fb15..ddacd2c99079 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -3758,8 +3758,19 @@ static void find_num_cpus(struct beiscsi_hba *phba)
3758 BEISCSI_MAX_NUM_CPUS : num_cpus; 3758 BEISCSI_MAX_NUM_CPUS : num_cpus;
3759 break; 3759 break;
3760 case BE_GEN4: 3760 case BE_GEN4:
3761 phba->num_cpus = (num_cpus > OC_SKH_MAX_NUM_CPUS) ? 3761 /*
3762 OC_SKH_MAX_NUM_CPUS : num_cpus; 3762 * If eqid_count == 1 fall back to
3763 * INTX mechanism
3764 **/
3765 if (phba->fw_config.eqid_count == 1) {
3766 enable_msix = 0;
3767 phba->num_cpus = 1;
3768 return;
3769 }
3770
3771 phba->num_cpus =
3772 (num_cpus > (phba->fw_config.eqid_count - 1)) ?
3773 (phba->fw_config.eqid_count - 1) : num_cpus;
3763 break; 3774 break;
3764 default: 3775 default:
3765 phba->num_cpus = 1; 3776 phba->num_cpus = 1;
@@ -5275,20 +5286,6 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev,
5275 phba->generation = 0; 5286 phba->generation = 0;
5276 } 5287 }
5277 5288
5278 if (enable_msix)
5279 find_num_cpus(phba);
5280 else
5281 phba->num_cpus = 1;
5282
5283 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
5284 "BM_%d : num_cpus = %d\n",
5285 phba->num_cpus);
5286
5287 if (enable_msix) {
5288 beiscsi_msix_enable(phba);
5289 if (!phba->msix_enabled)
5290 phba->num_cpus = 1;
5291 }
5292 ret = be_ctrl_init(phba, pcidev); 5289 ret = be_ctrl_init(phba, pcidev);
5293 if (ret) { 5290 if (ret) {
5294 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT, 5291 beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
@@ -5320,6 +5317,22 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev,
5320 "BM_%d : Error getting fw config\n"); 5317 "BM_%d : Error getting fw config\n");
5321 goto free_port; 5318 goto free_port;
5322 } 5319 }
5320
5321 if (enable_msix)
5322 find_num_cpus(phba);
5323 else
5324 phba->num_cpus = 1;
5325
5326 beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
5327 "BM_%d : num_cpus = %d\n",
5328 phba->num_cpus);
5329
5330 if (enable_msix) {
5331 beiscsi_msix_enable(phba);
5332 if (!phba->msix_enabled)
5333 phba->num_cpus = 1;
5334 }
5335
5323 phba->shost->max_id = phba->params.cxns_per_ctrl; 5336 phba->shost->max_id = phba->params.cxns_per_ctrl;
5324 beiscsi_get_params(phba); 5337 beiscsi_get_params(phba);
5325 phba->shost->can_queue = phba->params.ios_per_ctrl; 5338 phba->shost->can_queue = phba->params.ios_per_ctrl;