mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2025-02-25 18:55:23 -06:00
Fix scanning of an external USB hub attached to an Intel XHCI (issue #135)
The Intel controller requires unused fields in the input context to be zero.
This commit is contained in:
parent
8a3cac8133
commit
1316c6c099
@ -718,6 +718,8 @@ static bool assign_address(const usb_hcd_t *hcd, const usb_hub_t *hub, int port_
|
|||||||
|
|
||||||
// Prepare the input context for the ADDRESS_DEVICE command.
|
// Prepare the input context for the ADDRESS_DEVICE command.
|
||||||
|
|
||||||
|
memset((xhci_input_context_t *)ws->input_context_addr, 0, sizeof(xhci_input_context_t));
|
||||||
|
|
||||||
xhci_ctrl_context_t *ctrl_context = (xhci_ctrl_context_t *)ws->input_context_addr;
|
xhci_ctrl_context_t *ctrl_context = (xhci_ctrl_context_t *)ws->input_context_addr;
|
||||||
ctrl_context->add_context_flags = XHCI_CONTEXT_A(0) | XHCI_CONTEXT_A(1);
|
ctrl_context->add_context_flags = XHCI_CONTEXT_A(0) | XHCI_CONTEXT_A(1);
|
||||||
|
|
||||||
@ -734,6 +736,7 @@ static bool assign_address(const usb_hcd_t *hcd, const usb_hub_t *hub, int port_
|
|||||||
} else {
|
} else {
|
||||||
slot_context->root_hub_port_num = port_num;
|
slot_context->root_hub_port_num = port_num;
|
||||||
}
|
}
|
||||||
|
|
||||||
xhci_ep_context_t *ep_context = (xhci_ep_context_t *)(ws->input_context_addr + 2 * ws->context_size);
|
xhci_ep_context_t *ep_context = (xhci_ep_context_t *)(ws->input_context_addr + 2 * ws->context_size);
|
||||||
ep_context->params2 = XHCI_EP_CONTROL << 3 | 3 << 1; // EP Type | CErr
|
ep_context->params2 = XHCI_EP_CONTROL << 3 | 3 << 1; // EP Type | CErr
|
||||||
ep_context->max_burst_size = 0;
|
ep_context->max_burst_size = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user