On Sun, Oct 17, 2010 at 5:25 AM, David Dillow <[email protected]> wrote: > [ ... ] > +static int srp_response_common(struct srp_target_port *target, s32 req_delta, > + void *rsp, int len) > +{ > + struct ib_device *dev; > + unsigned long flags; > + struct srp_iu *iu; > + int err = 1; > + > + dev = target->srp_host->srp_dev->dev; > + > + spin_lock_irqsave(target->scsi_host->host_lock, flags); > + target->req_lim += req_delta; > + > + iu = __srp_get_tx_iu(target, SRP_IU_RSP); > + if (!iu) { > + shost_printk(KERN_ERR, target->scsi_host, PFX > + "no IU available to send response\n"); > + goto out; > + } > + > + ib_dma_sync_single_for_cpu(dev, iu->dma, len, DMA_TO_DEVICE);
Hi Dave, As far as I can see the above sync call applies to a buffer in the tx_ring[]. Data in that buffer is only modified by the CPU and never by the HCA. So why is the above sync call present ? Is that call necessary ? > + memcpy(iu->buf, rsp, len); > + ib_dma_sync_single_for_device(dev, iu->dma, len, DMA_TO_DEVICE); > [ ... ] Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
