#12929: [XHCI] crash in _LinkDescriptorForPipe()
--------------------------------+----------------------------------------
Reporter: diver | Owner: nobody
Type: bug | Status: assigned
Priority: normal | Milestone: R1/beta2
Component: Drivers/USB/XHCI | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking: 12915, 12951, 13912, 14798
Has a Patch: 0 | Platform: All
--------------------------------+----------------------------------------
Changes (by waddlesplash):
* cc: korli (added)
Comment:
So, it appears that since the ControlRequest length is 0, we
[https://github.com/haiku/haiku/blob/master/src/add-
ons/kernel/busses/usb/xhci.cpp#L880 won't get any TDs at all]:
{{{
// keep one trb for linking
int32 tdCount = (trbCount + XHCI_MAX_TRBS_PER_TD - 2)
/ (XHCI_MAX_TRBS_PER_TD - 1);
}}}
Probably the page fault is just LinkDescriptorForPipe trying to link the
TD, since we wrapped from 7 -> 0, but it can't because it has no link TD.
korli, you originally added the logic above, can you please comment here?
--
Ticket URL: <https://dev.haiku-os.org/ticket/12929#comment:12>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.