1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

efi_loader: fix efi_net_get_status

The returned interrupt status was wrong.

As out transmit buffer is empty we need to always set
EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT.

When we have received a packet we need to set
EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT.

Furthermore we should call efi_timer_check() to handle events.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Heinrich Schuchardt
2017-10-05 16:36:02 +02:00
committed by Alexander Graf
parent e5c21603fc
commit 891b3d9051
2 changed files with 14 additions and 3 deletions

View File

@@ -133,9 +133,14 @@ static efi_status_t EFIAPI efi_net_get_status(struct efi_simple_network *this,
{
EFI_ENTRY("%p, %p, %p", this, int_status, txbuf);
/* We send packets synchronously, so nothing is outstanding */
if (int_status)
*int_status = 0;
efi_timer_check();
if (int_status) {
/* We send packets synchronously, so nothing is outstanding */
*int_status = EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT;
if (new_rx_packet)
*int_status |= EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT;
}
if (txbuf)
*txbuf = new_tx_packet;