diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2009-11-09 22:35:23 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 20:55:22 +0100 |
commit | 6648f29d3be2972a74ef8e29aa5d425ab4f1fc48 (patch) | |
tree | 019ca7fd4b73772952f570ef2a5dec67c5eabeaa /drivers/usb/host/xhci-ring.c | |
parent | usbtest: make module param pattern writeable (diff) | |
download | linux-6648f29d3be2972a74ef8e29aa5d425ab4f1fc48.tar.xz linux-6648f29d3be2972a74ef8e29aa5d425ab4f1fc48.zip |
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>
Diffstat (limited to 'drivers/usb/host/xhci-ring.c')
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index aaed076bae37..371ba4297d9c 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -987,8 +987,7 @@ static void handle_port_status(struct xhci_hcd *xhci, * TRB in this TD, this function returns that TRB's segment. Otherwise it * returns 0. */ -static struct xhci_segment *trb_in_td( - struct xhci_segment *start_seg, +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) |