|
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! |
0 commit comments