USB: xhci: Add tests for TRB address translation.
It's not surprising that the transfer request buffer (TRB) physical to virtual address translation function has bugs in it, since I wrote most of it at 4am last October. Add a test suite to check the TRB math. This runs at memory initialization time, and causes the driver to fail to load if the TRB math fails. Please excuse the excessively long lines in the test vectors; they can't really be made shorter and still be readable. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
7f4e985448
commit
6648f29d3b
@@ -1268,6 +1268,9 @@ void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev);
|
||||
|
||||
/* xHCI ring, segment, TRB, and TD functions */
|
||||
dma_addr_t xhci_trb_virt_to_dma(struct xhci_segment *seg, union xhci_trb *trb);
|
||||
struct xhci_segment *trb_in_td(struct xhci_segment *start_seg,
|
||||
union xhci_trb *start_trb, union xhci_trb *end_trb,
|
||||
dma_addr_t suspect_dma);
|
||||
void xhci_ring_cmd_db(struct xhci_hcd *xhci);
|
||||
void *xhci_setup_one_noop(struct xhci_hcd *xhci);
|
||||
void xhci_handle_event(struct xhci_hcd *xhci);
|
||||
|
Reference in New Issue
Block a user