Skip to content

Commit

Permalink
[HardwareDB]
Browse files Browse the repository at this point in the history
* fix HD51
  • Loading branch information
jbleyel committed Jan 14, 2025
1 parent 7195ed0 commit 1e91950
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/hardwaredb.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ static std::unordered_map<std::string, std::string> 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"},
Expand Down
2 changes: 1 addition & 1 deletion lib/python/Components/Harddisk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1e91950

Please sign in to comment.