system/hwquirks: Optimization Loongson 7A2000 EHCI quirk (#473)

Currentilly, it only compares the root bus DID is 0x7A00 which sometimes
fails, a new logic was added to compare the 7A2000 EHCI DID to fix it.

Signed-off-by: Chao Li <lichao@loongson.cn>
This commit is contained in:
Chao Li 2024-12-07 05:51:18 +08:00 committed by GitHub
parent bdefff91ce
commit 422212b06a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -259,9 +259,11 @@ void quirks_init(void)
// -----------------------------------------------------------
// -- Loongson 7A1000 and 7A2000 chipset USB 2.0 workaround --
// -----------------------------------------------------------
if (quirk.root_vid == PCI_VID_LOONGSON && quirk.root_did == 0x7a00) {
quirk.id = QUIRK_LOONGSON7A00_EHCI_WORKARD;
quirk.type |= QUIRK_TYPE_USB;
quirk.process = loongson_7a00_ehci_workaround;
if (quirk.root_vid == PCI_VID_LOONGSON) {
if (pci_config_read16(0, 4, 1, PCI_DID_REG) == 0x7a14) {
quirk.id = QUIRK_LOONGSON7A00_EHCI_WORKARD;
quirk.type |= QUIRK_TYPE_USB;
quirk.process = loongson_7a00_ehci_workaround;
}
}
}