Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

memory: tegra186-emc: Handle errors in BPMP response

The return value from tegra_bpmp_transfer indicates the success or
failure of the IPC transaction with BPMP. If the transaction
succeeded, we also need to check the actual command's result code.
Add code to do this.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Link: https://lore.kernel.org/r/20210915085517.1669675-3-mperttunen@nvidia.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

authored by

Mikko Perttunen and committed by
Krzysztof Kozlowski
13324edb 77b14c9d

+4
+4
drivers/memory/tegra/tegra186-emc.c
··· 197 197 dev_err(&pdev->dev, "failed to EMC DVFS pairs: %d\n", err); 198 198 goto put_bpmp; 199 199 } 200 + if (msg.rx.ret < 0) { 201 + dev_err(&pdev->dev, "EMC DVFS MRQ failed: %d (BPMP error code)\n", msg.rx.ret); 202 + goto put_bpmp; 203 + } 200 204 201 205 emc->debugfs.min_rate = ULONG_MAX; 202 206 emc->debugfs.max_rate = 0;