]> www.infradead.org Git - users/hch/dma-mapping.git/commit
ia64/sba_iommu: return error code from sba_map_sg_attrs()
authorMartin Oliveira <martin.oliveira@eideticom.com>
Thu, 29 Jul 2021 20:15:26 +0000 (14:15 -0600)
committerChristoph Hellwig <hch@lst.de>
Mon, 9 Aug 2021 15:13:05 +0000 (17:13 +0200)
commit62af5ca50c29a9be266656dfb88db6d439d129a1
tree5e1e2624facf4b59e4ce8ebb1cdedc7f9272c637
parent9cf88ec5e0e876c959389b1e695438f98663b92d
ia64/sba_iommu: return error code from sba_map_sg_attrs()

The .map_sg() op now expects an error code instead of zero on failure.

In the case of a dma_mapping_error() return -EIO as the actual cause
is opaque here.

sba_coalesce_chunks() may only presently fail if sba_alloc_range()
fails, which in turn only fails if the iommu is out of mapping
resources, hence a -ENOMEM is used in that case.

Signed-off-by: Martin Oliveira <martin.oliveira@eideticom.com>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Niklas Schnelle <schnelle@linux.ibm.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
arch/ia64/hp/common/sba_iommu.c