Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

risc-v/mpfs: usb: don't try nonexistent ep int flags #189

Merged
merged 1 commit into from
Dec 1, 2023
Merged

Conversation

eenurkka
Copy link

Currently the irq handler checks many reserved bits, which is a waste of resources:

  1. pending_rx_ep bit 0 is reserved (always 0)
  2. pending_rx_ep and pending_tx_ep have only bits 1, 2, 3 and 4 defined, no need to scan MPFS_USB_NENDPOINTS (9) bits as the rest are reserved

Fix this by checking only the relevant bits.

Summary

A brief performance fix

Impact

Testing

Saluki-v2 / QGroundControl app

Currently the irq handler checks many reserved bits, which is
a waste of resources:

1. pending_rx_ep bit 0 is reserved (always 0)
2. pending_rx_ep and pending_tx_ep have only bits 1, 2, 3 and 4
   defined, no need to scan MPFS_USB_NENDPOINTS (9) bits as the
   rest are reserved

Fix this by checking only the relevant bits.

Signed-off-by: Eero Nurkkala <[email protected]>
@eenurkka eenurkka requested review from pussuw and jlaitine November 30, 2023 07:47
@eenurkka eenurkka merged commit 19b862a into master Dec 1, 2023
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants