diff options
author | Richard Fitzgerald <rf@opensource.cirrus.com> | 2022-12-02 17:18:11 +0100 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-01-09 17:06:08 +0100 |
commit | 827c32d0df4bbe0d1c47d79f6a5eabfe9ac75216 (patch) | |
tree | 08ca3ffcf058420e0f69adaa7ddcc4f92aeb9d80 /drivers/base | |
parent | soundwire: cadence: Don't overflow the command FIFOs (diff) | |
download | linux-827c32d0df4bbe0d1c47d79f6a5eabfe9ac75216.tar.xz linux-827c32d0df4bbe0d1c47d79f6a5eabfe9ac75216.zip |
soundwire: cadence: Remove wasted space in response_buf
The response_buf was declared much larger (128 entries) than the number
of responses that could ever be written into it. The Cadence IP is
configurable up to a maximum of 32 entries, and the datasheet says
that RX_FIFO_AVAIL can be 2 larger than this. So allow up to 34
responses.
Also add checking in cdns_read_response() to prevent overflowing
reponse_buf if RX_FIFO_AVAIL contains an unexpectedly large number.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20221202161812.4186897-3-rf@opensource.cirrus.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/base')
0 files changed, 0 insertions, 0 deletions