[PATCH v5 02/14] gpu: nova-core: gsp: cmdq: simplify framing error description

From: Alexandre Courbot

Date: Tue Oct 20 2026 - 06:23:16 EST


Use simpler and more precise language to explain the conditions in which
`EIO` is returned.

Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxx>
---
drivers/gpu/nova-core/gsp/cmdq.rs | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/nova-core/gsp/cmdq.rs b/drivers/gpu/nova-core/gsp/cmdq.rs
index accfc1d20d28..1bd15fc0aef2 100644
--- a/drivers/gpu/nova-core/gsp/cmdq.rs
+++ b/drivers/gpu/nova-core/gsp/cmdq.rs
@@ -775,8 +775,7 @@ fn send_command<M>(&mut self, command: M) -> Result
/// # Errors
///
/// - `ETIMEDOUT` if `timeout` has elapsed before any message becomes available.
- /// - `EIO` if there was some inconsistency (e.g. message shorter than advertised) on the
- /// message queue.
+ /// - `EIO` if a message fails framing or checksum validation.
fn wait_for_msg(&self, timeout: Delta) -> Result<GspMessage<'_>> {
// Wait for a message to arrive from the GSP.
let (slice_1, slice_2) = read_poll_timeout(
@@ -849,8 +848,7 @@ fn wait_for_msg(&self, timeout: Delta) -> Result<GspMessage<'_>> {
/// # Errors
///
/// - `ETIMEDOUT` if `timeout` has elapsed before any message becomes available.
- /// - `EIO` if there was some inconsistency (e.g. message shorter than advertised) on the
- /// message queue.
+ /// - `EIO` if a message fails framing or checksum validation.
/// - `ENOMSG` if the message was not the awaited reply.
///
/// Error codes returned by [`MessageFromGsp::read`] are propagated as-is.
@@ -902,7 +900,7 @@ fn receive_msg<M: MessageFromGsp>(&mut self, timeout: Delta) -> Result<M>
///
/// - `ETIMEDOUT` if no message of type `M` arrives before the deadline, however many other
/// messages arrive while waiting.
- /// - `EIO` if a message fails framing or checksum validation (see [`Self::wait_for_msg`]).
+ /// - `EIO` if a message fails framing or checksum validation.
///
/// Error codes returned by [`MessageFromGsp::read`] are propagated as-is.
fn await_msg<M: MessageFromGsp>(&mut self) -> Result<M>

--
2.56.0