linux/include
Tom Lendacky cfaed10d1f scatterlist: introduce sg_nents_for_len
When performing a dma_map_sg() call, the number of sg entries to map is
required. Using sg_nents to retrieve the number of sg entries will
return the total number of entries in the sg list up to the entry marked
as the end. If there happen to be unused entries in the list, these will
still be counted. Some dma_map_sg() implementations will not handle the
unused entries correctly (lib/swiotlb.c) and execute a BUG_ON.

The sg_nents_for_len() function will traverse the sg list and return the
number of entries required to satisfy the supplied length argument. This
can then be supplied to the dma_map_sg() call to successfully map the
sg.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2015-06-03 10:51:27 +08:00
..
acpi Merge branch 'device-properties' 2015-04-13 00:35:54 +02:00
asm-generic Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-04-14 21:03:26 -07:00
clocksource
crypto crypto: aead - Add multiple algorithm registration interface 2015-06-03 10:48:35 +08:00
drm drm/ttm: device address space != CPU address space 2015-03-05 09:04:39 +10:00
dt-bindings Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds 2015-04-15 15:48:28 -07:00
keys
kvm KVM/ARM changes for v4.1: 2015-04-07 18:09:20 +02:00
linux scatterlist: introduce sg_nents_for_len 2015-06-03 10:51:27 +08:00
math-emu
media
memory
misc
net ipsec: Add IV generator information to xfrm_state 2015-05-28 11:23:20 +08:00
pcmcia
ras
rdma
rxrpc RxRPC: Handle VERSION Rx protocol packets 2015-04-01 16:31:26 +01:00
scsi libata-eh: Set 'information' field for autosense 2015-03-27 11:59:22 -04:00
soc pm: at91: Workaround DDRSDRC self-refresh bug with LPDDR1 memories. 2015-03-03 19:43:59 +01:00
sound ASoC: Updates for v4.1 2015-04-13 14:14:29 +02:00
target target: do not reject FUA CDBs when write cache is enabled but emulate_write_cache is 0 2015-03-19 23:26:46 -07:00
trace mm: cma: add trace events for CMA allocations and freeings 2015-04-15 16:35:19 -07:00
uapi sound updates for 4.1-rc1 2015-04-15 15:41:41 -07:00
video
xen
Kbuild