Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 May 2012 23:17:07 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r235114 - projects/altix2/sys/kern
Message-ID:  <201205062317.q46NH7v5036243@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205062317.q46NH7v5036243>