aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2015-04-21 15:20:13 +0100
committerMichael Brown <mcb30@ipxe.org>2015-04-21 15:47:16 +0100
commit63dcab002e11123328bdbb73a475e5bc43b26b17 (patch)
treef0cbdd9a5077b29d90168cbfef0663de1c8b1d9a /src
parentda990b8870cf3b777646519ea6fb5564178a17db (diff)
downloadipxe-63dcab002e11123328bdbb73a475e5bc43b26b17.zip
ipxe-63dcab002e11123328bdbb73a475e5bc43b26b17.tar.gz
ipxe-63dcab002e11123328bdbb73a475e5bc43b26b17.tar.bz2
[intel] Report any unexpected interrupt causes
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/net/intel.c8
-rw-r--r--src/drivers/net/intel.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/src/drivers/net/intel.c b/src/drivers/net/intel.c
index ffa0276..954025d 100644
--- a/src/drivers/net/intel.c
+++ b/src/drivers/net/intel.c
@@ -759,6 +759,14 @@ static void intel_poll ( struct net_device *netdev ) {
if ( icr & INTEL_IRQ_LSC )
intel_check_link ( netdev );
+ /* Check for unexpected interrupts */
+ if ( icr & ~( INTEL_IRQ_TXDW | INTEL_IRQ_TXQE | INTEL_IRQ_LSC |
+ INTEL_IRQ_RXDMT0 | INTEL_IRQ_RXT0 | INTEL_IRQ_RXO ) ) {
+ DBGC ( intel, "INTEL %p unexpected ICR %08x\n", intel, icr );
+ /* Report as a TX error */
+ netdev_tx_err ( netdev, NULL, -ENOTSUP );
+ }
+
/* Refill RX ring */
intel_refill_rx ( intel );
}
diff --git a/src/drivers/net/intel.h b/src/drivers/net/intel.h
index 0c2929a..5482fb1 100644
--- a/src/drivers/net/intel.h
+++ b/src/drivers/net/intel.h
@@ -91,7 +91,9 @@ enum intel_descriptor_status {
/** Interrupt Cause Read Register */
#define INTEL_ICR 0x000c0UL
#define INTEL_IRQ_TXDW 0x00000001UL /**< Transmit descriptor done */
+#define INTEL_IRQ_TXQE 0x00000002UL /**< Transmit queue empty */
#define INTEL_IRQ_LSC 0x00000004UL /**< Link status change */
+#define INTEL_IRQ_RXDMT0 0x00000010UL /**< Receive queue low */
#define INTEL_IRQ_RXT0 0x00000080UL /**< Receive timer */
#define INTEL_IRQ_RXO 0x00000400UL /**< Receive overrun */