diff options
author | Simon Rettberg | 2023-10-06 18:37:21 +0200 |
---|---|---|
committer | Simon Rettberg | 2023-10-06 18:37:21 +0200 |
commit | 95a57769874a70456670984debc05084feb75f6b (patch) | |
tree | 9943c86b682e1b1d21a0439637b3849840a50137 /src/drivers/net/efi/nii.c | |
parent | [efi] Remove old RDRAND hack; now officially supported (diff) | |
parent | [libc] Use wall clock time as seed for the (non-cryptographic) RNG (diff) | |
download | ipxe-95a57769874a70456670984debc05084feb75f6b.tar.gz ipxe-95a57769874a70456670984debc05084feb75f6b.tar.xz ipxe-95a57769874a70456670984debc05084feb75f6b.zip |
Merge branch 'master' into openslx
Diffstat (limited to 'src/drivers/net/efi/nii.c')
-rw-r--r-- | src/drivers/net/efi/nii.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/drivers/net/efi/nii.c b/src/drivers/net/efi/nii.c index be5bce4b..8dd17e4b 100644 --- a/src/drivers/net/efi/nii.c +++ b/src/drivers/net/efi/nii.c @@ -1032,8 +1032,9 @@ static void nii_poll_tx ( struct net_device *netdev, unsigned int stat ) { if ( stat & PXE_STATFLAGS_GET_STATUS_NO_TXBUFS_WRITTEN ) return; - /* Sanity check */ - assert ( nii->txbuf != NULL ); + /* Ignore spurious completions reported by some devices */ + if ( ! nii->txbuf ) + return; /* Complete transmission */ iobuf = nii->txbuf; @@ -1131,7 +1132,7 @@ static void nii_poll ( struct net_device *netdev ) { /* Get status */ op = NII_OP ( PXE_OPCODE_GET_STATUS, ( PXE_OPFLAGS_GET_INTERRUPT_STATUS | - ( nii->txbuf ? PXE_OPFLAGS_GET_TRANSMITTED_BUFFERS : 0)| + PXE_OPFLAGS_GET_TRANSMITTED_BUFFERS | ( nii->media ? PXE_OPFLAGS_GET_MEDIA_STATUS : 0 ) ) ); if ( ( stat = nii_issue_db ( nii, op, &db, sizeof ( db ) ) ) < 0 ) { rc = -EIO_STAT ( stat ); @@ -1141,8 +1142,7 @@ static void nii_poll ( struct net_device *netdev ) { } /* Process any TX completions */ - if ( nii->txbuf ) - nii_poll_tx ( netdev, stat ); + nii_poll_tx ( netdev, stat ); /* Process any RX completions */ nii_poll_rx ( netdev ); |