Skip to content
Unverified Commit 6ece49c5 authored by Cristian Ciocaltea's avatar Cristian Ciocaltea Committed by Mark Brown
Browse files

spi: amd: Limit max transfer and message size

Enabling the SPI CS35L41 audio codec driver for Steam Deck [1]
revealed a problem with the current AMD SPI controller driver
implementation, consisting of an unrecoverable system hang.

The issue can be prevented if we ensure the max transfer size
and the max message size do not exceed the FIFO buffer size.

According to the implementation of the downstream driver, the
AMD SPI controller is not able to handle more than 70 bytes per
transfer, which corresponds to the size of the FIFO buffer.

Hence, let's fix this by setting the SPI limits mentioned above.

[1] https://lore.kernel.org/r/20220621213819.262537-1-cristian.ciocaltea@collabora.com



Reported-by: default avatarAnastasios Vacharakis <vacharakis@o2mail.de>
Fixes: bbb336f3 ("spi: spi-amd: Add AMD SPI controller driver support")
Signed-off-by: default avatarCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Link: https://lore.kernel.org/r/20220706100626.1234731-2-cristian.ciocaltea@collabora.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f2906aa8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment