aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/efx.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-09-01 07:47:38 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-09-03 09:53:46 -0400
commit64ee3120f73b9e904d97ba66386b1e8e93b81385 (patch)
treed529e4e4597b654922a74130330c0c9e197037da /drivers/net/sfc/efx.c
parent46123d043d4bab23aa0d22f33972ee52cfac7f68 (diff)
sfc: Remove efx_channel::has_interrupt
efx_channel::has_interrupt is redundant with efx_channel::used_flags. Remove efx_test_eventq() because it is now obviously unreachable. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/efx.c')
-rw-r--r--drivers/net/sfc/efx.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index 487df9499c35..2deac7b04282 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -259,7 +259,7 @@ void efx_process_channel_now(struct efx_channel *channel)
259 falcon_disable_interrupts(efx); 259 falcon_disable_interrupts(efx);
260 if (efx->legacy_irq) 260 if (efx->legacy_irq)
261 synchronize_irq(efx->legacy_irq); 261 synchronize_irq(efx->legacy_irq);
262 if (channel->has_interrupt && channel->irq) 262 if (channel->irq)
263 synchronize_irq(channel->irq); 263 synchronize_irq(channel->irq);
264 264
265 /* Wait for any NAPI processing to complete */ 265 /* Wait for any NAPI processing to complete */
@@ -872,10 +872,8 @@ static void efx_probe_interrupts(struct efx_nic *efx)
872 } 872 }
873 873
874 if (rc == 0) { 874 if (rc == 0) {
875 for (i = 0; i < efx->rss_queues; i++) { 875 for (i = 0; i < efx->rss_queues; i++)
876 efx->channel[i].has_interrupt = true;
877 efx->channel[i].irq = xentries[i].vector; 876 efx->channel[i].irq = xentries[i].vector;
878 }
879 } else { 877 } else {
880 /* Fall back to single channel MSI */ 878 /* Fall back to single channel MSI */
881 efx->interrupt_mode = EFX_INT_MODE_MSI; 879 efx->interrupt_mode = EFX_INT_MODE_MSI;
@@ -889,7 +887,6 @@ static void efx_probe_interrupts(struct efx_nic *efx)
889 rc = pci_enable_msi(efx->pci_dev); 887 rc = pci_enable_msi(efx->pci_dev);
890 if (rc == 0) { 888 if (rc == 0) {
891 efx->channel[0].irq = efx->pci_dev->irq; 889 efx->channel[0].irq = efx->pci_dev->irq;
892 efx->channel[0].has_interrupt = true;
893 } else { 890 } else {
894 EFX_ERR(efx, "could not enable MSI\n"); 891 EFX_ERR(efx, "could not enable MSI\n");
895 efx->interrupt_mode = EFX_INT_MODE_LEGACY; 892 efx->interrupt_mode = EFX_INT_MODE_LEGACY;
@@ -899,9 +896,6 @@ static void efx_probe_interrupts(struct efx_nic *efx)
899 /* Assume legacy interrupts */ 896 /* Assume legacy interrupts */
900 if (efx->interrupt_mode == EFX_INT_MODE_LEGACY) { 897 if (efx->interrupt_mode == EFX_INT_MODE_LEGACY) {
901 efx->rss_queues = 1; 898 efx->rss_queues = 1;
902 /* Every channel is interruptible */
903 for (i = 0; i < EFX_MAX_CHANNELS; i++)
904 efx->channel[i].has_interrupt = true;
905 efx->legacy_irq = efx->pci_dev->irq; 899 efx->legacy_irq = efx->pci_dev->irq;
906 } 900 }
907} 901}
@@ -911,7 +905,7 @@ static void efx_remove_interrupts(struct efx_nic *efx)
911 struct efx_channel *channel; 905 struct efx_channel *channel;
912 906
913 /* Remove MSI/MSI-X interrupts */ 907 /* Remove MSI/MSI-X interrupts */
914 efx_for_each_channel_with_interrupt(channel, efx) 908 efx_for_each_channel(channel, efx)
915 channel->irq = 0; 909 channel->irq = 0;
916 pci_disable_msi(efx->pci_dev); 910 pci_disable_msi(efx->pci_dev);
917 pci_disable_msix(efx->pci_dev); 911 pci_disable_msix(efx->pci_dev);
@@ -1106,7 +1100,7 @@ static void efx_stop_all(struct efx_nic *efx)
1106 falcon_disable_interrupts(efx); 1100 falcon_disable_interrupts(efx);
1107 if (efx->legacy_irq) 1101 if (efx->legacy_irq)
1108 synchronize_irq(efx->legacy_irq); 1102 synchronize_irq(efx->legacy_irq);
1109 efx_for_each_channel_with_interrupt(channel, efx) { 1103 efx_for_each_channel(channel, efx) {
1110 if (channel->irq) 1104 if (channel->irq)
1111 synchronize_irq(channel->irq); 1105 synchronize_irq(channel->irq);
1112 } 1106 }
@@ -1303,7 +1297,7 @@ static void efx_netpoll(struct net_device *net_dev)
1303 struct efx_nic *efx = netdev_priv(net_dev); 1297 struct efx_nic *efx = netdev_priv(net_dev);
1304 struct efx_channel *channel; 1298 struct efx_channel *channel;
1305 1299
1306 efx_for_each_channel_with_interrupt(channel, efx) 1300 efx_for_each_channel(channel, efx)
1307 efx_schedule_channel(channel); 1301 efx_schedule_channel(channel);
1308} 1302}
1309 1303