netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] forcedeth: make msi-x different name for rx-tx
@ 2009-02-06  4:59 Yinghai Lu
  2009-02-06  5:00 ` [PATCH] forcedeth: don't clear nic_poll_irq too early Yinghai Lu
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Yinghai Lu @ 2009-02-06  4:59 UTC (permalink / raw)
  To: Jeff Garzik, Ingo Molnar, Andrew Morton, Ayaz Abdulla,
	David S. Miller
  Cc: linux-kernel@vger.kernel.org, NetDev


Impact: make /proc/interrupts could show more info which irq is rx or other for msi-x

add three name fields for rx, tx, other

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 drivers/net/forcedeth.c |   17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

Index: linux-2.6/drivers/net/forcedeth.c
===================================================================
--- linux-2.6.orig/drivers/net/forcedeth.c
+++ linux-2.6/drivers/net/forcedeth.c
@@ -812,6 +812,11 @@ struct fe_priv {
 
 	/* power saved state */
 	u32 saved_config_space[NV_PCI_REGSZ_MAX/4];
+
+	/* for different msi-x irq type */
+	char name_rx[IFNAMSIZ + 3];       /* -rx    */
+	char name_tx[IFNAMSIZ + 3];       /* -tx    */
+	char name_other[IFNAMSIZ + 6];    /* -other */
 };
 
 /*
@@ -3918,21 +3923,27 @@ static int nv_request_irq(struct net_dev
 			np->msi_flags |= NV_MSI_X_ENABLED;
 			if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT && !intr_test) {
 				/* Request irq for rx handling */
-				if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, &nv_nic_irq_rx, IRQF_SHARED, dev->name, dev) != 0) {
+				sprintf(np->name_rx, "%s-rx", dev->name);
+				if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector,
+						&nv_nic_irq_rx, IRQF_SHARED, np->name_rx, dev) != 0) {
 					printk(KERN_INFO "forcedeth: request_irq failed for rx %d\n", ret);
 					pci_disable_msix(np->pci_dev);
 					np->msi_flags &= ~NV_MSI_X_ENABLED;
 					goto out_err;
 				}
 				/* Request irq for tx handling */
-				if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, &nv_nic_irq_tx, IRQF_SHARED, dev->name, dev) != 0) {
+				sprintf(np->name_tx, "%s-tx", dev->name);
+				if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector,
+						&nv_nic_irq_tx, IRQF_SHARED, np->name_tx, dev) != 0) {
 					printk(KERN_INFO "forcedeth: request_irq failed for tx %d\n", ret);
 					pci_disable_msix(np->pci_dev);
 					np->msi_flags &= ~NV_MSI_X_ENABLED;
 					goto out_free_rx;
 				}
 				/* Request irq for link and timer handling */
-				if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector, &nv_nic_irq_other, IRQF_SHARED, dev->name, dev) != 0) {
+				sprintf(np->name_other, "%s-other", dev->name);
+				if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector,
+						&nv_nic_irq_other, IRQF_SHARED, np->name_other, dev) != 0) {
 					printk(KERN_INFO "forcedeth: request_irq failed for link %d\n", ret);
 					pci_disable_msix(np->pci_dev);
 					np->msi_flags &= ~NV_MSI_X_ENABLED;

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

end of thread, other threads:[~2009-02-09 19:15 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-06  4:59 [PATCH] forcedeth: make msi-x different name for rx-tx Yinghai Lu
2009-02-06  5:00 ` [PATCH] forcedeth: don't clear nic_poll_irq too early Yinghai Lu
2009-02-06  9:31   ` David Miller
2009-02-06  5:01 ` [PATCH] forcedeth: disable irq at first before schedule rx Yinghai Lu
2009-02-06  9:32   ` David Miller
2009-02-06  5:01 ` [PATCH] forcedeth: ck804 and mcp55 doesn't need timerirq Yinghai Lu
2009-02-06  9:32   ` David Miller
2009-02-06  5:02 ` [PATCH] forcedeth: enable msix to default Yinghai Lu
2009-02-06  9:32   ` David Miller
2009-02-06  9:31 ` [PATCH] forcedeth: make msi-x different name for rx-tx David Miller
2009-02-06 14:49 ` Ingo Molnar
2009-02-06 16:57   ` Yinghai Lu
2009-02-06 17:15     ` Ingo Molnar
2009-02-06 17:54       ` Yinghai Lu
2009-02-09 12:00         ` Ingo Molnar
2009-02-09 19:13           ` Yinghai Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).