DS 5100 Linux Fan Control (reverse engineer driver)

Hello,

I installed Ubuntu Server on my Sentinel DS 5100 and everything is fine, except for the system fan. I cannot get this working. The default installation is unable to find anything.

So far I found out that the fan is connected to the PCB in the back (with the 6 SATA ports), through PCI to the motherboard.

I examined the PCB to see if there’s a SuperIO chip on it or something, but as far as I understand, the fan is connected to a MSP430 microcontroller so I think WD is controlling the fan with PWM through the MSP430. So probably there is no standard way to control it. Unlike the DX 4000 which has a Nuvoton chip that can be controlled through the nct6775 driver.

In Windows I notice the hwlib.dll library (which the dashboard monitor uses for example) has methods like:

  • HWGetFanRPM
  • HWSetFanSpeed

They both use the methods HWD2FCCommand and HWMailboxRequest.
HWD2FCCommand seems to call the WdSMBusDev driver through opcode 0x9c456644 and HWMailboxRequest calls the lpcdev driver through opcode 0x9c42a5c0.
After disassembling the lpcdriver.sys driver I found the opcode 0x9c42a5c0 but the instructions thereafter I cannot make sense of.

Is there anyone here that succeeded in controlling the fan, or that can help reverse engineer the driver, or give some guidance?

Thank you for any information!

Dean

Here are some commands I ran:

$ lspci -k 

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v2/Ivy Bridge DRAM Controller (rev 09) 
    Subsystem: Intel Corporation Xeon E3-1200 v2/Ivy Bridge DRAM Controller 
    Kernel driver in use: ie31200_edac 
    Kernel modules: ie31200_edac 

00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09) 
    Kernel driver in use: pcieport 

00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04) 
    Subsystem: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller 
    Kernel driver in use: xhci_hcd 

00:16.0 Communication controller: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 (rev 04) 
    Subsystem: Intel Corporation 7 Series/C216 Chipset Family MEI Controller 
    Kernel driver in use: mei_me 
    Kernel modules: mei_me 

00:16.3 Serial controller: Intel Corporation 7 Series/C210 Series Chipset Family KT Controller (rev 04) 
    Subsystem: Intel Corporation 7 Series/C210 Series Chipset Family KT Controller 
    Kernel driver in use: serial 

00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04) 
    Subsystem: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller 
    Kernel driver in use: ehci-pci 

00:1c.0 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 (rev c4) 
    Kernel driver in use: pcieport 

00:1c.3 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 4 (rev c4) 
    Kernel driver in use: pcieport 

00:1c.4 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 5 (rev c4) 
    Kernel driver in use: pcieport 

00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 (rev 04) 
    Subsystem: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller 
    Kernel driver in use: ehci-pci 

00:1f.0 ISA bridge: Intel Corporation C216 Series Chipset LPC Controller (rev 04) 
    Subsystem: Intel Corporation C216 Series Chipset LPC Controller 
    Kernel driver in use: lpc_ich 
    Kernel modules: lpc_ich 

00:1f.2 SATA controller: Intel Corporation 7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04) 
    Subsystem: Intel Corporation 7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode] 
    Kernel driver in use: ahci 
    Kernel modules: ahci 

00:1f.3 SMBus: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller (rev 04) 
    Subsystem: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller 
    Kernel driver in use: i801_smbus 
    Kernel modules: i2c_i801 

00:1f.6 Signal processing controller: Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller (rev 04) 
    Subsystem: Intel Corporation 7 Series/C210 Series Chipset Family Thermal Management Controller 

01:00.0 RAID bus controller: Marvell Technology Group Ltd. 88SE9480 SAS/SATA 6Gb/s RAID controller (rev c3) 
    Subsystem: Marvell Technology Group Ltd. 88SE9480 SAS/SATA 6Gb/s RAID controller 
    Kernel driver in use: mvsas 
    Kernel modules: mvsas 

02:00.0 PCI bridge: ASPEED Technology, Inc. AST1150 PCI-to-PCI Bridge (rev 02) 

03:00.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 21) 
    Subsystem: ASPEED Technology, Inc. ASPEED Graphics Family 
    Kernel driver in use: ast 
    Kernel modules: ast 

04:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection 
    Subsystem: Intel Corporation 82574L Gigabit Network Connection 
    Kernel driver in use: e1000e 
    Kernel modules: e1000e 

05:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection 
    Subsystem: Intel Corporation 82574L Gigabit Network Connection 
    Kernel driver in use: e1000e 
    Kernel modules: e1000e 
$ sudo i2cdetect 0 
WARNING! This program can confuse your I2C bus, cause data loss and worse! 
I will probe file /dev/i2c-0. 

I will probe address range 0x08-0x77. 

Continue? [Y/n] 
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f 
00:                         08 -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- 19 -- 1b -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- 44 -- -- -- 48 -- -- -- 4c -- -- -- 
50: -- UU -- UU -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --
0x19 
00: 00 00 00 00 00 c1 00 29 00 00 00 00 00 00 00 00 

0x1b 
00: 00 00 00 00 00 c1 00 29 00 00 00 00 00 00 00 00 

0x44 
00: 00 00 00 04 00 00 00 00 00 57 52 18 01 27 02 23 
Next adapter: SMBus I801 adapter at f000 (i2c-0) 
Do you want to scan it? (YES/no/selectively): 
Client found at address 0x19 
Probing for `Analog Devices ADM1021'...                     No 
Probing for `Analog Devices ADM1021A/ADM1023'...            No 
Probing for `Maxim MAX1617'...                              No 
Probing for `Maxim MAX1617A'...                             No 
Probing for `Maxim MAX1668'...                              No 
Probing for `Maxim MAX1805'...                              No 
Probing for `Maxim MAX1989'...                              No 
Probing for `Maxim MAX6655/MAX6656'...                      No 
Probing for `TI THMC10'...                                  No 
Probing for `National Semiconductor LM84'...                No 
Probing for `Genesys Logic GL523SM'...                      No 
Probing for `Onsemi MC1066'...                              No 
Probing for `Maxim MAX1618'...                              No 
Probing for `Maxim MAX1619'...                              No 
Probing for `National Semiconductor LM82/LM83'...           No 
Probing for `Maxim MAX6654'...                              No 
Probing for `Maxim MAX6690'...                              No 
Probing for `Maxim MAX6680/MAX6681'...                      No 
Probing for `Maxim MAX6695/MAX6696'...                      No 
Probing for `Texas Instruments TMP400'...                   No 
Probing for `Texas Instruments AMC6821'...                  No 
Probing for `National Semiconductor LM95231'...             No 
Probing for `National Semiconductor LM95241'...             No 
Probing for `National Semiconductor LM95245'...             No 
Probing for `ST STTS424'...                                 No 
Probing for `ST STTS424E'...                                No 
Probing for `ST STTS2002'...                                No 
Probing for `ST STTS3000'...                                No 
Probing for `NXP SE97/SE97B'...                             No 
Probing for `NXP SE98'...                                   No 
Probing for `Analog Devices ADT7408'...                     No 
Probing for `IDT TS3000/TSE2002'...                         Success! 
    (confidence 5, driver `jc42') 
Probing for `IDT TSE2004'...                                No 
Probing for `IDT TS3001'...                                 No 
Probing for `Maxim MAX6604'...                              No 
Probing for `Microchip MCP9804'...                          No 
Probing for `Microchip MCP9808'...                          No 
Probing for `Microchip MCP98242'...                         No 
Probing for `Microchip MCP98243'...                         No 
Probing for `Microchip MCP98244'...                         No 
Probing for `Microchip MCP9843'...                          No 
Probing for `ON CAT6095/CAT34TS02'...                       No 
Probing for `ON CAT34TS02C'...                              No 
Probing for `ON CAT34TS04'...                               No 
Probing for `Atmel AT30TS00'...                             No 
Probing for `Giantec GT30TS00'...                           No 
Client found at address 0x1b 
Probing for `ST STTS424'...                                 No 
Probing for `ST STTS424E'...                                No 
Probing for `ST STTS2002'...                                No 
Probing for `ST STTS3000'...                                No 
Probing for `NXP SE97/SE97B'...                             No 
Probing for `NXP SE98'...                                   No 
Probing for `Analog Devices ADT7408'...                     No 
Probing for `IDT TS3000/TSE2002'...                         Success! 
    (confidence 5, driver `jc42') 
Probing for `IDT TSE2004'...                                No 
Probing for `IDT TS3001'...                                 No 
Probing for `Maxim MAX6604'...                              No 
Probing for `Microchip MCP9804'...                          No 
Probing for `Microchip MCP9808'...                          No 
Probing for `Microchip MCP98242'...                         No 
Probing for `Microchip MCP98243'...                         No 
Probing for `Microchip MCP98244'...                         No 
Probing for `Microchip MCP9843'...                          No 
Probing for `ON CAT6095/CAT34TS02'...                       No 
Probing for `ON CAT34TS02C'...                              No 
Probing for `ON CAT34TS04'...                               No 
Probing for `Atmel AT30TS00'...                             No 
Probing for `Giantec GT30TS00'...                           No 
Client found at address 0x48 
Probing for `National Semiconductor LM75'...                No 
Probing for `National Semiconductor LM75A'...               No 
Probing for `Dallas Semiconductor DS75'...                  No 
Probing for `National Semiconductor LM77'...                No 
Probing for `Analog Devices ADT7410/ADT7420'...             No 
Probing for `Analog Devices ADT7411'...                     No 
Probing for `Maxim MAX6642'...                              No 
Probing for `Texas Instruments TMP435'...                   No 
Probing for `National Semiconductor LM73'...                No 
Probing for `National Semiconductor LM92'...                No 
Probing for `National Semiconductor LM76'...                No 
Probing for `Maxim MAX6633/MAX6634/MAX6635'...              No 
Probing for `NXP/Philips SA56004'...                        No 
Probing for `SMSC EMC1023'...                               No 
Probing for `SMSC EMC1043'...                               No 
Probing for `SMSC EMC1053'...                               No 
Probing for `SMSC EMC1063'...                               No 
Client found at address 0x51 
Handled by driver `at24' (already loaded), chip type `spd' 
    (note: this is probably NOT a sensor chip!) 
Client found at address 0x53 
Handled by driver `at24' (already loaded), chip type `spd' 
    (note: this is probably NOT a sensor chip!) 

 

Driver `jc42': 

  * Bus `SMBus I801 adapter at f000' 
    Busdriver `i2c_i801', I2C address 0x19 
    Chip `IDT TS3000/TSE2002' (confidence: 5) 

  * Bus `SMBus I801 adapter at f000' 
    Busdriver `i2c_i801', I2C address 0x1b 
    Chip `IDT TS3000/TSE2002' (confidence: 5) 

jc42 only provides temperatures.

pwmconfig says no fans are found
May be GitHub - hirschmann/nbfc: NoteBook FanControl (and the Linux port) can help, but using ec-probe the dump has all zeroes, so it seems that the EC cannot be read correctly.

Hi @DeanWy ,

Have you opened a Support Case? If not opened, for more information, please contact the WD Technical Support team for the best assistance and troubleshooting:

I did but they won’t help because it’s too old.

Meanwhile it doesn’t boot anymore. It seems like the second BIOS failed also. Connecting through serial and it fails to mount mtdblock0 and mtdblock1 to /dev/flash0 and /dev/flash1. It just sits there doing nothing after trying to boot the second BIOS.

I want to try to desolder the BIOS chips and replace them but without an original BIOS dump it is useless I guess.

Does anyone have a dump of the BIOS for DS 5100, or may be even DS 6100 ?

Thank you.