All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next-2.6 1/2] be2net: Adding an option to use INTx instead of MSI-X
@ 2010-10-25 11:12 Somnath Kotur
  2010-10-25 19:09 ` David Miller
  0 siblings, 1 reply; 14+ messages in thread
From: Somnath Kotur @ 2010-10-25 11:12 UTC (permalink / raw)
  To: netdev

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


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-11-03 15:28 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-25 11:12 [PATCH net-next-2.6 1/2] be2net: Adding an option to use INTx instead of MSI-X Somnath Kotur
2010-10-25 19:09 ` 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

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.