svn commit: r195639 - head/sys/dev/usb

Marcel Moolenaar marcel at FreeBSD.org
Sun Jul 12 16:46:44 UTC 2009


Author: marcel
Date: Sun Jul 12 16:46:43 2009
New Revision: 195639
URL: http://svn.freebsd.org/changeset/base/195639

Log:
  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

Modified:
  head/sys/dev/usb/usb_busdma.c

Modified: head/sys/dev/usb/usb_busdma.c
==============================================================================
--- head/sys/dev/usb/usb_busdma.c	Sun Jul 12 16:04:12 2009	(r195638)
+++ head/sys/dev/usb/usb_busdma.c	Sun Jul 12 16:46:43 2009	(r195639)
@@ -359,7 +359,8 @@ usb_dma_tag_create(struct usb_dma_tag *u
 	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,


More information about the svn-src-head mailing list