From 1e91950ccdb7523f884bd26d1addd5eb68f4c631 Mon Sep 17 00:00:00 2001 From: jbleyel Date: Tue, 14 Jan 2025 19:26:48 +0100 Subject: [PATCH] [HardwareDB] * fix HD51 --- include/hardwaredb.h | 1 + lib/python/Components/Harddisk.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hardwaredb.h b/include/hardwaredb.h index a579c0e8464..77471c3ec44 100644 --- a/include/hardwaredb.h +++ b/include/hardwaredb.h @@ -215,6 +215,7 @@ static std::unordered_map HardwareDB{ {"/devices/platform/rdb/f0471000.xhci_v2/usb2/2-2/", "Back, upper USB"}, {"/devices/platform/rdb/f0471000.xhci_v2/usb2/2-1/", "Back, lower USB"} #elif HWHD51 // CHECKED + {"/devices/platform/rdb/f045a000.sata/ata1/", "SATA"}, {"/devices/platform/f0470300.ehci/usb1/1-1/1-1.2", "Front USB"}, {"/devices/platform/f0470300.ehci/usb1/1-1/1-1.3", "Back, left USB"}, {"/devices/platform/f0471000.xhci/usb6/6-2/6-2", "Back, right USB"}, diff --git a/lib/python/Components/Harddisk.py b/lib/python/Components/Harddisk.py index b66f8037135..ed9c4d1f2ef 100644 --- a/lib/python/Components/Harddisk.py +++ b/lib/python/Components/Harddisk.py @@ -533,7 +533,7 @@ def parseDeviceData(inputData): device = eventData["DEVNAME"].replace("/dev/", "") shortDevice = device[:7] if device.startswith("mmcblk") else sub(r"[\d]", "", device) removable = fileReadLine(f"/sys/block/{shortDevice}/removable", source=MODULE_NAME) - internal = ("pci" in eventData["DEVPATH"] or "ahci" in eventData["DEVPATH"]) + internal = "pci" in eventData["DEVPATH"] or "ahci" in eventData["DEVPATH"] or "ata" in eventData["DEVPATH"] if internal and removable == "1": # This is probably a driver bug for physdevprefix, pdescription in list(getDeviceDB().items()): if eventData["DEVPATH"].startswith(physdevprefix) and "SATA" in pdescription: