Browse Source

[intel] Report receive overruns via network device errors

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 years ago
parent
commit
dace457baf
2 changed files with 6 additions and 1 deletions
  1. 5
    1
      src/drivers/net/intel.c
  2. 1
    0
      src/drivers/net/intel.h

+ 5
- 1
src/drivers/net/intel.c View File

699
 	if ( icr & INTEL_IRQ_TXDW )
699
 	if ( icr & INTEL_IRQ_TXDW )
700
 		intel_poll_tx ( netdev );
700
 		intel_poll_tx ( netdev );
701
 
701
 
702
-	/* Poll for RX completionsm, if applicable */
702
+	/* Poll for RX completions, if applicable */
703
 	if ( icr & INTEL_IRQ_RXT0 )
703
 	if ( icr & INTEL_IRQ_RXT0 )
704
 		intel_poll_rx ( netdev );
704
 		intel_poll_rx ( netdev );
705
 
705
 
706
+	/* Report receive overruns */
707
+	if ( icr & INTEL_IRQ_RXO )
708
+		netdev_rx_err ( netdev, NULL, -ENOBUFS );
709
+
706
 	/* Check link state, if applicable */
710
 	/* Check link state, if applicable */
707
 	if ( icr & INTEL_IRQ_LSC )
711
 	if ( icr & INTEL_IRQ_LSC )
708
 		intel_check_link ( netdev );
712
 		intel_check_link ( netdev );

+ 1
- 0
src/drivers/net/intel.h View File

93
 #define INTEL_IRQ_TXDW		0x00000001UL	/**< Transmit descriptor done */
93
 #define INTEL_IRQ_TXDW		0x00000001UL	/**< Transmit descriptor done */
94
 #define INTEL_IRQ_LSC		0x00000004UL	/**< Link status change */
94
 #define INTEL_IRQ_LSC		0x00000004UL	/**< Link status change */
95
 #define INTEL_IRQ_RXT0		0x00000080UL	/**< Receive timer */
95
 #define INTEL_IRQ_RXT0		0x00000080UL	/**< Receive timer */
96
+#define INTEL_IRQ_RXO		0x00000400UL	/**< Receive overrun */
96
 
97
 
97
 /** Interrupt Mask Set/Read Register */
98
 /** Interrupt Mask Set/Read Register */
98
 #define INTEL_IMS 0x000d0UL
99
 #define INTEL_IMS 0x000d0UL

Loading…
Cancel
Save