Skip to content

Conversation

Wiwynn-Evan
Copy link

[Issue Description]

  • System crashes with assertion failure when I3C slave receives data but no userspace application callback is registered
  • The __ASSERT(0, "flush rx fifo is TBD") causes system halt

[Root Cause]

  • When master writes data to I3C slave device, the driver expects a callback function to handle the received data
  • If no callback is registered, the driver hits an assertion and crashes instead of gracefully handling the situation
  • RX FIFO data remains unread, potentially causing hardware buffer overflow

[Solution]

  • Replace __ASSERT with LOG_WRN to provide non-fatal warning message
  • Implement RX FIFO flushing mechanism when no callback is available
  • Add null pointer checks in i3c_aspeed_rd_rx_fifo() to safely handle flush operations
  • Ensure hardware RX FIFO is properly cleared to prevent buffer overflow

# [Issue Description]
- System crashes with assertion failure when I3C slave receives data but no userspace application callback is registered
- The __ASSERT(0, "flush rx fifo is TBD") causes system halt

# [Root Cause]
- When master writes data to I3C slave device, the driver expects a callback function to handle the received data
- If no callback is registered, the driver hits an assertion and crashes instead of gracefully handling the situation
- RX FIFO data remains unread, potentially causing hardware buffer overflow

# [Solution]
- Replace __ASSERT with LOG_WRN to provide non-fatal warning message
- Implement RX FIFO flushing mechanism when no callback is available
- Add null pointer checks in i3c_aspeed_rd_rx_fifo() to safely handle flush operations
- Ensure hardware RX FIFO is properly cleared to prevent buffer overflow
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 11, 2025
@facebook-github-bot
Copy link
Contributor

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this in D79976748. (Because this pull request was imported automatically, there will not be any future comments.)

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 05e3c0d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants