[openib-general] [PATCH] RFC: srp filesystem data corruption problem/work-around
Michael S. Tsirkin
mst at mellanox.co.il
Tue Jul 25 14:49:15 PDT 2006
Hi, Roland!
For some time now we've been trying to debug a data corruption failure that
occurs when working with Mellanox SRP target. We could not yet pin-point
exactly where the problem is (debugging suggestions are wellcome) but the
corruption seems to occur only when the target gets a request where the virtual
address is not 0.
Until there's a better understanding of the issue, I've come up with the
following simple patch that will use indirect mode for this case.
Could you comment on this please?
---
Add work-around for data corruption observed with Mellanox targets
when VA != 0.
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 8f472e7..6a8b286 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -75,6 +75,12 @@ module_param(topspin_workarounds, int, 0
MODULE_PARM_DESC(topspin_workarounds,
"Enable workarounds for Topspin/Cisco SRP target bugs if != 0");
+static int mellanox_workarounds = 1;
+
+module_param(mellanox_workarounds, int, 0444);
+MODULE_PARM_DESC(mellanox_workarounds,
+ "Enable workarounds for Mellanox SRP target bugs if != 0");
+
static const u8 topspin_oui[3] = { 0x00, 0x05, 0xad };
static void srp_add_one(struct ib_device *device);
@@ -581,6 +587,10 @@ static int srp_map_fmr(struct srp_device
if (!dev->fmr_pool)
return -ENODEV;
+ if (mellanox_workarounds &&
+ sg_dma_address(&scat[0]) & ~dev->fmr_page_mask)
+ return -EINVAL;
+
len = page_cnt = 0;
for (i = 0; i < sg_cnt; ++i) {
if (sg_dma_address(&scat[i]) & ~dev->fmr_page_mask) {
--
The question of whether a computer can think is no more interesting than the
question of whether a submarine can swim. -- Edsger Wybe Dijkstra
----- End forwarded message -----
--
MST
More information about the general
mailing list