Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jan 2019 15:03:35 +0000 (UTC)
From:      Chuck Tuffli <chuck@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r342762 - head/usr.sbin/bhyve
Message-ID:  <201901041503.x04F3Zk5063812@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: chuck
Date: Fri Jan  4 15:03:35 2019
New Revision: 342762
URL: https://svnweb.freebsd.org/changeset/base/342762

Log:
  Fix bhyve's NVMe Completion Queue entry values
  
  The function which processes Admin commands was not returning the
  Command Specific value in Completion Queue Entry, Dword 0 (CDW0). This
  effects commands such as Set Features, Number of Queues which returns
  the number of queues supported by the device in CDW0. In this case, the
  host will only create 1 queue pair (Number of Queues is zero based).
  This also masked a bug in the queue counting logic.
  
  Reviewed by: imp, araujo
  Approved by: imp (mentor)
  MFC after: 1 month
  Differential Revision: https://reviews.freebsd.org/D18703

Modified:
  head/usr.sbin/bhyve/pci_nvme.c

Modified: head/usr.sbin/bhyve/pci_nvme.c
==============================================================================
--- head/usr.sbin/bhyve/pci_nvme.c	Fri Jan  4 15:03:30 2019	(r342761)
+++ head/usr.sbin/bhyve/pci_nvme.c	Fri Jan  4 15:03:35 2019	(r342762)
@@ -983,6 +983,7 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u
 			cq = &sc->compl_queues[0];
 
 			cp = &(cq->qbase)[cq->tail];
+			cp->cdw0 = compl.cdw0;
 			cp->sqid = 0;
 			cp->sqhd = sqhead;
 			cp->cid = cmd->cid;



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