Hi, does anyone notice and review this issue?

在 2018/1/4 10:36, chenxiang 写道:
According to Documentation/DMA-API.txt, all the parameters of dma_unmap_sg()
must be the same as those and passed in to the scatter/gather mapping API.
But in scsi drivers such as ibmscsi_tgt/iscsi/mvsas/pm8001, the <nents>
parameter of dma_unmap_sg() is number of elements after mapping. So fix them.

Part of the document is as follows:

        void
        dma_unmap_sg(struct device *dev, struct scatterlist *sg,
                        int nents, enum dma_data_direction direction)
                                
Unmap the previously mapped scatter/gather list.  All the parameters
must be the same as those and passed in to the scatter/gather mapping
API.
                                
Note: <nents> must be the number you passed in, *not* the number of
        DMA address entries returned.

Chang Log:
v1 -> v2:
        Split the patch into small patchset, and one patch per driver;

chenxiang (4):
   scsi: ibmvscsis: fix dma_unmap_sg() parameter
   scsi: isci: fix dma_unmap_sg() parameter
   scsi: mvsas: fix dma_unmap_sg() parameter
   scsi: pm8001: fix dma_unmap_sg() parameter

  drivers/scsi/ibmvscsi_tgt/libsrp.c | 6 ++++--
  drivers/scsi/isci/request.c        | 2 +-
  drivers/scsi/mvsas/mv_sas.c        | 4 ++--
  drivers/scsi/pm8001/pm8001_sas.c   | 2 +-
  4 files changed, 8 insertions(+), 6 deletions(-)



Reply via email to