Repository navigation
wifi: mt7932: keep RX0 status in the RAM-config acknowledgment - #273
Merged
Merged
Conversation
Since "acknowledge interrupts before servicing the rings", mt_service() clears the interrupt causes it is about to service, RX0 included, before it drains the rings, and restores the interrupt mask after the last ring. The RAM-config acknowledgment in mt_rx_drain() still clears RX0's status bit and rewrites the mask in the middle of the drain. The status write can clear the bit of an RX0 completion that arrived after the up-front acknowledgment, so the device no longer shows work that is still pending, and the unmask lets the interrupt fire again while the rings are still being serviced, with the fixed IRQ_MASK rather than m->irq_mask. Clear only the acknowledgment's other two status bits there, and leave the mask to mt_service(). The diagnostic drain on a command timeout runs with the interrupt line disabled; a bit it leaves set is serviced once the line is enabled again. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The firmware-download RAM-config acknowledgment clears RX0 status and rewrites the interrupt mask while mt_service() is still draining the rings. It can discard an RX0 completion that arrived after the up-front acknowledgment and unmask the interrupt too early.
Clear only the acknowledgment's other status bits and leave RX0 status and interrupt-mask restoration to mt_service(). This follows the interrupt-ack ordering fix already on the integration branch.
Validation: the J700 build and W=1 check passed without diagnostics, and static/copy checks are clean. Neo boot/download review, five complete firmware leaf-reload cycles with fresh per-cycle evidence, DHCP-ready association and zero gateway loss passed. A complete120-second bidirectional TCP run and20 scans passed with no kernel transport/recovery errors, followed by zero-loss gateway pings and an orderly boot restoring Bluetooth/Wi-Fi. Upload had17 zero-rate intervals during scanning; those are recorded and are not claimed fixed.
The original reload test failed because recursive dependency removal recycled cfg80211 beneath the persistent supplicant; an initial corrected test also checked the gateway just before DHCP completed. Both failed attempts are retained. The successful qualification coordinates normal interface removal, keeps cfg80211 and the supplicant identity stable, and removes only the Wi-Fi leaf. Bluetooth's existing cold-admission guard remains unchanged; it was deliberately unloaded for the isolated test and restored by an orderly boot. No reset/admission bypass or kernel workaround was added. Final merged-public-head build and qualification remain release gates. The timing race itself is covered by source review; the hardware test checks that the handshake and receive path remain functional.