Selaa lähdekoodia

[intel] Report receive overruns via network device errors

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 vuotta sitten
vanhempi
commit
dace457baf
2 muutettua tiedostoa jossa 6 lisäystä ja 1 poistoa
  1. 5
    1
      src/drivers/net/intel.c
  2. 1
    0
      src/drivers/net/intel.h

+ 5
- 1
src/drivers/net/intel.c Näytä tiedosto

@@ -699,10 +699,14 @@ static void intel_poll ( struct net_device *netdev ) {
699 699
 	if ( icr & INTEL_IRQ_TXDW )
700 700
 		intel_poll_tx ( netdev );
701 701
 
702
-	/* Poll for RX completionsm, if applicable */
702
+	/* Poll for RX completions, if applicable */
703 703
 	if ( icr & INTEL_IRQ_RXT0 )
704 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 710
 	/* Check link state, if applicable */
707 711
 	if ( icr & INTEL_IRQ_LSC )
708 712
 		intel_check_link ( netdev );

+ 1
- 0
src/drivers/net/intel.h Näytä tiedosto

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

Loading…
Peruuta
Tallenna