diff options
author | Shreyas Bhatewara <sbhatewara@vmware.com> | 2010-07-15 11:21:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-19 16:15:50 -0400 |
commit | 0bdc0d70c535d59c10add461b96340425f0aac7d (patch) | |
tree | 1c01f339ace155cf9cdd118a499212a6fb15830c /drivers | |
parent | d9a5f210c5ef338295cf1c29d98825722351bed7 (diff) |
net-next: vmxnet3 fixes [5/5] Respect the interrupt type in VM configuration
Respect the interrupt type set in VM configuration.
When interrupt type is not auto, do not ignore the interrupt type set from
VM configuration.
Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_drv.c | 13 | ||||
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_int.h | 4 |
2 files changed, 12 insertions, 5 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 | ||
diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h index 34f392f46fb1..762a6a7763fe 100644 --- a/drivers/net/vmxnet3/vmxnet3_int.h +++ b/drivers/net/vmxnet3/vmxnet3_int.h | |||
@@ -68,10 +68,10 @@ | |||
68 | /* | 68 | /* |
69 | * Version numbers | 69 | * Version numbers |
70 | */ | 70 | */ |
71 | #define VMXNET3_DRIVER_VERSION_STRING "1.0.5.0-k" | 71 | #define VMXNET3_DRIVER_VERSION_STRING "1.0.13.0-k" |
72 | 72 | ||
73 | /* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */ | 73 | /* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */ |
74 | #define VMXNET3_DRIVER_VERSION_NUM 0x01000500 | 74 | #define VMXNET3_DRIVER_VERSION_NUM 0x01000B00 |
75 | 75 | ||
76 | 76 | ||
77 | /* | 77 | /* |