From owner-svn-src-head@FreeBSD.ORG Mon Dec 28 18:59:13 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B0501065672; Mon, 28 Dec 2009 18:59:13 +0000 (UTC) (envelope-from gibbs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A5638FC39; Mon, 28 Dec 2009 18:59:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBSIxD0i098684; Mon, 28 Dec 2009 18:59:13 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBSIxDqS098682; Mon, 28 Dec 2009 18:59:13 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <200912281859.nBSIxDqS098682@svn.freebsd.org> From: "Justin T. Gibbs" Date: Mon, 28 Dec 2009 18:59:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201138 - head/sys/dev/xen/blkfront X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2009 18:59:13 -0000 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