scsi: mptfusion: Don't use GFP_ATOMIC for larger DMA allocations
authorChristoph Hellwig <hch@lst.de>
Wed, 24 Jun 2020 16:57:24 +0000 (18:57 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 27 Jun 2020 02:51:53 +0000 (22:51 -0400)
commit311950f8b8d80ba41aa09a26bcaf0c2231f8d264
tree5543f1dda59ea8592fe5acdf490066823e0461ef
parent823a65409c8990f64c5693af98ce0e7819975cba
scsi: mptfusion: Don't use GFP_ATOMIC for larger DMA allocations

The mpt fusion driver still uses the legacy PCI DMA API which hardcodes
atomic allocations.  This caused the driver to fail to load on some powerpc
VMs with incoherent DMA and small memory sizes.  Switch to use the modern
DMA API and sleeping allocations for large allocations instead.  This is
not a full cleanup of the PCI DMA API usage yet, but just enough to fix the
regression caused by reducing the default atomic pool size.

Link: https://lore.kernel.org/r/20200624165724.1818496-1-hch@lst.de
Fixes: 3ee06a6d532f ("dma-pool: fix too large DMA pools on medium memory size systems")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/message/fusion/mptbase.c