svn commit: r235114 - projects/altix2/sys/kern
Marcel Moolenaar
marcel at FreeBSD.org
Sun May 6 23:17:07 UTC 2012
Author: marcel
Date: Sun May 6 23:17:07 2012
New Revision: 235114
URL: http://svn.freebsd.org/changeset/base/235114
Log:
The isp(4) driver derives a tag when maxsz is smaller than maxsegsz.
Compensate for this behaviour to keep things simple. A segment size
is equally bounded to the total DMA size.
Modified:
projects/altix2/sys/kern/subr_busdma.c
Modified: projects/altix2/sys/kern/subr_busdma.c
==============================================================================
--- projects/altix2/sys/kern/subr_busdma.c Sun May 6 23:03:19 2012 (r235113)
+++ projects/altix2/sys/kern/subr_busdma.c Sun May 6 23:17:07 2012 (r235114)
@@ -102,9 +102,10 @@ _busdma_tag_make(device_t dev, busdma_ta
/*
* If nsegs is 1, ignore maxsegsz. What this means is that if we have
- * just 1 segment, then maxsz should be equal to maxsegsz. Make it so.
+ * just 1 segment, then maxsz should be equal to maxsegsz. To keep it
+ * simple for us, limit maxsegsz to maxsz in any case.
*/
- if (nsegs == 1)
+ if (maxsegsz > maxsz || nsegs == 1)
maxsegsz = maxsz;
tag = (busdma_tag_t)malloc(sizeof(*tag), M_BUSDMA_TAG,
More information about the svn-src-projects
mailing list