-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for FS67xx series (FS6712X, probably FS6706T) #21
Conversation
* Need to confirm line 32 is power button, might be 33 * Need to test remaining missing lines * Need to gather DMI info for relevant platform match
Confirmed on my FS6712x
Also re-order the 6700 struct to be in the same order for the leds, keys and driver data sections. Now, the order for all three sections looks something like: fs6700 6700 6100 600
disk-activity doesn't work for NVME devices and there's no default Linux kernel trigger that does. Create NVME macros and default the LEDs to off and no disk-activity trigger (versus the DISK macros).
Oh, and |
@mafredri sorry for the ping, but is there anything I can do to help with this PR. I'll admit C nor kernel modules are my forte so any constructive criticism is welcome 😀 |
@romracer this is great, thanks for the effort you put into this! I don't mind the ping (tbh I need a better system for dealing with my GH notifications 😅), thanks for reminding me. I'll try to have a look at this during this week. Regarding the DMI match, I do believe ASUSTOR updates BIOSes every now-and-a-then, so maybe not the best match criteria, but I can't think of anything better at the moment (really wish ASUSTOR were more thorough with this info..). |
Regarding BIOS dates, I don't run ADM on my unit, but I had noticed there was an app for Jasper Lake BIOS updates available on the ASUSTOR website. I downloaded it and poked around and noticed something like BIOS versions 1.16, 1.17 and 1.18 (or something, numbers might be slightly off). The BIOS version in my DMI info is 1.23, but at the time, I didn't know if that was just someone hitting "123" on the keyboard, or had any sort of relevance. Once I saw those older version numbers in the BIOS update, I thought perhaps v1.23 is actually an incremented number, and not just "123" with a v and period. Long story short, perhaps BIOS version could be used in place of BIOS date (if warranted). But I also agree, sure would be nice if they just populated the other fields a bit more thoroughly. |
Thanks for working on this. If it helps, I can confirm that both the BIOS version and date match on 2 additional FS6712X units. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally got around to taking a look at this and everything looks great.
We should perhaps do a better job of documenting the quirks of each model in a separate document or in the code (thinking of e.g. that combined blue/red led), but otherwise nothing to add.
Thanks a lot for adding support for new models!
This is a great addition for the FS67xx range, thanks @romracer ! I was eager to try it on my device (a FS6712X) for the proper LED support, unfortunately it doesn't seem to be detected. After some digging, it turns out that I have a different BIOS version 1.20 compared to the 1.23 one hardcoded in
There doesn't appear to be a way to update this BIOS from within Linux, I guess the factory OS does that "in the background"? There's no BIOS download links here either: As I imagine other versions could exist as well, perhaps a better way to identify these models is to look in
Otherwise, perhaps a range of BIOS versions/dates would help? |
Hmm, I wish I could say I knew how to implement that. I'm not really a kernel module developer though. As a hack, it should be possible to duplicate this block, but its admittedly less future-proof: https://github.com/mafredri/asustor-platform-driver/blob/main/asustor.c#L274-L283 I can push up a PR if desired. Thoughts Mathias? PS: There is a Jasper Lake BIOS update app on the apps tab of the Asustor web page, but it requires their OS to install, and it doesn't have version 1.23 anyway. |
@mgc8 @romracer: Can you run the following commands and post the resulting .txt files here? I'll compare to the output on my AS5402T and try to figure out a difference that's better than the BIOS date |
@DanielGibson My dmi.txt is included in the first comment on this PR. Thanks for taking a look! |
Seems like the dmi stuff is too similar.
|
Random idea: We already expose all the SATA LEDs on all supported devices of the same series, so even a devices that only supports two SATA HDDs (and thus only has two SATA LEDs), like AS6702T or AS5402T will have 6 SATA LEDs exposed, because AS6706T needs them. Potential problem: It seems like it uses the same GPIO ports as SATA1 (12, 13), so it would be an alias. No idea if that really is a problem, though |
Seems like it is indeed a problem (the nvme1 LEDs don't turn up when just adding them to the |
@DanielGibson Here are mine: I had actually ran a comparison with the |
I am sure the FS6706T also uses the switch, just probably half the number (7 or 8 instead of 15), since the CPU has too few PCIe lanes available otherwise for NVMe. Can't speak for the SATA models, they might employ the same chips of course, but I think the "criteria" here could be the number of those switches -- over 2x-3x of them and you're likely looking at a NVMe model. It's still a heuristic, and not ideal, but I'm not sure how else we'd identify them either -- short of having some compile-time parameters or Makefile variables perhaps? On another note, @romracer I can confirm that duplicating that structure for detection, at least as a workaround if not a perfect solution, works fine. |
I'll try to figure out if I can detect those PCIe switches in the asustor kernel module, and I also plan to add an argument to the kernel module that allows overriding the detected device (something like |
Could you also post the output of (turns out the lshw output doesn't have much information on those PCIe switches) Thanks in advance :) UPDATE: added |
Thanks for that update, I was just about to write confused about my version of Here are the two files with Having the module argument to override detection would be a nice addition, definitely. I did a bit of digging and found some PCI probing functions in the kernel under |
Weird, those don't list the Update: Ok, the |
Can you try this branch: https://github.com/DanielGibson/asustor-platform-driver/tree/detect-flashtor I think it should detect your devices as FS67xx. |
I created a PR, we should probably continue the discussion there: #27 |
This adds support for the FS6712X and probably the FS6706T since its the same unit with less PCIe switches and muxes. All of the LEDs have been tested on my unit as well as the single power button.
This unit doesn't have a front panel, but there are some LEDs on the side next to the power button that can be toggled and I treated the same. The blue:power LED also controls a red LED inside the power button; I couldn't find a way to separate these through GPIO lines.
I moved the
asustor_6700_gpio_leds_lookup
struct in the code so the order is consistently fs6700, 6700, 6100, 600. This is just a consistency thing; its otherwise unchanged.For DMI system matching, I added the BIOS release date from my FS6712X. This is probably the only questionable change because I only have this one unit, so I can't see how this BIOS date compares to another Jasper Lake ASUSTOR. I've attached the DMI data from my system if someone wants to compare with other Jasper Lake ASUSTOR systems to see if BIOS date is a suitable differentiator.
dmi.txt
The
pr_info
call (module loading text) has been adjusted to print the third DMI match parameter, if it exists.I tried to make notes in comments a little more consistent as well as a variable initialization statement. Minor consistency stuff again, no actual content changes.
Lastly, these units are all NVMe devices, and the default Linux kernel doesn't have a LED trigger for NVMe activity.
disk-activity
doesn't work for PCIe devices and the Linux kernel maintainers can't decide on the right approach. Again, we have to hope forledtrig-blk
or something here, but the disk activity LED could be used for other purposes in the meantime. So, I created NVME* macros that default the LEDs to off and nodisk-activity
trigger, and used these for the fs6700 series.Summary by GitHub Copilot
This pull request introduces support for the FS6706T and FS6712X models, adds NVMe LED definitions, and refactors the GPIO lookup tables for better organization and clarity. The most important changes include updates to the README file, new LED definitions, and modifications to the GPIO lookup tables and driver data structures.
Model Support Updates:
README.md
: Added FS6706T (not tested) and FS6712X to the list of supported models.LED Definitions:
asustor.c
: Added new NVMe activity and error LED definitions (NVME_ACT_LED
andNVME_ERR_LED
).asustor.c
: Included NVMe LED entries in theasustor_leds
array.GPIO Lookup Tables:
asustor.c
: Added new GPIO lookup tables for FS6700 and 6700 models, organizing LED and key mappings. [1] [2]asustor.c
: Removed the old GPIO lookup table for the 6700 model to avoid duplication and improve clarity.Driver Data Structures:
asustor.c
: Added driver data for the FS6700 model, linking it to the new GPIO lookup tables.asustor.c
: Updated theasustor_init
function to print additional information and reformat existing code for readability. [1] [2] [3]