Re: [PATCH update] ieee1394: sbp2: enforce s/g segment size limit

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: FUJITA Tomonori
Date: Wednesday, August 13, 2008 - 5:55 pm

On Wed, 13 Aug 2008 12:19:59 +0200 (CEST)
Stefan Richter <stefanr@s5r6.in-berlin.de> wrote:


You need to keep it? You can access to it via scsi_sg_count when
calling dma_unmap_sg? Seems that firewire code does.



Are you talking about?

=
To unmap a scatterlist, just call:

	pci_unmap_sg(pdev, sglist, nents, direction);

Again, make sure DMA activity has already finished.

PLEASE NOTE:  The 'nents' argument to the pci_unmap_sg call must be
              the _same_ one you passed into the pci_map_sg call,
	      it should _NOT_ be the 'count' value _returned_ from the
              pci_map_sg call.


This is from Documentation/DMA-mapping.txt



I think that all the IOMMUs are fine even if you call dma_unmap_sg
with a 'nents' value that dma_map_sg returned. But, well, it's against
the rule.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Scatter-gather segment merges by IOMMU?, Stefan Richter, (Fri Aug 8, 12:44 pm)
Re: Scatter-gather segment merges by IOMMU?, Grant Grundler, (Fri Aug 8, 1:25 pm)
Re: Scatter-gather segment merges by IOMMU?, Stefan Richter, (Fri Aug 8, 2:21 pm)
Re: Scatter-gather segment merges by IOMMU?, FUJITA Tomonori, (Fri Aug 8, 2:31 pm)
Re: Scatter-gather segment merges by IOMMU?, Stefan Richter, (Fri Aug 8, 2:58 pm)
Re: Scatter-gather segment merges by IOMMU?, FUJITA Tomonori, (Fri Aug 8, 3:17 pm)
[PATCH] ieee1394: sbp2: enforce s/g segment size limit, Stefan Richter, (Sat Aug 9, 11:20 am)
[PATCH] firewire: fw-sbp2: enforce s/g segment size limit, Stefan Richter, (Sat Aug 9, 11:21 am)
Re: [PATCH] ieee1394: sbp2: enforce s/g segment size limit, Grant Grundler, (Tue Aug 12, 10:04 am)
Re: [PATCH] ieee1394: sbp2: enforce s/g segment size limit, FUJITA Tomonori, (Tue Aug 12, 4:44 pm)
Re: [PATCH update] ieee1394: sbp2: enforce s/g segment siz ..., FUJITA Tomonori, (Wed Aug 13, 5:55 pm)