Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[efi] Free transmit ring entry before calling netdev_tx_complete()
The snpnet driver uses netdev_tx_defer() and so must ensure that space
in the (single-entry) transmit descriptor ring is freed up before
calling netdev_tx_complete().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Oct 16, 2014
1 parent 86285d1 commit b71e93b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/drivers/net/efi/snpnet.c
Expand Up @@ -185,6 +185,7 @@ static int snpnet_transmit ( struct net_device *netdev,
*/
static void snpnet_poll_tx ( struct net_device *netdev ) {
struct snp_nic *snp = netdev->priv;
struct io_buffer *iobuf;
UINT32 irq;
VOID *txbuf;
EFI_STATUS efirc;
Expand Down Expand Up @@ -212,8 +213,9 @@ static void snpnet_poll_tx ( struct net_device *netdev ) {
}

/* Complete transmission */
netdev_tx_complete ( netdev, snp->txbuf );
iobuf = snp->txbuf;
snp->txbuf = NULL;
netdev_tx_complete ( netdev, iobuf );
}

/**
Expand Down

0 comments on commit b71e93b

Please sign in to comment.