alpha: return error code from alpha_pci_map_sg()
authorMartin Oliveira <martin.oliveira@eideticom.com>
Thu, 29 Jul 2021 20:15:23 +0000 (14:15 -0600)
committerChristoph Hellwig <hch@lst.de>
Mon, 9 Aug 2021 15:13:05 +0000 (17:13 +0200)
commitca33d26ac640bdf74e5fd0fcd711dbc5ab9f36c0
tree3318cf418a51e69b765b9581a9dfd83641c67417
parentdabb16f67215918c48cf3ff1fc4bc36ca421da2b
alpha: return error code from alpha_pci_map_sg()

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

pci_map_single_1() can fail for different reasons, but since the only
supported type of error return is DMA_MAPPING_ERROR, we coalesce those
errors into EIO.

ENOMEM is returned when no page tables can be allocated.

Signed-off-by: Martin Oliveira <martin.oliveira@eideticom.com>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
arch/alpha/kernel/pci_iommu.c