Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #78148 > unrolled thread

Bug#993612: [PATCH v2] of/address: Return an error when no valid dma-ranges are found

Started byRob Herring <robh@kernel.org>
First post2023-01-30 22:50 +0100
Last post2023-01-30 22:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.debian.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Bug#993612: [PATCH v2] of/address: Return an error when no valid dma-ranges are found Rob Herring <robh@kernel.org> - 2023-01-30 22:50 +0100

#78148 — Bug#993612: [PATCH v2] of/address: Return an error when no valid dma-ranges are found

FromRob Herring <robh@kernel.org>
Date2023-01-30 22:50 +0100
SubjectBug#993612: [PATCH v2] of/address: Return an error when no valid dma-ranges are found
Message-ID<FTKch-2hfh-1@gated-at.bofh.it>
On Sat, 28 Jan 2023 17:47:50 +0000, Mark Brown wrote:
> Commit 7a8b64d17e35 ("of/address: use range parser for of_dma_get_range")
> converted the parsing of dma-range properties to use code shared with the
> PCI range parser. The intent was to introduce no functional changes however
> in the case where we fail to translate the first resource instead of
> returning -EINVAL the new code we return 0. Restore the previous behaviour
> by returning an error if we find no valid ranges, the original code only
> handled the first range but subsequently support for parsing all supplied
> ranges was added.
> 
> This avoids confusing code using the parsed ranges which doesn't expect to
> successfully parse ranges but have only a list terminator returned, this
> fixes breakage with so far as I can tell all DMA for on SoC devices on the
> Socionext Synquacer platform which has a firmware supplied DT. A bisect
> identified the original conversion as triggering the issues there.
> 
> Fixes: 7a8b64d17e35 ("of/address: use range parser for of_dma_get_range")
> Signed-off-by: Mark Brown <broonie@kernel.org>
> Cc: Luca Di Stefano <luca.distefano@linaro.org>
> Cc: 993612@bugs.debian.org
> Cc: stable@kernel.org
> ---
> Changes in v2:
> - Don't leak parsed resources.
> - Link to v1: https://lore.kernel.org/r/20230126-synquacer-boot-v1-1-94ed0eb1011f@kernel.org
> ---
>  drivers/of/address.c | 21 +++++++++++++++------
>  1 file changed, 15 insertions(+), 6 deletions(-)
> 

Applied, thanks!

[toc] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web