net: macb: Fix RX ring refill issue after link up#7222
Merged
pelwell merged 1 commit intoraspberrypi:rpi-6.12.yfrom Feb 6, 2026
Merged
net: macb: Fix RX ring refill issue after link up#7222pelwell merged 1 commit intoraspberrypi:rpi-6.12.yfrom
pelwell merged 1 commit intoraspberrypi:rpi-6.12.yfrom
Conversation
When the link goes down, the receive pipeline is cleared but the RX queue pointer register remains unchanged. This causes a critical issue where some RX ring entries may contain invalid addresses after link up. The problem manifests when: 1. An entry with an invalid address prevents rx_tail from advancing (gem_rx() checks rxused as 0) 2. No gap exists between rx_prepared_head and rx_tail from previous refill operations 3. gem_rx_refill() cannot refill entries because CIRC_SPACE() always returns 0 4. RSR register reports exception with value 0x7 5. The hardware detected that the buffer was unavailable. The DMA will reread the pointer each time it receives an end-of-frame signal until a valid pointer is found, but the software cannot fill it. This regression was introduced by commit 99537d5 which moved mog_init_rings() from macb_mac_link_up() to macb_open(), leaving the RX ring in an inconsistent state after link transitions. Fix this by: - Reinitializing RX rings on link up via mog_init_rings() - Adding full_refill atomic counter to force complete ring refill - Ensuring all entries are traversed and refilled after link up - Resetting rx_tail and rx_prepared_head to 0 Fixes: 99537d5 ("net: macb: Relocate mog_init_rings() callback from macb_mac_link_up() to macb_open()") Closes: raspberrypi#7200 (comment) Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
popcornmix
added a commit
to raspberrypi/firmware
that referenced
this pull request
Feb 6, 2026
See: raspberrypi/linux#7205 kernel: Adds a driver for the new series of Studio DAC8x soundcards See: raspberrypi/linux#7197 kernel: configs: enable CONFIG_CRYPTO_LZ4HC=m and support bcachefs-tools dkms build See: raspberrypi/linux#7208 kernel: misc: rp1-pio: Defer for out-of-order probing See: raspberrypi/linux#7215 kernel: pcie-brcmstb: move the unilateral disable of CLKREQ# before link-up See: raspberrypi/linux#7225 kernel: configs: enable Si5351 i2c common clock driver See: raspberrypi/linux#7223 kernel: net: macb: Fix RX ring refill issue after link up See: raspberrypi/linux#7222 kernel: overlays: Add a pins_none parameter to audremap See: raspberrypi/linux#7229 kernel: Add support for pps-rp1 dtoverlay See: raspberrypi/linux#7209
popcornmix
added a commit
to raspberrypi/rpi-firmware
that referenced
this pull request
Feb 6, 2026
See: raspberrypi/linux#7205 kernel: Adds a driver for the new series of Studio DAC8x soundcards See: raspberrypi/linux#7197 kernel: configs: enable CONFIG_CRYPTO_LZ4HC=m and support bcachefs-tools dkms build See: raspberrypi/linux#7208 kernel: misc: rp1-pio: Defer for out-of-order probing See: raspberrypi/linux#7215 kernel: pcie-brcmstb: move the unilateral disable of CLKREQ# before link-up See: raspberrypi/linux#7225 kernel: configs: enable Si5351 i2c common clock driver See: raspberrypi/linux#7223 kernel: net: macb: Fix RX ring refill issue after link up See: raspberrypi/linux#7222 kernel: overlays: Add a pins_none parameter to audremap See: raspberrypi/linux#7229 kernel: Add support for pps-rp1 dtoverlay See: raspberrypi/linux#7209
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.
[ Patch created by @xiaoleiwang123456 ]
When the link goes down, the receive pipeline is cleared but the RX queue pointer register remains unchanged. This causes a critical issue where some RX ring entries may contain invalid addresses after link up.
The problem manifests when:
This regression was introduced by commit 99537d5 which moved mog_init_rings() from macb_mac_link_up() to macb_open(), leaving the RX ring in an inconsistent state after link transitions.
Fix this by:
Fixes: 99537d5 ("net: macb: Relocate mog_init_rings() callback from macb_mac_link_up() to macb_open()")
Closes: #7200 (comment)