aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/forcedeth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/forcedeth.c')
-rw-r--r--drivers/net/forcedeth.c72
1 files changed, 0 insertions, 72 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index f7235c9bc421..705e1229d89d 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -2891,78 +2891,6 @@ static int nv_open(struct net_device *dev)
2891 goto out_drain; 2891 goto out_drain;
2892 } 2892 }
2893 2893
2894 if (np->msi_flags & NV_MSI_X_CAPABLE) {
2895 for (i = 0; i < (np->msi_flags & NV_MSI_X_VECTORS_MASK); i++) {
2896 np->msi_x_entry[i].entry = i;
2897 }
2898 if ((ret = pci_enable_msix(np->pci_dev, np->msi_x_entry, (np->msi_flags & NV_MSI_X_VECTORS_MASK))) == 0) {
2899 np->msi_flags |= NV_MSI_X_ENABLED;
2900 if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT) {
2901 /* Request irq for rx handling */
2902 if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, &nv_nic_irq_rx, SA_SHIRQ, dev->name, dev) != 0) {
2903 printk(KERN_INFO "forcedeth: request_irq failed for rx %d\n", ret);
2904 pci_disable_msix(np->pci_dev);
2905 np->msi_flags &= ~NV_MSI_X_ENABLED;
2906 goto out_drain;
2907 }
2908 /* Request irq for tx handling */
2909 if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, &nv_nic_irq_tx, SA_SHIRQ, dev->name, dev) != 0) {
2910 printk(KERN_INFO "forcedeth: request_irq failed for tx %d\n", ret);
2911 pci_disable_msix(np->pci_dev);
2912 np->msi_flags &= ~NV_MSI_X_ENABLED;
2913 goto out_drain;
2914 }
2915 /* Request irq for link and timer handling */
2916 if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector, &nv_nic_irq_other, SA_SHIRQ, dev->name, dev) != 0) {
2917 printk(KERN_INFO "forcedeth: request_irq failed for link %d\n", ret);
2918 pci_disable_msix(np->pci_dev);
2919 np->msi_flags &= ~NV_MSI_X_ENABLED;
2920 goto out_drain;
2921 }
2922
2923 /* map interrupts to their respective vector */
2924 writel(0, base + NvRegMSIXMap0);
2925 writel(0, base + NvRegMSIXMap1);
2926 set_msix_vector_map(dev, NV_MSI_X_VECTOR_RX, NVREG_IRQ_RX_ALL);
2927 set_msix_vector_map(dev, NV_MSI_X_VECTOR_TX, NVREG_IRQ_TX_ALL);
2928 set_msix_vector_map(dev, NV_MSI_X_VECTOR_OTHER, NVREG_IRQ_OTHER);
2929 } else {
2930 /* Request irq for all interrupts */
2931 if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0) {
2932 printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret);
2933 pci_disable_msix(np->pci_dev);
2934 np->msi_flags &= ~NV_MSI_X_ENABLED;
2935 goto out_drain;
2936 }
2937
2938 /* map interrupts to vector 0 */
2939 writel(0, base + NvRegMSIXMap0);
2940 writel(0, base + NvRegMSIXMap1);
2941 }
2942 }
2943 }
2944 if (ret != 0 && np->msi_flags & NV_MSI_CAPABLE) {
2945 if ((ret = pci_enable_msi(np->pci_dev)) == 0) {
2946 np->msi_flags |= NV_MSI_ENABLED;
2947 if (request_irq(np->pci_dev->irq, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0) {
2948 printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret);
2949 pci_disable_msi(np->pci_dev);
2950 np->msi_flags &= ~NV_MSI_ENABLED;
2951 goto out_drain;
2952 }
2953
2954 /* map interrupts to vector 0 */
2955 writel(0, base + NvRegMSIMap0);
2956 writel(0, base + NvRegMSIMap1);
2957 /* enable msi vector 0 */
2958 writel(NVREG_MSI_VECTOR_0_ENABLED, base + NvRegMSIIrqMask);
2959 }
2960 }
2961 if (ret != 0) {
2962 if (request_irq(np->pci_dev->irq, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0)
2963 goto out_drain;
2964 }
2965
2966 /* ask for interrupts */ 2894 /* ask for interrupts */
2967 nv_enable_hw_interrupts(dev, np->irqmask); 2895 nv_enable_hw_interrupts(dev, np->irqmask);
2968 2896