Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Mar 2014 22:37:17 +0000 (UTC)
From:      Jim Harris <jimharris@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r263278 - head/sys/dev/nvme
Message-ID:  <201403172237.s2HMbH6l091504@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jimharris
Date: Mon Mar 17 22:37:17 2014
New Revision: 263278
URL: http://svnweb.freebsd.org/changeset/base/263278

Log:
  nvme:  NVMe specification dictates 4-byte alignment for PRPs (not 8).
  
  Sponsored by:	Intel
  MFC after:	3 days

Modified:
  head/sys/dev/nvme/nvme_qpair.c

Modified: head/sys/dev/nvme/nvme_qpair.c
==============================================================================
--- head/sys/dev/nvme/nvme_qpair.c	Mon Mar 17 22:36:04 2014	(r263277)
+++ head/sys/dev/nvme/nvme_qpair.c	Mon Mar 17 22:37:17 2014	(r263278)
@@ -498,8 +498,9 @@ nvme_qpair_construct(struct nvme_qpair *
 
 	mtx_init(&qpair->lock, "nvme qpair lock", NULL, MTX_DEF);
 
+	/* Note: NVMe PRP format is restricted to 4-byte alignment. */
 	bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev),
-	    sizeof(uint64_t), PAGE_SIZE, BUS_SPACE_MAXADDR,
+	    4, PAGE_SIZE, BUS_SPACE_MAXADDR,
 	    BUS_SPACE_MAXADDR, NULL, NULL, NVME_MAX_XFER_SIZE,
 	    (NVME_MAX_XFER_SIZE/PAGE_SIZE)+1, PAGE_SIZE, 0,
 	    NULL, NULL, &qpair->dma_tag);



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