rockchip64: rewrite patches of current and edge#9829
Conversation
📝 WalkthroughWalkthroughThis PR updates the Armbian build system with kernel patches for RK3399 Type-C and device drivers across kernel versions 6.18 and 7.0. It introduces a virtual Type-C PD extcon driver, fixes USB power delivery capability registration to prevent duplicates, and applies targeted adjustments to network driver MTU validation, RTC disabling, DMA error handling, and serial UART SysRq functionality. ChangesType-C USB Power Delivery: Virtual PD Extcon and TCPM Fixes
Network Device and Core Driver Adjustments
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
patch/kernel/archive/rockchip64-6.18/temporary-workaround-dma-reset.patch (1)
24-27:⚠️ Potential issue | 🟠 Major | 🏗️ Heavy liftDon’t suppress DMA reset failures globally.
Forcing success after
stmmac_reset()failure can continue init with undefined DMA state. Please gate this workaround behind a Rockchip-specific quirk/compatible check and keep fail-fast behavior for other platforms.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@patch/kernel/archive/rockchip64-6.18/temporary-workaround-dma-reset.patch` around lines 24 - 27, The change currently converts a DMA reset error into a warning unconditionally; instead, only suppress the failure for Rockchip platforms: after the stmmac_reset() call and before converting the error to success, check the device's platform/compatible (e.g., using priv->dev->of_node with of_device_is_compatible(...) or the driver’s Rockchip-specific quirk/match helper). If the device is Rockchip-compatible, log the warning with netdev_warn(priv->dev, ...) and set ret = 0; otherwise keep the original fail-fast behavior by leaving netdev_err(priv->dev, ...) and returning ret from the function. Ensure the check references stmmac_reset(), priv->dev, and the netdev_warn/netdev_err paths so only Rockchip devices get the workaround.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@patch/kernel/archive/rockchip64-6.18/temporary-workaround-dma-reset.patch`:
- Around line 24-27: The change currently converts a DMA reset error into a
warning unconditionally; instead, only suppress the failure for Rockchip
platforms: after the stmmac_reset() call and before converting the error to
success, check the device's platform/compatible (e.g., using priv->dev->of_node
with of_device_is_compatible(...) or the driver’s Rockchip-specific quirk/match
helper). If the device is Rockchip-compatible, log the warning with
netdev_warn(priv->dev, ...) and set ret = 0; otherwise keep the original
fail-fast behavior by leaving netdev_err(priv->dev, ...) and returning ret from
the function. Ensure the check references stmmac_reset(), priv->dev, and the
netdev_warn/netdev_err paths so only Rockchip devices get the workaround.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: df3c3dc0-9f55-449a-b00f-ccb2d2418511
📒 Files selected for processing (14)
patch/kernel/archive/rockchip64-6.18/general-add-miniDP-virtual-extcon.patchpatch/kernel/archive/rockchip64-6.18/general-disable-mtu-validation.patchpatch/kernel/archive/rockchip64-6.18/general-possibility-of-disabling-rk808-rtc.patchpatch/kernel/archive/rockchip64-6.18/rk3399-usbc-Revert-usb-typec-tcpm-unregister-existing-source-cap.patchpatch/kernel/archive/rockchip64-6.18/rk3399-usbc-usb-typec-tcpm-Fix-PD-devices-capabilities-registrat.patchpatch/kernel/archive/rockchip64-6.18/rk3399-usbc-usb-typec-tcpm-Unregister-altmodes-before-registerin.patchpatch/kernel/archive/rockchip64-6.18/temporary-workaround-dma-reset.patchpatch/kernel/archive/rockchip64-7.0/general-add-miniDP-virtual-extcon.patchpatch/kernel/archive/rockchip64-7.0/general-disable-mtu-validation.patchpatch/kernel/archive/rockchip64-7.0/general-possibility-of-disabling-rk808-rtc.patchpatch/kernel/archive/rockchip64-7.0/general-serial-8250-fix-sysrq-break-dw-apb.patchpatch/kernel/archive/rockchip64-7.0/rk3399-usbc-Revert-usb-typec-tcpm-unregister-existing-source-cap.patchpatch/kernel/archive/rockchip64-7.0/rk3399-usbc-usb-typec-tcpm-Fix-PD-devices-capabilities-registrat.patchpatch/kernel/archive/rockchip64-7.0/rk3399-usbc-usb-typec-tcpm-Unregister-altmodes-before-registerin.patch
as per title
rewrite for latest upstream patch version
no further tests, rewrite only
Summary by CodeRabbit
New Features
Bug Fixes
Revert