]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[intel] Report receive overruns via network device errors
authorMichael Brown <mcb30@ipxe.org>
Wed, 24 Oct 2012 18:21:34 +0000 (11:21 -0700)
committerMichael Brown <mcb30@ipxe.org>
Wed, 24 Oct 2012 18:21:34 +0000 (11:21 -0700)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/intel.c
src/drivers/net/intel.h

index 353fc971017b66ffa5050253ebc79dda86388fa3..0811ed9106cbd2dbdcfb5fa588d5b5325cb143e9 100644 (file)
@@ -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 );
index b38a7139093b993da8ecae0fb1e46d7675e70ec6..e9e9052b834a566e4fac7273f6f13b0319cd1307 100644 (file)
@@ -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