]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
accel/qaic: Retain bootlogs that overflow
authorZack McKevitt <zmckevit@qti.qualcomm.com>
Tue, 23 Dec 2025 17:05:11 +0000 (18:05 +0100)
committerJeff Hugo <jeff.hugo@oss.qualcomm.com>
Fri, 27 Mar 2026 17:25:36 +0000 (11:25 -0600)
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 <zmckevit@qti.qualcomm.com>
Signed-off-by: Troy Hanson <thanson@qti.qualcomm.com>
Signed-off-by: Youssef Samir <youssef.abdulrahman@oss.qualcomm.com>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Link: https://patch.msgid.link/20251223170511.2277302-1-youssef.abdulrahman@oss.qualcomm.com
drivers/accel/qaic/qaic_debugfs.c

index eca0b1fa1c14c8fb3b7c593f0904785ffe617137..95c78e12dd61b63e6f6612cfc694c71ad3bfe630 100644 (file)
@@ -263,8 +263,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;
        }