Commit 0bdc0d70 authored by Shreyas Bhatewara's avatar Shreyas Bhatewara Committed by David S. Miller

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: default avatarShreyas Bhatewara <sbhatewara@vmware.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d9a5f210
...@@ -2302,9 +2302,13 @@ vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter) ...@@ -2302,9 +2302,13 @@ vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter)
adapter->intr.mask_mode = (cfg >> 2) & 0x3; adapter->intr.mask_mode = (cfg >> 2) & 0x3;
if (adapter->intr.type == VMXNET3_IT_AUTO) { if (adapter->intr.type == VMXNET3_IT_AUTO) {
int err; adapter->intr.type = VMXNET3_IT_MSIX;
}
#ifdef CONFIG_PCI_MSI #ifdef CONFIG_PCI_MSI
if (adapter->intr.type == VMXNET3_IT_MSIX) {
int err;
adapter->intr.msix_entries[0].entry = 0; adapter->intr.msix_entries[0].entry = 0;
err = pci_enable_msix(adapter->pdev, adapter->intr.msix_entries, err = pci_enable_msix(adapter->pdev, adapter->intr.msix_entries,
VMXNET3_LINUX_MAX_MSIX_VECT); VMXNET3_LINUX_MAX_MSIX_VECT);
...@@ -2313,15 +2317,18 @@ vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter) ...@@ -2313,15 +2317,18 @@ vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter)
adapter->intr.type = VMXNET3_IT_MSIX; adapter->intr.type = VMXNET3_IT_MSIX;
return; return;
} }
#endif adapter->intr.type = VMXNET3_IT_MSI;
}
if (adapter->intr.type == VMXNET3_IT_MSI) {
int err;
err = pci_enable_msi(adapter->pdev); err = pci_enable_msi(adapter->pdev);
if (!err) { if (!err) {
adapter->intr.num_intrs = 1; adapter->intr.num_intrs = 1;
adapter->intr.type = VMXNET3_IT_MSI;
return; return;
} }
} }
#endif /* CONFIG_PCI_MSI */
adapter->intr.type = VMXNET3_IT_INTX; adapter->intr.type = VMXNET3_IT_INTX;
......
...@@ -68,10 +68,10 @@ ...@@ -68,10 +68,10 @@
/* /*
* Version numbers * Version numbers
*/ */
#define VMXNET3_DRIVER_VERSION_STRING "1.0.5.0-k" #define VMXNET3_DRIVER_VERSION_STRING "1.0.13.0-k"
/* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */ /* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */
#define VMXNET3_DRIVER_VERSION_NUM 0x01000500 #define VMXNET3_DRIVER_VERSION_NUM 0x01000B00
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment