[PATCH] mmc: core: Only set maximum DMA segment size if DMA is supported

Christoph Hellwig hch at lst.de
Thu Sep 26 00:35:01 PDT 2024


On Tue, Sep 24, 2024 at 02:01:23PM -0700, Guenter Roeck wrote:
> Since upstream commit 334304ac2bac ("dma-mapping: don't return errors
> from dma_set_max_seg_size") calling dma_set_max_seg_size() on a device
> not supporting DMA results in a warning traceback. This is seen when
> booting the sifive_u machine from SD. The underlying SPI controller
> (sifive,spi0 compatible) explicitly sets dma_mask to NULL.
> 
> Avoid the backtrace by only calling dma_set_max_seg_size() if DMA is
> supported.

Technicall this looks fine, although it would be nice avoid the overly
long line.

Reviewed-by: Christoph Hellwig <hch at lst.de>




More information about the linux-riscv mailing list