Repository navigation
Replies: 4 comments
|
Thank you, this is a great write-up, and it's nice to see synodeb used as a base. Short answers to your questions, with the details in the RFC (#7):
One request for everything that lands in this repository: hardware facts are fine, but please If you have a DX517 owner around: the port multiplier ID of a DX517 (from |
|
Thanks, glad #3 was useful, and thanks for taking it in so quickly. On the questions in your reply:
The other open PRs (#2, #4, #5) can stay open as reference or be closed, as you prefer. |
|
Thanks, and thanks for the ready-to-send #3, that is a lot of care for a 13-line quirk.
|
|
The 88SM9705 quirk is on linux-ide now, with Kyrylo Biryuk in Cc: Your measurements are quoted as yours, with a link to this discussion. If the maintainers ask |
Uh oh!
There was an error while loading. Please reload this page.
Hi, and thanks for synodeb. It is what got us started: synodeb is the inspiration and the base
of our work on an older unit, a DS2415+ (Atom C2538, DSM platform
avoton) with a DX1215expansion unit. With the stage-1 boot chain proposed in the boot PRs, synodeb is also what
gets Unraid booting on this hardware; our separately hosted Unraid plugins then add the
hardware support (fans, LEDs, the expansion unit). Along the way we measured how the fans, LEDs and the expansion unit can be driven from a stock Linux kernel. This issue collects the findings so you can judge what is useful for synodeb, and asks how you would like them contributed.
Labels used below:
Hardware-test status: everything marked measured was tested on Unraid 7.3.4 (kernel 6.18.58-Unraid) through two Unraid plugins, "Synology Hardware" (userspace MCU/fan daemon) and "Synology Expansion Unit Driver" (the out-of-tree kernel module
synology_dx). Both are maintained and hosted by us in our own repository (https://github.com/luuvasara/unraid-synology-hardware and https://github.com/luuvasara/unraid-synology-expansion), are not proposed for synodeb, and are mentioned only as the field-tested reference. The libata quirk was measured on Debian 6.12.Status of the synodeb port
The findings are implemented in synodeb's own format (
kernel/patches+kernel/srcdriver,synohwdboard support, apkg/synology-ds2415ppackage), offered as PRs 07-11 below. Identifiers sayds2415p: Synology sells non-plus models in this family that are different hardware (DS1515 vs DS1515+), and DSM itself spells the modelDS2415p; the DS923+ needs no suffix because there is no non-plus DS923. Facts below are therefore split into:synology_dxmodule / Synology Hardware plugin, andImplementation branches
kernel/patches/0009: libata API for PMP vendor registers from a quiet EH round (16-bit register numbers)drivers/ataobjects byte-identicalkernel/src/drivers/ata/synology_ds2415p.c+ patch 0010 +kernel/ds2415p.config(opt-inEXTRA_CONFIGS): 88SE9215 GPIO init, orange bay LEDs incl. PCH GPIO 49 as LED class, DX1215 hwmon (fan level, alarms), DX bay LEDs, switchsynology_dxsynohwd:DS2415PDaemon(MCU on ttyS1, allow-list, DSM fan tables, DX1215 policy)pkg/synology-ds2415pdpkg-deb --buildonly; not installed on the unitdocs/ds2415p-hardware.mddesign noteThe boot-stall quirk is PR 02 (
kernel/patches/0008).1. DS2415+ microcontroller (MCU)
/dev/ttyS1, ASCII commands (measured).sttyworked from an initramfs, and the daemon opens the port 9600 8N1 raw.syno_microp_controlwas run with synobios logging on, and the bytes written to the port were recorded (measured).24/5/678/9:/;@/A/BLA1/LA2/LA3LE1/LE2/LE3V10..V99W20(DSM uses 20 Hz)u/tOl/kq/pscemdsendsuabout every 10 s (measured). We keep sending it. What the MCU does if the stream stops was not measured (hypothesis: fan-fail beep or full speed).tat shutdown (theSynoDisableFanCheckservice; inferred to bet).1(power off),C(reset),3(long buzzer, never seen on the wire), andVbelow 10 so that a bug cannot stop the fan.1andCare from third-party reports for other models and were not tested.3andKat about 4 Hz each; meaning unknown. Power-button and fan-fail event bytes are not decoded.scemd.xmltables (read from DSM, values only): disk 0/46/50/54 C to 20/40/70/99 %, alert at 58 C; CPU 0/65/85 C to 20/70/99 %, alert at 85 C.DS2415+ fan sweep (measured; idle, duty held until no temperature moved more than 0.5 C in 600 s):
Every step settled; 10 % is safe at idle. The DX1215 disk did not move, so the DS2415+ fans do not cool the expansion unit.
2. DX1215 topology and its GPIO register file
0x3a0(output data),0x3a4(output enable,0xffffffor a write) and0x3b0(input). The register number is 16 bits (high byte in the HOB feature field). DSM wraps this in a sysfs file in its patched kernel. A host-side write selects a "page" through address bits and pulses write/read strobe bits; the 8 data bits appear as GPO/GPI 1..8.Pages (EMID-0 master; slaves read 0x3f on pages 2-4, not wired):
scemd.xml): disk temperature only, LOW at 0 C, MIDDLE at 48 C, FULL at 55 C, FULL plus shutdown at 61 C, period 300 s. Our daemon follows it, treats an alarm as FULL, an unreadable temperature as MIDDLE, and never sends STOP.3. Bay LEDs
DS2415+ internal bays (three 88SE9215, measured on hardware):
0x07071024(output enable) = 0,0x07071020(data out) = 0,0x07071058(pin function) =0x00B6D8D1. Before init they readoe=0xffffffff out=0 func=0x2db6c688. Green present/activity then works on both units.DX1215 bays: page 1 of each 88SM9705 as in the table above: bits 0-2 orange fault, bit 6 = 1 turns all disk LEDs off (it is 1 at power-up, so the LEDs are dark until cleared). With bit 6 cleared the green LEDs work. Orange on DX bays 1 and 2 was seen at the box. Whether green comes purely from hardware is inferred.
Restore on unload: the module puts the load-time values back.
4. Bay maps (confirmed at the box by blink count)
5. Boot: the 88SM9705 SEMB link stall
softreset failed (1st FIS failed), "reset failed, giving up", "hard resetting link", repeat). With one internal and one DX1215 disk: internal disk attached at 200.6 s, DX1215 disk at 203.3 s, because the SCSI scan is serialised behind libata EH.libata.force=19.05:disable,...has no effect:disableis a device horkage applied after IDENTIFY, which link 5 never reaches.libata.force=19.05:norst,20.05:norst,21.05:norst,22.05:norst(measured, Unraid 6.18.58): last DX EH complete at 103 s instead of 200 s. The hard reset is still tried, so link 5 still showsfailed to resume link (SControl 0).ATA_LFLAG_DISABLEDon link 5 of a 1b4b:9705, modelled on the existing Marvell 4140 SEMB quirk (measured, Debian 6.12): softreset failures from dozens to 0, EH complete in 8.6-18.5 s, internal disk at 18.6 s, DX1215 disk at 21.3 s (about 19 s overall versus 200 s). Onefailed to resume linkper PMP remains. The patch is tested on 6.12 only (build-tested on 6.18.58), offered askernel/patches/0008in PR 02; it could go to mainline later.synology_dxexists and why Unraid only gets thenorstworkaround.6. What exists today
Two Unraid plugins, maintained and hosted by us (https://github.com/luuvasara/unraid-synology-hardware and https://github.com/luuvasara/unraid-synology-expansion), not proposed for synodeb, are the working, field-tested reference:
synology_dxwith a sysfs API under/sys/kernel/synology_dx/and a hwmon device (fan1_alarm,fan2_alarm,pwm1,pwm1_enable). Fan writes only on the EMID-0 master, STOP only as a time-limited test with a kernel-side revert, bay LEDs optional and off by default.The same approach serves Debian in synodeb's own form in PRs 07-10 (in-tree, through libata's own EH context instead of the module's workaround for Unraid's built-in libata).
Questions for you
kernel/src(with hwmon + LED class, PR 08) the right place for the DX1215 fan and LED code, or would you rather keep it in userspace?kernel/patchesnow (PR 02), or wait until it is in mainline?Open questions (ours)
ukeepalive stops, and the meaning of the3andKbytes it sends.failed to resume link (SControl 0)per PMP after the quirk was not investigated.All reactions