Message ID | 20171011203650.23629-2-himanshu.madhani@cavium.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
On Wed, Oct 11, 2017 at 01:36:46PM -0700, Madhani, Himanshu wrote: [...] > +int ql2xenablemsix = 1; > +module_param(ql2xenablemsix, int, 0444); > +MODULE_PARM_DESC(ql2xenablemsix, > + "Set to enable MSI or MSI-X interrupt mechanism.\n" > + " Default is 1, enable MSI-X interrupt mechanism.\n" > + " 0 -- enable traditional pin-based mechanism.\n" > + " 1 -- enable MSI-X interrupt mechanism.\n" > + " 2 -- enable MSI interrupt mechanism.\n"); Maybe qla2xirqmode is a more appropriate name?
Hi Johannes, > On Oct 12, 2017, at 12:19 AM, Johannes Thumshirn <jthumshirn@suse.de> wrote: > > On Wed, Oct 11, 2017 at 01:36:46PM -0700, Madhani, Himanshu wrote: > [...] >> +int ql2xenablemsix = 1; >> +module_param(ql2xenablemsix, int, 0444); >> +MODULE_PARM_DESC(ql2xenablemsix, >> + "Set to enable MSI or MSI-X interrupt mechanism.\n" >> + " Default is 1, enable MSI-X interrupt mechanism.\n" >> + " 0 -- enable traditional pin-based mechanism.\n" >> + " 1 -- enable MSI-X interrupt mechanism.\n" >> + " 2 -- enable MSI interrupt mechanism.\n"); > > Maybe qla2xirqmode is a more appropriate name? > Sorry this one slipped out of my sight. The reason I used "ql2xenablemsix" was because driver already had this parameter in code until few versions back where we removed it. Since existing user are familiar with this module parameter name, it would be easy to keep that same. Let me know if you are okay with the name or prefer new name instead? > -- > Johannes Thumshirn Storage > jthumshirn@suse.de +49 911 74053 689 > SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg > GF: Felix Imendörffer, Jane Smithard, Graham Norton > HRB 21284 (AG Nürnberg) > Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850 Thanks, - Himanshu
On Fri, Oct 13, 2017 at 06:52:31PM +0000, Madhani, Himanshu wrote: > Sorry this one slipped out of my sight. The reason I used "ql2xenablemsix" was because driver already > had this parameter in code until few versions back where we removed it. Since existing user are familiar > with this module parameter name, it would be easy to keep that same. > > Let me know if you are okay with the name or prefer new name instead? Heh I knew I had seen this parameter before, just couldn't find it anymore and thought I must have been dreaming. If it's only for reconstructing a previous stsate, it wouldn't make much sense to rename it then. Thanks, Johannes
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index f852ca60c49f..46c7822c20fc 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h @@ -145,6 +145,7 @@ extern int ql2xmvasynctoatio; extern int ql2xuctrlirq; extern int ql2xnvmeenable; extern int ql2xautodetectsfp; +extern int ql2xenablemsix; extern int qla2x00_loop_reset(scsi_qla_host_t *); extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int); diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 9d9668aac6f6..ef7afd5eefe3 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -3486,11 +3486,14 @@ qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp) scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev); /* If possible, enable MSI-X. */ - if (!IS_QLA2432(ha) && !IS_QLA2532(ha) && !IS_QLA8432(ha) && - !IS_CNA_CAPABLE(ha) && !IS_QLA2031(ha) && !IS_QLAFX00(ha) && - !IS_QLA27XX(ha)) + if (ql2xenablemsix == 0 || (!IS_QLA2432(ha) && !IS_QLA2532(ha) && + !IS_QLA8432(ha) && !IS_CNA_CAPABLE(ha) && !IS_QLA2031(ha) && + !IS_QLAFX00(ha) && !IS_QLA27XX(ha))) goto skip_msi; + if (ql2xenablemsix == 2) + goto skip_msix; + if (ha->pdev->subsystem_vendor == PCI_VENDOR_ID_HP && (ha->pdev->subsystem_device == 0x7040 || ha->pdev->subsystem_device == 0x7041 || diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 5b2437a5ea44..e69329cb3608 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -268,6 +268,15 @@ MODULE_PARM_DESC(ql2xautodetectsfp, "Detect SFP range and set appropriate distance.\n" "1 (Default): Enable\n"); +int ql2xenablemsix = 1; +module_param(ql2xenablemsix, int, 0444); +MODULE_PARM_DESC(ql2xenablemsix, + "Set to enable MSI or MSI-X interrupt mechanism.\n" + " Default is 1, enable MSI-X interrupt mechanism.\n" + " 0 -- enable traditional pin-based mechanism.\n" + " 1 -- enable MSI-X interrupt mechanism.\n" + " 2 -- enable MSI interrupt mechanism.\n"); + /* * SCSI host template entry points */