mirror of
https://github.com/torvalds/linux.git
synced 2026-05-13 00:28:54 +02:00
ib_dma_map_sg() modifies the provided scatterlist and returns the
number of mapped entries, which can be fewer than the requested
mr->sgt.nents if the DMA controller coalesces contiguous memory
segments. Passing the original, uncoalesced count to ib_map_mr_sg()
causes memory registration failures if coalescing actually occurs.
Capture the actual mapped count returned by ib_dma_map_sg() and pass it
to ib_map_mr_sg() to ensure correct MR registration.
Also update the ib_dma_map_sg() error logging to drop the error
pointer formatting, since the return value is an integer count
rather than an error code.
Ensure a proper error code (-EIO) is assigned when DMA mapping or
MR registration fails.
Fixes:
|
||
|---|---|---|
| .. | ||
| accept.c | ||
| connect.c | ||
| connection.c | ||
| debug.c | ||
| devices.c | ||
| internal.h | ||
| Kconfig | ||
| listen.c | ||
| main.c | ||
| Makefile | ||
| mr.c | ||
| pdu.h | ||
| rw.c | ||
| socket.c | ||
| socket.h | ||