From: Zack McKevitt <[email protected]>

When a bootlog requires multiple MHI messages to transfer fully, the
messages prior to the final message may have MHI overflow status set.
Preserve these log messages in the accumulating bootlog. Do not treat
overflow as an error.

Signed-off-by: Zack McKevitt <[email protected]>
Signed-off-by: Troy Hanson <[email protected]>
Signed-off-by: Youssef Samir <[email protected]>
---
 drivers/accel/qaic/qaic_debugfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/accel/qaic/qaic_debugfs.c 
b/drivers/accel/qaic/qaic_debugfs.c
index 8dc4fe5bb560..8623e8464c5d 100644
--- a/drivers/accel/qaic/qaic_debugfs.c
+++ b/drivers/accel/qaic/qaic_debugfs.c
@@ -265,8 +265,9 @@ static void qaic_bootlog_mhi_dl_xfer_cb(struct mhi_device 
*mhi_dev, struct mhi_r
 {
        struct qaic_device *qdev = dev_get_drvdata(&mhi_dev->dev);
        struct bootlog_msg *msg = mhi_result->buf_addr;
+       int status = mhi_result->transaction_status;
 
-       if (mhi_result->transaction_status) {
+       if (status && status != -EOVERFLOW) {
                devm_kfree(&qdev->pdev->dev, msg);
                return;
        }
-- 
2.43.0

Reply via email to