I guess I don't unless that target is shown to have the same problem? Quoting r. Snider, Tim <[EMAIL PROTECTED]>: Subject: RE: [PATCH] RFC: srp filesystem data corruption problem/work-around
You may (or may not) want to include the LSI OUI (0x00,0xa0,0xb8) for future compatability. This change will be available in the storage firmware around Sept. 2006. It might save some future mod. Timothy Snider Storage Architect Strategic Planning, Technology and Architecture LSI Logic Corporation 3718 North Rock Road Wichita, KS 67226 (316) 636-8736 [EMAIL PROTECTED] -----Original Message----- From: Michael S. Tsirkin [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 02, 2006 11:44 AM To: Vu Pham Cc: Roland Dreier; Snider, Tim; [email protected] Subject: Re: [PATCH] RFC: srp filesystem data corruption problem/work-around Quoting r. Vu Pham <[EMAIL PROTECTED]>: > Subject: Re: [PATCH] RFC: srp filesystem data corruption > problem/work-around > > Michael, > > > +static const u8 mellanox_oui[3] = { 0x02, 0xc9, 0x02 }; > > Should it be {0x00, 0x02, 0xc9}? Ugh. Of course it should. Like this: -- Add work-around for data corruption observed with Mellanox targets when VA != 0. Signed-off-by: Ishai Rabinovitz <[EMAIL PROTECTED]> Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]> diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 8f472e7..6a8b286 100644 Index: last_stable/drivers/infiniband/ulp/srp/ib_srp.c =================================================================== --- last_stable.orig/drivers/infiniband/ulp/srp/ib_srp.c 2006-07-31 16:52:26.000000000 +0300 +++ last_stable/drivers/infiniband/ulp/srp/ib_srp.c 2006-07-31 18:37:58.000000000 +0300 @@ -77,6 +77,14 @@ MODULE_PARM_DESC(topspin_workarounds, static const u8 topspin_oui[3] = { 0x00, 0x05, 0xad }; +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 mellanox_oui[3] = { 0x00, 0x02, 0xc9 }; + static void srp_add_one(struct ib_device *device); static void srp_remove_one(struct ib_device *device); static void srp_completion(struct ib_cq *cq, void *target_ptr); @@ -569,7 +577,7 @@ err: return ret; } -static int srp_map_fmr(struct srp_device *dev, struct scatterlist *scat, +static int srp_map_fmr(struct srp_target_port *target, struct +scatterlist *scat, int sg_cnt, struct srp_request *req, struct srp_direct_buf *buf) { @@ -579,10 +587,15 @@ static int srp_map_fmr(struct srp_device int page_cnt; int i, j; int ret; + struct srp_device *dev = target->srp_host->dev; if (!dev->fmr_pool) return -ENODEV; + if ((sg_dma_address(&scat[0]) & ~dev->fmr_page_mask) && + mellanox_workarounds && !memcmp(&target->ioc_guid, mellanox_oui, 3)) + return -EINVAL; + len = page_cnt = 0; for (i = 0; i < sg_cnt; ++i) { if (sg_dma_address(&scat[i]) & ~dev->fmr_page_mask) { @@ -685,7 +699,7 @@ static int srp_map_data(struct scsi_cmnd buf->va = cpu_to_be64(sg_dma_address(scat)); buf->key = cpu_to_be32(target->srp_host->dev->mr->rkey); buf->len = cpu_to_be32(sg_dma_len(scat)); - } else if (srp_map_fmr(target->srp_host->dev, scat, count, req, + } else if (srp_map_fmr(target, scat, count, req, (void *) cmd->add_data)) { /* * FMR mapping failed, and the scatterlist has more -- MST -- MST _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
