netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v4 0/2] sfc: Restrict PIO for 64bit arch in order to avoid data corruption
@ 2014-06-03 10:02 Shradha Shah
  2014-06-03 10:04 ` [PATCH net v4 1/2] sfc: use 64-bit writes for PIO Shradha Shah
  2014-06-03 10:05 ` [PATCH net v4 2/2] sfc: Restrict PIO to 64-bit architectures Shradha Shah
  0 siblings, 2 replies; 7+ messages in thread
From: Shradha Shah @ 2014-06-03 10:02 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-net-drivers

This patch series 
Fixes: ee45fd92c739("sfc: Use TX PIO for sufficiently small packets")

The linux net driver uses memcpy_toio() in order to copy into
the PIO buffers.
Even on a 64bit machine this causes 32bit accesses to a write-
combined memory region.
There are hardware limitations that mean that only
64bit naturally aligned accesses are safe in all cases. Due to being
write-combined memory region two 32bit accesses may be coalesced to
form a 64bit non 64bit aligned access.
Solution was to open-code the memory copy routines using pointers
and to only enable PIO for x86_64 machines.

This bug fix applies to v3.13 and v3.14 stable branches.

Jon Cooper (2):
  sfc: use 64-bit writes for PIO.
  sfc: Restrict PIO to 64-bit architectures

 drivers/net/ethernet/sfc/io.h |  8 ++++++++
 drivers/net/ethernet/sfc/tx.c | 24 +++++++++++++++++++-----
 2 files changed, 27 insertions(+), 5 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-06-05 17:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-03 10:02 [PATCH net v4 0/2] sfc: Restrict PIO for 64bit arch in order to avoid data corruption Shradha Shah
2014-06-03 10:04 ` [PATCH net v4 1/2] sfc: use 64-bit writes for PIO Shradha Shah
2014-06-03 16:45   ` Sergei Shtylyov
2014-06-03 17:55     ` Joe Perches
2014-06-03 22:58   ` David Miller
2014-06-05 17:08     ` Robert Stonehouse
2014-06-03 10:05 ` [PATCH net v4 2/2] sfc: Restrict PIO to 64-bit architectures Shradha Shah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).