Skip to content

Commit 5b7712a

Browse files
committed
Add patched AMD XGBE driver for TrueNAS SCALE 25.10.1 (kernel 6.12)
- Patched driver source for kernel 6.12 API changes - kernel-6.12-fix.patch for manual patching - Pre-compiled tarball for easy installation - GitHub Pages documentation
1 parent 8db2d88 commit 5b7712a

25 files changed

+22346
-2
lines changed

README.md

Lines changed: 122 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,122 @@
1-
# asustor-truenas-10gbe-driver
2-
AMD XGBE 10GbE driver patch for ASUSTOR Flashstor Gen2 (FS6812X) on TrueNAS SCALE 25.10+
1+
# AMD XGBE 10GbE Driver for ASUSTOR Flashstor + TrueNAS SCALE
2+
3+
Patched AMD XGBE driver for **ASUSTOR Flashstor Gen2 (FS6812X/FS6806X)** NAS devices running **TrueNAS SCALE 25.10.1+** (kernel 6.12).
4+
5+
## The Problem
6+
7+
The ASUSTOR Flashstor Gen2 has an AMD Ryzen Embedded CPU with an integrated **AMD XGMAC 10GbE NIC** (`[1022:1458]`). This NIC has no driver support out-of-the-box in TrueNAS SCALE — meaning no network on your NAS.
8+
9+
The original patched driver from [mihnea.net](https://mihnea.net/asustor-flashstor-fs6812xfs6806x-experimental-truenas-support/) worked with TrueNAS 24.10.x (kernel 6.6.44), but fails to compile on TrueNAS SCALE 25.10.1+ due to kernel API changes in kernel 6.12.
10+
11+
## The Solution
12+
13+
This repo provides a patched driver that compiles on kernel 6.12. The patch addresses 4 breaking API changes:
14+
15+
| API Change | Old (6.6) | New (6.12) |
16+
|------------|-----------|------------|
17+
| RSS hash getter | `xgbe_get_rxfh(netdev, indir, key, hfunc)` | `xgbe_get_rxfh(netdev, ethtool_rxfh_param)` |
18+
| RSS hash setter | `xgbe_set_rxfh(netdev, indir, key, hfunc)` | `xgbe_set_rxfh(netdev, ethtool_rxfh_param, extack)` |
19+
| Timestamp info | `ethtool_ts_info` | `kernel_ethtool_ts_info` |
20+
| PCI IRQ flag | `PCI_IRQ_LEGACY` | `PCI_IRQ_INTX` |
21+
22+
## Quick Start
23+
24+
### Prerequisites
25+
26+
- TrueNAS SCALE 25.10.1 installed (you'll need temporary network access via USB Ethernet or similar)
27+
- SSH access to TrueNAS
28+
29+
### Installation
30+
31+
```bash
32+
# Enable development tools
33+
sudo install-dev-tools
34+
35+
# Download the pre-patched driver
36+
wget https://github.com/nirok80/asustor-truenas-10gbe-driver/releases/download/v1.0.0/truenas-amd-xgbe-asustor-6.12-fixed.tar.bz2
37+
38+
# Extract
39+
tar xvf truenas-amd-xgbe-asustor-6.12-fixed.tar.bz2
40+
cd truenas-amd-xgbe-asustor-6.6.44
41+
42+
# Compile and install
43+
make
44+
sudo make install
45+
46+
# Load the module
47+
sudo modprobe amd-xgbe
48+
49+
# Verify it works
50+
ip link show # Should show enp2s0f0 or similar
51+
```
52+
53+
### Make Persistent (Survives Reboot)
54+
55+
```bash
56+
# Make root filesystem writable
57+
sudo mount -o remount,rw 'boot-pool/ROOT/25.10.1/'
58+
59+
# Update initramfs to include the driver
60+
sudo update-initramfs -u -k $(uname -r)
61+
62+
# Make root filesystem read-only again
63+
sudo mount -o remount,ro 'boot-pool/ROOT/25.10.1/'
64+
```
65+
66+
## Manual Patching (Alternative)
67+
68+
If you prefer to patch the original driver yourself:
69+
70+
```bash
71+
# Download original driver from mihnea.net
72+
wget https://mihnea.net/truenas-amd-xgbe-asustor-6.6.44.tar.bz2
73+
tar xvf truenas-amd-xgbe-asustor-6.6.44.tar.bz2
74+
cd truenas-amd-xgbe-asustor-6.6.44
75+
76+
# Download and apply the patch
77+
wget https://raw.githubusercontent.com/nirok80/asustor-truenas-10gbe-driver/main/kernel-6.12-fix.patch
78+
patch -p1 < kernel-6.12-fix.patch
79+
80+
# Compile and install
81+
make
82+
sudo make install
83+
```
84+
85+
## Important Notes
86+
87+
1. **TrueNAS updates overwrite kernel modules** — You must recompile and reinstall the driver after every TrueNAS update.
88+
89+
2. **Unsupported configuration** — Using `install-dev-tools` and custom kernel modules makes your system unsupported by official TrueNAS channels.
90+
91+
3. **Future kernel updates** — Kernel 6.15+ will require additional patches (`timer_container_of` replaces `from_timer`, `timer_delete_sync` replaces `del_timer_sync`).
92+
93+
## Hardware Info
94+
95+
| Component | Details |
96+
|-----------|---------|
97+
| NAS | ASUSTOR Flashstor Gen2 FS6812X (12-bay) / FS6806X (6-bay) |
98+
| CPU | AMD Ryzen Embedded V3C14 |
99+
| NIC | AMD XGMAC 10GbE Controller `[1022:1458]` |
100+
| OS | TrueNAS SCALE 25.10.1 (kernel 6.12) |
101+
102+
## Files
103+
104+
| File | Description |
105+
|------|-------------|
106+
| `driver-source/` | Patched driver source code (ready to compile) |
107+
| `kernel-6.12-fix.patch` | The patch file for kernel 6.12 compatibility |
108+
| `truenas-amd-xgbe-asustor-6.12-fixed.tar.bz2` | Pre-patched driver tarball |
109+
110+
## Credits
111+
112+
- **Original driver patch:** [mihnea.net](https://mihnea.net/asustor-flashstor-fs6812xfs6806x-experimental-truenas-support/)
113+
- **Proxmox patches reference:** [phillarson-xyz/amd-xgbe-patched-proxmox](https://github.com/phillarson-xyz/amd-xgbe-patched-proxmox)
114+
- **AMD upstream driver:** Linux kernel `drivers/net/ethernet/amd/xgbe/`
115+
116+
## License
117+
118+
The AMD XGBE driver is licensed under GPL-2.0, as per the Linux kernel.
119+
120+
## Contributing
121+
122+
Found a bug or have improvements? PRs welcome!

docs/_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
title: ASUSTOR Flashstor 10GbE Driver for TrueNAS
2+
description: Patched AMD XGBE driver for ASUSTOR Flashstor Gen2 on TrueNAS SCALE 25.10+
3+
theme: jekyll-theme-minimal

docs/index.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
title: "Fixing ASUSTOR Flashstor 10GbE on TrueNAS SCALE 25.10"
3+
description: "How to get the AMD XGMAC 10GbE NIC working on ASUSTOR Flashstor Gen2 with TrueNAS SCALE 25.10.1 (kernel 6.12)"
4+
---
5+
6+
# Fixing ASUSTOR Flashstor 10GbE on TrueNAS SCALE 25.10
7+
8+
If you've got an **ASUSTOR Flashstor Gen2** (FS6812X or FS6806X) and tried to install TrueNAS SCALE 25.10.1, you probably discovered that the 10GbE NIC doesn't work. No network means a useless NAS.
9+
10+
This guide explains the problem and provides a working solution.
11+
12+
## The Hardware
13+
14+
The ASUSTOR Flashstor Gen2 is an impressive all-NVMe NAS:
15+
- 12-bay (FS6812X) or 6-bay (FS6806X) M.2 NVMe slots
16+
- AMD Ryzen Embedded V3C14 CPU
17+
- Integrated AMD XGMAC 10GbE NIC (`[1022:1458]`)
18+
19+
The problem? That AMD 10GbE NIC has no out-of-box driver support in TrueNAS.
20+
21+
## The Problem
22+
23+
Someone at [mihnea.net](https://mihnea.net/asustor-flashstor-fs6812xfs6806x-experimental-truenas-support/) created a patched `amd-xgbe` driver that worked great with **TrueNAS 24.10.x** (kernel 6.6.44).
24+
25+
But when you upgrade to **TrueNAS SCALE 25.10.1** (kernel 6.12), the driver won't compile:
26+
27+
```
28+
xgbe-ethtool.c: error: incompatible type for argument 2 of 'xgbe_get_rxfh'
29+
xgbe-ethtool.c: error: incompatible type for argument 2 of 'xgbe_set_rxfh'
30+
xgbe-ethtool.c: error: incompatible type for argument 2 of 'xgbe_get_ts_info'
31+
xgbe-pci.c: error: 'PCI_IRQ_LEGACY' undeclared
32+
```
33+
34+
## The Solution
35+
36+
The kernel APIs changed between 6.6 and 6.12. I wrote a patch that fixes all 4 breaking changes:
37+
38+
1. **RSS hash functions** — Changed from separate parameters to a single `ethtool_rxfh_param` struct
39+
2. **Timestamp info struct**`ethtool_ts_info` renamed to `kernel_ethtool_ts_info`
40+
3. **PCI IRQ flag**`PCI_IRQ_LEGACY` renamed to `PCI_IRQ_INTX`
41+
42+
## Installation
43+
44+
### Step 1: Enable Development Tools
45+
46+
SSH into your TrueNAS box and run:
47+
48+
```bash
49+
sudo install-dev-tools
50+
```
51+
52+
### Step 2: Download and Extract
53+
54+
```bash
55+
# Download the pre-patched driver
56+
wget https://github.com/nirok80/asustor-truenas-10gbe-driver/releases/download/v1.0.0/truenas-amd-xgbe-asustor-6.12-fixed.tar.bz2
57+
58+
# Extract
59+
tar xvf truenas-amd-xgbe-asustor-6.12-fixed.tar.bz2
60+
cd truenas-amd-xgbe-asustor-6.6.44
61+
```
62+
63+
### Step 3: Compile and Install
64+
65+
```bash
66+
make
67+
sudo make install
68+
sudo modprobe amd-xgbe
69+
```
70+
71+
### Step 4: Verify
72+
73+
```bash
74+
ip link show
75+
```
76+
77+
You should see your 10GbE interface (typically `enp2s0f0`).
78+
79+
### Step 5: Make Persistent
80+
81+
Without this step, the driver disappears after reboot:
82+
83+
```bash
84+
sudo mount -o remount,rw 'boot-pool/ROOT/25.10.1/'
85+
sudo update-initramfs -u -k $(uname -r)
86+
sudo mount -o remount,ro 'boot-pool/ROOT/25.10.1/'
87+
```
88+
89+
## Caveats
90+
91+
1. **TrueNAS updates overwrite kernel modules** — Recompile after every update
92+
2. **Unsupported configuration** — Using `install-dev-tools` voids your TrueNAS support
93+
3. **Future kernels** — Kernel 6.15+ will need more patches
94+
95+
## Resources
96+
97+
- [GitHub Repository](https://github.com/nirok80/asustor-truenas-10gbe-driver) — Source code and patch
98+
- [Original mihnea.net driver](https://mihnea.net/asustor-flashstor-fs6812xfs6806x-experimental-truenas-support/) — Where the original 6.6 patch came from
99+
- [phillarson-xyz/amd-xgbe-patched-proxmox](https://github.com/phillarson-xyz/amd-xgbe-patched-proxmox) — Similar patches for Proxmox
100+
101+
## Contributing
102+
103+
Found a bug or have improvements? [Open an issue or PR](https://github.com/nirok80/asustor-truenas-10gbe-driver/issues).

0 commit comments

Comments
 (0)