mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2025-02-16 13:34:45 -06:00
XHCI: don't scan USB3 ports - keyboards will only be found on USB2 ports.
This commit is contained in:
parent
e5663fc8f9
commit
a4c62cae97
@ -995,8 +995,8 @@ void *xhci_init(uintptr_t base_addr)
|
|||||||
for (int port_idx = 0; port_idx < num_ports; port_idx++) {
|
for (int port_idx = 0; port_idx < num_ports; port_idx++) {
|
||||||
if (num_keyboards >= MAX_KEYBOARDS) continue;
|
if (num_keyboards >= MAX_KEYBOARDS) continue;
|
||||||
|
|
||||||
// Check if this port is valid.
|
// We only expect to find keyboards on USB2 ports.
|
||||||
if (port_type[port_idx] == 0) continue;
|
if (~port_type[port_idx] & PORT_TYPE_USB2) continue;
|
||||||
|
|
||||||
// Check if anything is connected to this port.
|
// Check if anything is connected to this port.
|
||||||
uint32_t port_status = read32(&op_regs->port_regs[port_idx].sc);
|
uint32_t port_status = read32(&op_regs->port_regs[port_idx].sc);
|
||||||
@ -1004,9 +1004,7 @@ void *xhci_init(uintptr_t base_addr)
|
|||||||
num_devices++;
|
num_devices++;
|
||||||
|
|
||||||
// Reset the port (USB2 only).
|
// Reset the port (USB2 only).
|
||||||
if (port_type[port_idx] & PORT_TYPE_USB2) {
|
reset_xhci_port(op_regs, port_idx);
|
||||||
reset_xhci_port(op_regs, port_idx);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Wait for the device to be enabled.
|
// Wait for the device to be enabled.
|
||||||
if (!wait_until_set(&op_regs->port_regs[port_idx].sc, XHCI_PORT_SC_PED, 500*MILLISEC)) continue;
|
if (!wait_until_set(&op_regs->port_regs[port_idx].sc, XHCI_PORT_SC_PED, 500*MILLISEC)) continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user