diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-02-06 04:29:23 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-06 04:29:23 -0500 |
commit | ddb213f0768dc8b10cab37a21b85b567f1966d4a (patch) | |
tree | 3c129633c49fb88dc2637591796a5c6aa468cd4b /drivers/net/forcedeth.c | |
parent | ff491a7334acfd74e515c896632e37e401f52676 (diff) |
forcedeth: make msi-x different name for rx-tx
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/forcedeth.c')
-rw-r--r-- | drivers/net/forcedeth.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 875509d7d86b..3a733a58456a 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -812,6 +812,11 @@ struct fe_priv { | |||
812 | 812 | ||
813 | /* power saved state */ | 813 | /* power saved state */ |
814 | u32 saved_config_space[NV_PCI_REGSZ_MAX/4]; | 814 | u32 saved_config_space[NV_PCI_REGSZ_MAX/4]; |
815 | |||
816 | /* for different msi-x irq type */ | ||
817 | char name_rx[IFNAMSIZ + 3]; /* -rx */ | ||
818 | char name_tx[IFNAMSIZ + 3]; /* -tx */ | ||
819 | char name_other[IFNAMSIZ + 6]; /* -other */ | ||
815 | }; | 820 | }; |
816 | 821 | ||
817 | /* | 822 | /* |
@@ -3918,21 +3923,27 @@ static int nv_request_irq(struct net_device *dev, int intr_test) | |||
3918 | np->msi_flags |= NV_MSI_X_ENABLED; | 3923 | np->msi_flags |= NV_MSI_X_ENABLED; |
3919 | if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT && !intr_test) { | 3924 | if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT && !intr_test) { |
3920 | /* Request irq for rx handling */ | 3925 | /* Request irq for rx handling */ |
3921 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, &nv_nic_irq_rx, IRQF_SHARED, dev->name, dev) != 0) { | 3926 | sprintf(np->name_rx, "%s-rx", dev->name); |
3927 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, | ||
3928 | &nv_nic_irq_rx, IRQF_SHARED, np->name_rx, dev) != 0) { | ||
3922 | printk(KERN_INFO "forcedeth: request_irq failed for rx %d\n", ret); | 3929 | printk(KERN_INFO "forcedeth: request_irq failed for rx %d\n", ret); |
3923 | pci_disable_msix(np->pci_dev); | 3930 | pci_disable_msix(np->pci_dev); |
3924 | np->msi_flags &= ~NV_MSI_X_ENABLED; | 3931 | np->msi_flags &= ~NV_MSI_X_ENABLED; |
3925 | goto out_err; | 3932 | goto out_err; |
3926 | } | 3933 | } |
3927 | /* Request irq for tx handling */ | 3934 | /* Request irq for tx handling */ |
3928 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, &nv_nic_irq_tx, IRQF_SHARED, dev->name, dev) != 0) { | 3935 | sprintf(np->name_tx, "%s-tx", dev->name); |
3936 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, | ||
3937 | &nv_nic_irq_tx, IRQF_SHARED, np->name_tx, dev) != 0) { | ||
3929 | printk(KERN_INFO "forcedeth: request_irq failed for tx %d\n", ret); | 3938 | printk(KERN_INFO "forcedeth: request_irq failed for tx %d\n", ret); |
3930 | pci_disable_msix(np->pci_dev); | 3939 | pci_disable_msix(np->pci_dev); |
3931 | np->msi_flags &= ~NV_MSI_X_ENABLED; | 3940 | np->msi_flags &= ~NV_MSI_X_ENABLED; |
3932 | goto out_free_rx; | 3941 | goto out_free_rx; |
3933 | } | 3942 | } |
3934 | /* Request irq for link and timer handling */ | 3943 | /* Request irq for link and timer handling */ |
3935 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector, &nv_nic_irq_other, IRQF_SHARED, dev->name, dev) != 0) { | 3944 | sprintf(np->name_other, "%s-other", dev->name); |
3945 | if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector, | ||
3946 | &nv_nic_irq_other, IRQF_SHARED, np->name_other, dev) != 0) { | ||
3936 | printk(KERN_INFO "forcedeth: request_irq failed for link %d\n", ret); | 3947 | printk(KERN_INFO "forcedeth: request_irq failed for link %d\n", ret); |
3937 | pci_disable_msix(np->pci_dev); | 3948 | pci_disable_msix(np->pci_dev); |
3938 | np->msi_flags &= ~NV_MSI_X_ENABLED; | 3949 | np->msi_flags &= ~NV_MSI_X_ENABLED; |