From 58f6d2732065afc5b739794d0f4ddffd6b6c4f8e Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sun, 12 Jul 2009 16:46:43 +0000 Subject: [PATCH] MFp4: USB CORE: busdma improvement For single segment allocations the boundary field of the BUSDMA tag should be zero. Currently all single segment allocations are less than or equal to 4096 bytes, so the limit does not kick in. If any single segment USB allocations would be greater than 4K, then it would be a problem. Approved by: re (kensmith) Obtained from: HPS --- sys/dev/usb/usb_busdma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/usb_busdma.c b/sys/dev/usb/usb_busdma.c index 4127449ea110..e5d6ed7951ea 100644 --- a/sys/dev/usb/usb_busdma.c +++ b/sys/dev/usb/usb_busdma.c @@ -359,7 +359,8 @@ usb_dma_tag_create(struct usb_dma_tag *udt, if (bus_dma_tag_create ( /* parent */ udt->tag_parent->tag, /* alignment */ align, - /* boundary */ USB_PAGE_SIZE, + /* boundary */ (align == 1) ? + USB_PAGE_SIZE : 0, /* lowaddr */ (2ULL << (udt->tag_parent->dma_bits - 1)) - 1, /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL,