aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-03-13 05:14:59 -0400
committerDavid S. Miller <davem@davemloft.net>2013-03-13 05:14:59 -0400
commit6f08158de9e5a15a2f2b25ed651b5120a2ec7b5b (patch)
treedd1a0e5f097892416b974ffd9600e7f5ee2f10a9
parentbonding: don't call update_speed_duplex() under spinlocks (diff)
parentsfc: Only use TX push if a single descriptor is to be written (diff)
downloadlinux-dev-6f08158de9e5a15a2f2b25ed651b5120a2ec7b5b.tar.xz
linux-dev-6f08158de9e5a15a2f2b25ed651b5120a2ec7b5b.zip
Merge branch 'sfc-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/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>
-rw-r--r--drivers/net/ethernet/sfc/nic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/nic.c b/drivers/net/ethernet/sfc/nic.c
index 0ad790cc473c..eaa8e874a3cb 100644
--- a/drivers/net/ethernet/sfc/nic.c
+++ b/drivers/net/ethernet/sfc/nic.c
@@ -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