aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vmxnet3
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2009-10-14 23:38:58 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-14 23:38:58 -0400
commit8f7e524ce33ca81b663711404709396165da3cbd (patch)
tree30ed4b5268b015a662e7c2cd0a0286d061d235dc /drivers/net/vmxnet3
parent47dd7a540b8a0cdc028914b7351fca0cf0a1d305 (diff)
vmxnet: fix 2 build problems
vmxnet3 uses in_dev* interfaces so it should depend on INET. Also fix so that the driver builds when CONFIG_PCI_MSI is disabled. vmxnet3_drv.c:(.text+0x2a88cb): undefined reference to `in_dev_finish_destroy' drivers/net/vmxnet3/vmxnet3_drv.c:1335: error: 'struct vmxnet3_intr' has no member named 'msix_entries' drivers/net/vmxnet3/vmxnet3_drv.c:1384: error: 'struct vmxnet3_intr' has no member named 'msix_entries' drivers/net/vmxnet3/vmxnet3_drv.c:2137: error: 'struct vmxnet3_intr' has no member named 'msix_entries' drivers/net/vmxnet3/vmxnet3_drv.c:2138: error: 'struct vmxnet3_intr' has no member named 'msix_entries' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Bhavesh davda <bhavesh@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3')
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 44fb0c5a2800..6a16f76f277e 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -1314,9 +1314,11 @@ vmxnet3_netpoll(struct net_device *netdev)
1314 struct vmxnet3_adapter *adapter = netdev_priv(netdev); 1314 struct vmxnet3_adapter *adapter = netdev_priv(netdev);
1315 int irq; 1315 int irq;
1316 1316
1317#ifdef CONFIG_PCI_MSI
1317 if (adapter->intr.type == VMXNET3_IT_MSIX) 1318 if (adapter->intr.type == VMXNET3_IT_MSIX)
1318 irq = adapter->intr.msix_entries[0].vector; 1319 irq = adapter->intr.msix_entries[0].vector;
1319 else 1320 else
1321#endif
1320 irq = adapter->pdev->irq; 1322 irq = adapter->pdev->irq;
1321 1323
1322 disable_irq(irq); 1324 disable_irq(irq);
@@ -1330,12 +1332,15 @@ vmxnet3_request_irqs(struct vmxnet3_adapter *adapter)
1330{ 1332{
1331 int err; 1333 int err;
1332 1334
1335#ifdef CONFIG_PCI_MSI
1333 if (adapter->intr.type == VMXNET3_IT_MSIX) { 1336 if (adapter->intr.type == VMXNET3_IT_MSIX) {
1334 /* we only use 1 MSI-X vector */ 1337 /* we only use 1 MSI-X vector */
1335 err = request_irq(adapter->intr.msix_entries[0].vector, 1338 err = request_irq(adapter->intr.msix_entries[0].vector,
1336 vmxnet3_intr, 0, adapter->netdev->name, 1339 vmxnet3_intr, 0, adapter->netdev->name,
1337 adapter->netdev); 1340 adapter->netdev);
1338 } else if (adapter->intr.type == VMXNET3_IT_MSI) { 1341 } else
1342#endif
1343 if (adapter->intr.type == VMXNET3_IT_MSI) {
1339 err = request_irq(adapter->pdev->irq, vmxnet3_intr, 0, 1344 err = request_irq(adapter->pdev->irq, vmxnet3_intr, 0,
1340 adapter->netdev->name, adapter->netdev); 1345 adapter->netdev->name, adapter->netdev);
1341 } else { 1346 } else {
@@ -1376,6 +1381,7 @@ vmxnet3_free_irqs(struct vmxnet3_adapter *adapter)
1376 adapter->intr.num_intrs <= 0); 1381 adapter->intr.num_intrs <= 0);
1377 1382
1378 switch (adapter->intr.type) { 1383 switch (adapter->intr.type) {
1384#ifdef CONFIG_PCI_MSI
1379 case VMXNET3_IT_MSIX: 1385 case VMXNET3_IT_MSIX:
1380 { 1386 {
1381 int i; 1387 int i;
@@ -1385,6 +1391,7 @@ vmxnet3_free_irqs(struct vmxnet3_adapter *adapter)
1385 adapter->netdev); 1391 adapter->netdev);
1386 break; 1392 break;
1387 } 1393 }
1394#endif
1388 case VMXNET3_IT_MSI: 1395 case VMXNET3_IT_MSI:
1389 free_irq(adapter->pdev->irq, adapter->netdev); 1396 free_irq(adapter->pdev->irq, adapter->netdev);
1390 break; 1397 break;
@@ -2134,6 +2141,7 @@ vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter)
2134 if (adapter->intr.type == VMXNET3_IT_AUTO) { 2141 if (adapter->intr.type == VMXNET3_IT_AUTO) {
2135 int err; 2142 int err;
2136 2143
2144#ifdef CONFIG_PCI_MSI
2137 adapter->intr.msix_entries[0].entry = 0; 2145 adapter->intr.msix_entries[0].entry = 0;
2138 err = pci_enable_msix(adapter->pdev, adapter->intr.msix_entries, 2146 err = pci_enable_msix(adapter->pdev, adapter->intr.msix_entries,
2139 VMXNET3_LINUX_MAX_MSIX_VECT); 2147 VMXNET3_LINUX_MAX_MSIX_VECT);
@@ -2142,6 +2150,7 @@ vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter)
2142 adapter->intr.type = VMXNET3_IT_MSIX; 2150 adapter->intr.type = VMXNET3_IT_MSIX;
2143 return; 2151 return;
2144 } 2152 }
2153#endif
2145 2154
2146 err = pci_enable_msi(adapter->pdev); 2155 err = pci_enable_msi(adapter->pdev);
2147 if (!err) { 2156 if (!err) {