Skip to content

Commit

Permalink
Merge branch 'sfc-3.9' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/bwh/sfc

Ben Hutchings says:

====================
Just the one bug fix I mentioned before, but it's a pretty important one
as it can cause silent data corruption or IOMMU page faults.

This would be suitable for stable and should apply cleanly to all the
3.x.y branches.  I'm still working through testing of larger sets of
fixes.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Mar 13, 2013
2 parents 876254a + fae8563 commit 6f08158
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/sfc/nic.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@ efx_may_push_tx_desc(struct efx_tx_queue *tx_queue, unsigned int write_count)
return false;

tx_queue->empty_read_count = 0;
return ((empty_read_count ^ write_count) & ~EFX_EMPTY_COUNT_VALID) == 0;
return ((empty_read_count ^ write_count) & ~EFX_EMPTY_COUNT_VALID) == 0
&& tx_queue->write_count - write_count == 1;
}

/* For each entry inserted into the software descriptor ring, create a
Expand Down

0 comments on commit 6f08158

Please sign in to comment.