All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] fix dma_unmap_sg() parameter in some scsi drivers
@ 2018-01-04  2:36 chenxiang
  2018-01-04  2:36 ` [PATCH v2 1/4] scsi: ibmvscsis: fix dma_unmap_sg() parameter chenxiang
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: chenxiang @ 2018-01-04  2:36 UTC (permalink / raw)
  To: martin.petersen, jejb
  Cc: john.garry, linux-scsi, linuxarm, bryantly, mikecyr,
	artur.paszkiewicz, dan.j.williams, yuxiangl, jgarzik, jack_wang,
	lindar_liu, 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(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-01-23  0:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-04  2:36 [PATCH v2 0/4] fix dma_unmap_sg() parameter in some scsi drivers chenxiang
2018-01-04  2:36 ` [PATCH v2 1/4] scsi: ibmvscsis: fix dma_unmap_sg() parameter chenxiang
2018-01-04  2:36 ` [PATCH v2 2/4] scsi: isci: " chenxiang
2018-01-04  2:36 ` [PATCH v2 3/4] scsi: mvsas: " chenxiang
2018-01-04  2:36 ` [PATCH v2 4/4] scsi: pm8001: " chenxiang
2018-01-08  8:53   ` chenxiang (M)
2018-01-22  7:50 ` [PATCH v2 0/4] fix dma_unmap_sg() parameter in some scsi drivers chenxiang (M)
2018-01-23  0:45   ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.