summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-lib.c
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@dev.mellanox.co.il>2007-09-19 09:52:25 -0700
committerRoland Dreier <rolandd@cisco.com>2007-09-23 13:03:22 -0700
commit6e694ea33e7a7fad908d188c46f441f04fb633d4 (patch)
tree82325240b222299766b5cfa53e59306cb607878a /drivers/ide/ide-lib.c
parent40ffbfad6bb79a99cc7627bdaca0ee22dec526f6 (diff)
downloadlinux-6e694ea33e7a7fad908d188c46f441f04fb633d4.tar.bz2
IB/mlx4: Fix data corruption triggered by wrong headroom marking order
This is an addendum to commit 0e6e7416 ("IB/mlx4: Handle new FW requirement for send request prefetching"). We also need to handle prefetch marking properly for S/G segments, or else the HCA may end up processing S/G segments that are not fully written and end up sending the wrong data. This can actually cause data corruption in practice, especially on systems with relatively slow CPUs (where the HCA is more likely to prefetch while the CPU is in the middle of writing a work request into memory). We write S/G segments in reverse order into the WQE, in order to guarantee that the first dword of all cachelines containing S/G segments is written last (overwriting the headroom invalidation pattern). The entire cacheline will thus contain valid data when the invalidation pattern is overwritten. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/ide/ide-lib.c')
0 files changed, 0 insertions, 0 deletions