Skip to content

Commit

Permalink
[intel] Report receive overruns via network device errors
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Oct 24, 2012
1 parent 7cf6c6b commit dace457
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/drivers/net/intel.c
Expand Up @@ -699,10 +699,14 @@ static void intel_poll ( struct net_device *netdev ) {
if ( icr & INTEL_IRQ_TXDW )
intel_poll_tx ( netdev );

/* Poll for RX completionsm, if applicable */
/* Poll for RX completions, if applicable */
if ( icr & INTEL_IRQ_RXT0 )
intel_poll_rx ( netdev );

/* Report receive overruns */
if ( icr & INTEL_IRQ_RXO )
netdev_rx_err ( netdev, NULL, -ENOBUFS );

/* Check link state, if applicable */
if ( icr & INTEL_IRQ_LSC )
intel_check_link ( netdev );
Expand Down
1 change: 1 addition & 0 deletions src/drivers/net/intel.h
Expand Up @@ -93,6 +93,7 @@ enum intel_descriptor_status {
#define INTEL_IRQ_TXDW 0x00000001UL /**< Transmit descriptor done */
#define INTEL_IRQ_LSC 0x00000004UL /**< Link status change */
#define INTEL_IRQ_RXT0 0x00000080UL /**< Receive timer */
#define INTEL_IRQ_RXO 0x00000400UL /**< Receive overrun */

/** Interrupt Mask Set/Read Register */
#define INTEL_IMS 0x000d0UL
Expand Down

0 comments on commit dace457

Please sign in to comment.