From ff734ef4bca05fd5cd51b83d2e2a9f008b64f9a3 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 29 Jan 2013 23:33:14 +0000 Subject: sfc: Wrap __efx_rx_packet() with efx_rx_flush_packet() The pipeline mechanism will need to change a bit for scattered packets. Add a wrapper to insulate efx_process_channel() from this. Signed-off-by: Ben Hutchings --- drivers/net/ethernet/sfc/efx.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/net/ethernet/sfc/efx.h') diff --git a/drivers/net/ethernet/sfc/efx.h b/drivers/net/ethernet/sfc/efx.h index 64c555e493be..00e7077fa1d8 100644 --- a/drivers/net/ethernet/sfc/efx.h +++ b/drivers/net/ethernet/sfc/efx.h @@ -43,6 +43,13 @@ extern void __efx_rx_packet(struct efx_channel *channel, struct efx_rx_buffer *rx_buf); extern void efx_rx_packet(struct efx_rx_queue *rx_queue, unsigned int index, unsigned int len, u16 flags); +static inline void efx_rx_flush_packet(struct efx_channel *channel) +{ + if (channel->rx_pkt) { + __efx_rx_packet(channel, channel->rx_pkt); + channel->rx_pkt = NULL; + } +} extern void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue); #define EFX_MAX_DMAQ_SIZE 4096UL -- cgit v1.2.1