mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
fdd12bd569
commit
e52aee5d31
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue