Skip to content

Commit

Permalink
Some SNP implementations (iPXE itself at least) provide an invalid po…
Browse files Browse the repository at this point in the history
…inter, we can't use that cue to determine if it is a unique return.

Always decrement txpending on non-null txbuf.  This means that if two packets were pending to transmit to an Emulex, it's theoretically possible to stop
the loop before all transmits dispatched but that's no worse than some scenarios before this mess...
  • Loading branch information
Jarrod Johnson committed Jan 14, 2012
1 parent 9dd1a8f commit 57a001b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/drivers/net/efi/snpnet.c
Expand Up @@ -76,11 +76,11 @@ static int snpnet_transmit ( struct net_device *netdev,
static void snpnet_complete ( struct net_device *netdev, void *txbuf ) {
struct io_buffer *tmp;
struct io_buffer *iobuf;
struct snpnet_device *snpnetdev = netdev->priv;
snpnetdev->txpending--;

list_for_each_entry_safe ( iobuf, tmp, &netdev->tx_queue, list ) {
if ( iobuf->data == txbuf ) {
struct snpnet_device *snpnetdev = netdev->priv;
snpnetdev->txpending--;
netdev_tx_complete ( netdev, iobuf );
break;
}
Expand Down

0 comments on commit 57a001b

Please sign in to comment.