Skip to content

Backport RTL8125D (rev C, XID 688) support#4011

Merged
sairon merged 2 commits into
devfrom
backport-rtl8125d-support
Apr 9, 2025
Merged

Backport RTL8125D (rev C, XID 688) support#4011
sairon merged 2 commits into
devfrom
backport-rtl8125d-support

Conversation

@sairon
Copy link
Copy Markdown
Member

@sairon sairon commented Apr 9, 2025

Apply mainline patch adding support for NIC present e.g. on ASUS NUC 14 Essential.

Fixes #3880

Summary by CodeRabbit

  • New Features
    • Added support for the RTL8125D network chip, enhancing compatibility with newer hardware models.
  • Chores
    • Updated a core dependency to the latest stable version for improved performance and maintainability.

Apply mainline patch adding support for NIC present e.g. on ASUS NUC 14
Essential.

Fixes #3880
@sairon sairon added board/ova Open Virtual Appliance (Virtual Machine) linux Linux kernel related issue board/generic-x86-64 Generic x86-64 Boards (like Intel NUC) board/generic-aarch64 Generic aarch64 machine labels Apr 9, 2025
@sairon sairon requested a review from agners April 9, 2025 14:10
@sairon
Copy link
Copy Markdown
Member Author

sairon commented Apr 9, 2025

Requires: home-assistant/buildroot#83

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 9, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The changes update the subproject commit for buildroot and introduce modifications to the r8169 driver through a patch. The patch adds support for the RTL8125D network chip by incorporating a new firmware definition, a new enumeration value, and functions to initialize the hardware and configure the PHY. Control flow adjustments in the driver ensure that RTL8125D is recognized and handled appropriately during device initialization.

Changes

File(s) Change Summary
buildroot Updated subproject commit reference from 4cd211162de8b74461c2684bd89b89047f0ecb61 to 5379c358bf5157bdab42dd187b9859e2d9b378c7.
buildroot-external/patches/linux/0002-r8169-add-support-for-RTL8125D.patch, drivers/net/ethernet/realtek/r8169.h, drivers/net/ethernet/realtek/r8169_main.c, drivers/net/ethernet/realtek/r8169_phy_config.c Added support for the RTL8125D chip in the r8169 driver. Introduced a new enumeration value (RTL_GIGA_MAC_VER_64), firmware definition (FIRMWARE_8125D_1), and functions (rtl_hw_start_8125d and rtl8125d_hw_phy_config), with corresponding control flow modifications.

Sequence Diagram(s)

sequenceDiagram
    participant OS as Operating System
    participant Driver as r8169 Driver
    participant HW as RTL8125D Hardware

    OS->>Driver: Initialize network interface
    Driver->>Driver: Identify chip version
    alt Chip is RTL8125D
        Driver->>Driver: Execute rtl_hw_start_8125d()
        Driver->>Driver: Execute rtl8125d_hw_phy_config()
    else Other Chip
        Driver->>Driver: Standard initialization
    end
    Driver->>OS: Report network status
Loading

Assessment against linked issues

Objective Addressed Explanation
Support for Realtek RTL8125 LAN controller (#3880)

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 856ed0d and 557eeaf.

📒 Files selected for processing (1)
  • buildroot (1 hunks)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sairon sairon force-pushed the backport-rtl8125d-support branch 2 times, most recently from 856ed0d to 557eeaf Compare April 9, 2025 14:37
* buildroot 4cd211162d...5379c358bf (1):
  > linux-firmware: add RTL8125D firmware
@sairon sairon merged commit fc984b9 into dev Apr 9, 2025
2 of 3 checks passed
@sairon sairon deleted the backport-rtl8125d-support branch April 9, 2025 14:38
This was referenced Apr 11, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

board/generic-aarch64 Generic aarch64 machine board/generic-x86-64 Generic x86-64 Boards (like Intel NUC) board/ova Open Virtual Appliance (Virtual Machine) cla-signed linux Linux kernel related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Realtek RTL8125 ethernet Lan not supported by HA OS (ASUS NUC 14 essential)

2 participants