svn commit: r201138 - head/sys/dev/xen/blkfront

Justin T. Gibbs gibbs at FreeBSD.org
Mon Dec 28 18:59:13 UTC 2009


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


More information about the svn-src-all mailing list