Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/axgbe/xgbe-drv.c
Show First 20 Lines • Show All 948 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
struct xgbe_prv_data *pdata = channel->pdata; | struct xgbe_prv_data *pdata = channel->pdata; | ||||
struct xgbe_hw_if *hw_if = &pdata->hw_if; | struct xgbe_hw_if *hw_if = &pdata->hw_if; | ||||
struct xgbe_ring *ring = channel->rx_ring; | struct xgbe_ring *ring = channel->rx_ring; | ||||
struct xgbe_ring_data *rdata; | struct xgbe_ring_data *rdata; | ||||
struct xgbe_packet_data *packet; | struct xgbe_packet_data *packet; | ||||
struct ifnet *ifp = pdata->netdev; | struct ifnet *ifp = pdata->netdev; | ||||
struct mbuf *m; | struct mbuf *m; | ||||
unsigned int incomplete, context_next, context; | unsigned int incomplete, context_next; | ||||
unsigned int received = 0; | unsigned int received = 0; | ||||
int packet_count = 0; | int packet_count = 0; | ||||
DBGPR("-->xgbe_rx_poll: budget=%d\n", budget); | DBGPR("-->xgbe_rx_poll: budget=%d\n", budget); | ||||
/* Nothing to do if there isn't a Rx ring for this channel */ | /* Nothing to do if there isn't a Rx ring for this channel */ | ||||
if (!ring) | if (!ring) | ||||
return 0; | return 0; | ||||
Show All 21 Lines | read_again: | ||||
ring->cur++; | ring->cur++; | ||||
incomplete = XGMAC_GET_BITS(packet->attributes, | incomplete = XGMAC_GET_BITS(packet->attributes, | ||||
RX_PACKET_ATTRIBUTES, | RX_PACKET_ATTRIBUTES, | ||||
INCOMPLETE); | INCOMPLETE); | ||||
context_next = XGMAC_GET_BITS(packet->attributes, | context_next = XGMAC_GET_BITS(packet->attributes, | ||||
RX_PACKET_ATTRIBUTES, | RX_PACKET_ATTRIBUTES, | ||||
CONTEXT_NEXT); | CONTEXT_NEXT); | ||||
context = XGMAC_GET_BITS(packet->attributes, | |||||
RX_PACKET_ATTRIBUTES, | |||||
CONTEXT); | |||||
/* Earlier error, just drain the remaining data */ | /* Earlier error, just drain the remaining data */ | ||||
if (incomplete || context_next) { | if (incomplete || context_next) { | ||||
goto read_again; | goto read_again; | ||||
} | } | ||||
if (packet->errors) { | if (packet->errors) { | ||||
rdata->mbuf_free = 1; | rdata->mbuf_free = 1; | ||||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |