From: Somnath Kotur <somnath.kotur@emulex.com>
To: <netdev@vger.kernel.org>
Subject: [PATCH net-next-2.6 1/2] be2net: Adding an option to use INTx instead of MSI-X
Date: Mon, 25 Oct 2010 16:42:35 +0530 [thread overview]
Message-ID: <20101025111235.GA2024@emulex.com> (raw)
By default, be2net uses MSIx wherever possible.
Adding a module parameter to use INTx for users who do not want to use MSIx.
Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
---
drivers/net/benet/be_main.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 45b1f66..1262292 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -27,10 +27,13 @@ MODULE_LICENSE("GPL");
static unsigned int rx_frag_size = 2048;
static unsigned int num_vfs;
+static unsigned int msix = 1;
module_param(rx_frag_size, uint, S_IRUGO);
module_param(num_vfs, uint, S_IRUGO);
+module_param(msix, uint, S_IRUGO);
MODULE_PARM_DESC(rx_frag_size, "Size of a fragment that holds rcvd data.");
MODULE_PARM_DESC(num_vfs, "Number of PCI VFs to initialize");
+MODULE_PARM_DESC(msix, "Enable/Disable the MSIx (MSIx enabled by default)");
static bool multi_rxq = true;
module_param(multi_rxq, bool, S_IRUGO | S_IWUSR);
@@ -2856,7 +2859,8 @@ static int __devinit be_probe(struct pci_dev *pdev,
if (status)
goto stats_clean;
- be_msix_enable(adapter);
+ if (msix)
+ be_msix_enable(adapter);
INIT_DELAYED_WORK(&adapter->work, be_worker);
@@ -3082,6 +3086,12 @@ static int __init be_init_module(void)
num_vfs = 32;
}
+ if (!msix && num_vfs > 0) {
+ printk(KERN_WARNING DRV_NAME
+ " : MSIx required for num_vfs > 0. Ignoring msix=0\n");
+ msix = 1;
+ }
+
return pci_register_driver(&be_driver);
}
module_init(be_init_module);
--
1.5.6.1
next reply other threads:[~2010-10-25 11:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-25 11:12 Somnath Kotur [this message]
2010-10-25 19:09 ` [PATCH net-next-2.6 1/2] be2net: Adding an option to use INTx instead of MSI-X David Miller
2010-10-25 22:38 ` Ben Hutchings
2010-10-25 23:25 ` David Miller
2010-10-26 5:24 ` Somnath.Kotur
2010-10-26 6:52 ` Michael Ellerman
2010-10-26 13:32 ` Ben Hutchings
2010-10-26 23:20 ` Michael Ellerman
2010-10-27 15:46 ` David Miller
2010-10-28 5:37 ` Grant Grundler
2010-10-27 15:45 ` David Miller
2010-10-30 23:21 ` Matthew Wilcox
2010-11-03 12:45 ` Michael Ellerman
2010-11-03 15:28 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101025111235.GA2024@emulex.com \
--to=somnath.kotur@emulex.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.