summaryrefslogtreecommitdiff
path: root/EmbeddedPkg/Drivers
diff options
context:
space:
mode:
authorRonald Cron <ronald.cron@arm.com>2014-10-27 10:41:29 +0000
committeroliviermartin <oliviermartin@Edk2>2014-10-27 10:41:29 +0000
commite52aee5d31c78a45a30fae5fbb54d1cf0bbabe1c (patch)
tree0fba2f35c9398ad82d574c8f89904b26292f48af /EmbeddedPkg/Drivers
parentfdd12bd56985bfc6090b972ddc07418eb4f7212a (diff)
downloadedk2-platforms-e52aee5d31c78a45a30fae5fbb54d1cf0bbabe1c.tar.xz
EmbeddedPkg/Lan9118Dxe: Fix interrupt's mask returned by GetStatus
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <ronald.cron@arm.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16242 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EmbeddedPkg/Drivers')
-rw-r--r--EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c b/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c
index 191760ccf7..507e55f450 100644
--- a/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c
+++ b/EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c
@@ -979,29 +979,24 @@ SnpGetStatus (
// Read interrupt status if IrqStat is not NULL
if (IrqStat != NULL) {
+ *IrqStat = 0;
// Check for receive interrupt
if (MmioRead32 (LAN9118_INT_STS) & INSTS_RSFL) { // Data moved from rx FIFO
*IrqStat |= EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT;
MmioWrite32 (LAN9118_INT_STS,INSTS_RSFL);
- } else {
- *IrqStat &= ~EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT;
}
// Check for transmit interrupt
if (MmioRead32 (LAN9118_INT_STS) & INSTS_TSFL) {
*IrqStat |= EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT;
MmioWrite32 (LAN9118_INT_STS,INSTS_TSFL);
- } else {
- *IrqStat &= ~EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT;
}
// Check for software interrupt
if (MmioRead32 (LAN9118_INT_STS) & INSTS_SW_INT) {
*IrqStat |= EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT;
MmioWrite32 (LAN9118_INT_STS,INSTS_SW_INT);
- } else {
- *IrqStat &= ~EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT;
}
}