Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Dec 2009 18:59:13 +0000 (UTC)
From:      "Justin T. Gibbs" <gibbs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r201138 - head/sys/dev/xen/blkfront
Message-ID:  <200912281859.nBSIxDqS098682@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gibbs
Date: Mon Dec 28 18:59:13 2009
New Revision: 201138
URL: http://svn.freebsd.org/changeset/base/201138

Log:
  Correct alignment and boundary constraints in blkfront's bus dma tag.  The
  blkif interface in Xen requires all I/O to be 512 byte aligned with each
  segment bounded by a 4k page.
  
  Note: This submission only documents the proper contraints for blkif I/O.
        The alignment code in busdma does not yet handle alignment constraints
        correctly in all cases.

Modified:
  head/sys/dev/xen/blkfront/blkfront.c

Modified: head/sys/dev/xen/blkfront/blkfront.c
==============================================================================
--- head/sys/dev/xen/blkfront/blkfront.c	Mon Dec 28 18:51:26 2009	(r201137)
+++ head/sys/dev/xen/blkfront/blkfront.c	Mon Dec 28 18:59:13 2009	(r201138)
@@ -450,7 +450,7 @@ blkfront_attach(device_t dev)
 
 	/* Allocate parent DMA tag */
 	if (bus_dma_tag_create(	NULL,			/* parent */
-				4096, 0,		/* algnmnt, boundary */
+				512, 4096,		/* algnmnt, boundary */
 				BUS_SPACE_MAXADDR,	/* lowaddr */
 				BUS_SPACE_MAXADDR,	/* highaddr */
 				NULL, NULL,		/* filter, filterarg */
@@ -733,7 +733,7 @@ connect(struct xb_softc *sc)
 /**
  * Handle the change of state of the backend to Closing.  We must delete our
  * device-layer structures now, to ensure that writes are flushed through to
- * the backend.  Once is this done, we can switch to Closed in
+ * the backend.  Once this is done, we can switch to Closed in
  * acknowledgement.
  */
 static void



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