aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fpga/xilinx-core.c
diff options
context:
space:
mode:
authorStephan Gerhold <[email protected]>2025-02-12 17:03:54 +0000
committerVinod Koul <[email protected]>2025-08-11 05:22:43 +0000
commit5068b5254812433e841a40886e695633148d362d (patch)
treeb8424f7a5aba1fc1052447ff386a8dbcaeebe8dc /drivers/fpga/xilinx-core.c
parentdt-bindings: dma: qcom: bam-dma: Add missing required properties (diff)
downloadkernel-5068b5254812433e841a40886e695633148d362d.tar.gz
kernel-5068b5254812433e841a40886e695633148d362d.zip
dmaengine: qcom: bam_dma: Fix DT error handling for num-channels/ees
When we don't have a clock specified in the device tree, we have no way to ensure the BAM is on. This is often the case for remotely-controlled or remotely-powered BAM instances. In this case, we need to read num-channels from the DT to have all the necessary information to complete probing. However, at the moment invalid device trees without clock and without num-channels still continue probing, because the error handling is missing return statements. The driver will then later try to read the number of channels from the registers. This is unsafe, because it relies on boot firmware and lucky timing to succeed. Unfortunately, the lack of proper error handling here has been abused for several Qualcomm SoCs upstream, causing early boot crashes in several situations [1, 2]. Avoid these early crashes by erroring out when any of the required DT properties are missing. Note that this will break some of the existing DTs upstream (mainly BAM instances related to the crypto engine). However, clearly these DTs have never been tested properly, since the error in the kernel log was just ignored. It's safer to disable the crypto engine for these broken DTBs. [1]: https://lore.kernel.org/r/[email protected]/ [2]: https://lore.kernel.org/r/[email protected]/ Cc: [email protected] Fixes: 48d163b1aa6e ("dmaengine: qcom: bam_dma: get num-channels and num-ees from dt") Signed-off-by: Stephan Gerhold <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
Diffstat (limited to 'drivers/fpga/xilinx-core.c')
0 files changed, 0 insertions, 0 deletions