Re: [PATCH 2/2] FC pass through support - revised III

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 11 Nov 2008 18:41:49 +0900
FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx> wrote:

> > +	req_sg_cnt = dma_map_sg(&ha->pdev->dev, service->sg_req,
> > +	    service->req_sg_cnt, DMA_TO_DEVICE);
> > +	if (!req_sg_cnt)
> > +		goto pt_error1;
> > +	rsp_sg_cnt = dma_map_sg(&ha->pdev->dev, service->sg_rsp,
> > +	    service->rsp_sg_cnt, DMA_FROM_DEVICE);
> > +	if (!rsp_sg_cnt)
> > +		goto pt_error2;
> > +
> > +	copy_size = sg_copy_to_buffer(service->sg_req, req_sg_cnt,
> > +	    els_pkt, 20);
> 
> You need to use service->sg_rsp instead of req_sg_cnt here.

Oops, I meant that you need to use service->req_sg_cnt instead of
req_sg_cnt (the returned value of dma_map_sg).


> sg_copy_to_buffer takes the number entry of scatter gather. dma_map_sg
> returns the number of physical segments mapped. They could be
> different (when IOMMU merges the entries).
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux