summaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/rx.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-09-01 13:47:48 +0200
committerJeff Garzik <jgarzik@redhat.com>2008-09-03 15:53:46 +0200
commit8831da7b6c4b15c0be0ba849be4aea5eed3999c6 (patch)
tree6bdfd5433f9eb4358a67504d85fb903fe17fd9d9 /drivers/net/sfc/rx.c
parentsfc: Remove efx_channel::has_interrupt (diff)
downloadlinux-8831da7b6c4b15c0be0ba849be4aea5eed3999c6.tar.xz
linux-8831da7b6c4b15c0be0ba849be4aea5eed3999c6.zip
sfc: Cleanup RX queue information
Rename efx_nic::rss_queues to the more obvious n_rx_queues Remove efx_rx_queue::used and other stuff that's redundant with it. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/rx.c')
-rw-r--r--drivers/net/sfc/rx.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/net/sfc/rx.c b/drivers/net/sfc/rx.c
index fa1a62aacbae..7d2dc20d0ca3 100644
--- a/drivers/net/sfc/rx.c
+++ b/drivers/net/sfc/rx.c
@@ -789,23 +789,14 @@ int efx_probe_rx_queue(struct efx_rx_queue *rx_queue)
/* Allocate RX buffers */
rxq_size = (efx->type->rxd_ring_mask + 1) * sizeof(*rx_queue->buffer);
rx_queue->buffer = kzalloc(rxq_size, GFP_KERNEL);
- if (!rx_queue->buffer) {
- rc = -ENOMEM;
- goto fail1;
- }
+ if (!rx_queue->buffer)
+ return -ENOMEM;
rc = falcon_probe_rx(rx_queue);
- if (rc)
- goto fail2;
-
- return 0;
-
- fail2:
- kfree(rx_queue->buffer);
- rx_queue->buffer = NULL;
- fail1:
- rx_queue->used = 0;
-
+ if (rc) {
+ kfree(rx_queue->buffer);
+ rx_queue->buffer = NULL;
+ }
return rc;
}
@@ -872,7 +863,6 @@ void efx_remove_rx_queue(struct efx_rx_queue *rx_queue)
kfree(rx_queue->buffer);
rx_queue->buffer = NULL;
- rx_queue->used = 0;
}
void efx_flush_lro(struct efx_channel *channel)