diff options
Diffstat (limited to 'drivers/net/vmxnet3/vmxnet3_drv.c')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_drv.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 3b55fbd1294d..9d64186050f3 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
@@ -2302,9 +2302,13 @@ vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter) | |||
2302 | adapter->intr.mask_mode = (cfg >> 2) & 0x3; | 2302 | adapter->intr.mask_mode = (cfg >> 2) & 0x3; |
2303 | 2303 | ||
2304 | if (adapter->intr.type == VMXNET3_IT_AUTO) { | 2304 | if (adapter->intr.type == VMXNET3_IT_AUTO) { |
2305 | int err; | 2305 | adapter->intr.type = VMXNET3_IT_MSIX; |
2306 | } | ||
2306 | 2307 | ||
2307 | #ifdef CONFIG_PCI_MSI | 2308 | #ifdef CONFIG_PCI_MSI |
2309 | if (adapter->intr.type == VMXNET3_IT_MSIX) { | ||
2310 | int err; | ||
2311 | |||
2308 | adapter->intr.msix_entries[0].entry = 0; | 2312 | adapter->intr.msix_entries[0].entry = 0; |
2309 | err = pci_enable_msix(adapter->pdev, adapter->intr.msix_entries, | 2313 | err = pci_enable_msix(adapter->pdev, adapter->intr.msix_entries, |
2310 | VMXNET3_LINUX_MAX_MSIX_VECT); | 2314 | VMXNET3_LINUX_MAX_MSIX_VECT); |
@@ -2313,15 +2317,18 @@ vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter) | |||
2313 | adapter->intr.type = VMXNET3_IT_MSIX; | 2317 | adapter->intr.type = VMXNET3_IT_MSIX; |
2314 | return; | 2318 | return; |
2315 | } | 2319 | } |
2316 | #endif | 2320 | adapter->intr.type = VMXNET3_IT_MSI; |
2321 | } | ||
2317 | 2322 | ||
2323 | if (adapter->intr.type == VMXNET3_IT_MSI) { | ||
2324 | int err; | ||
2318 | err = pci_enable_msi(adapter->pdev); | 2325 | err = pci_enable_msi(adapter->pdev); |
2319 | if (!err) { | 2326 | if (!err) { |
2320 | adapter->intr.num_intrs = 1; | 2327 | adapter->intr.num_intrs = 1; |
2321 | adapter->intr.type = VMXNET3_IT_MSI; | ||
2322 | return; | 2328 | return; |
2323 | } | 2329 | } |
2324 | } | 2330 | } |
2331 | #endif /* CONFIG_PCI_MSI */ | ||
2325 | 2332 | ||
2326 | adapter->intr.type = VMXNET3_IT_INTX; | 2333 | adapter->intr.type = VMXNET3_IT_INTX; |
2327 | 2334 | ||