From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:44:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05524BC; Fri, 27 Mar 2015 08:44:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3DD1AB2; Fri, 27 Mar 2015 08:44:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8iwYm020483; Fri, 27 Mar 2015 08:44:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8iwUD020482; Fri, 27 Mar 2015 08:44:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270844.t2R8iwUD020482@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:44:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r280734 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:44:59 -0000 Author: mav Date: Fri Mar 27 08:44:58 2015 New Revision: 280734 URL: https://svnweb.freebsd.org/changeset/base/280734 Log: MFC r279967: Change prdbc value reporting. Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:43:45 2015 (r280733) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:44:58 2015 (r280734) @@ -1663,6 +1663,9 @@ ata_ioreq_cb(struct blockif_req *br, int */ STAILQ_INSERT_TAIL(&p->iofhd, aior, io_flist); + if (!err) + hdr->prdbc = aior->done; + if (dsm) { if (aior->done != aior->len && !err) { ahci_handle_dsm_trim(p, slot, cfis, aior->done); @@ -1678,13 +1681,8 @@ ata_ioreq_cb(struct blockif_req *br, int if (!err && aior->done == aior->len) { tfd = ATA_S_READY | ATA_S_DSC; - if (ncq) - hdr->prdbc = 0; - else - hdr->prdbc = aior->len; } else { tfd = (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR; - hdr->prdbc = 0; if (ncq) p->serr |= (1 << slot); } @@ -1739,6 +1737,9 @@ atapi_ioreq_cb(struct blockif_req *br, i */ STAILQ_INSERT_TAIL(&p->iofhd, aior, io_flist); + if (!err) + hdr->prdbc = aior->done; + if (pending && !err) { atapi_read(p, slot, cfis, aior->done, hdr->prdtl - pending); goto out; @@ -1746,12 +1747,10 @@ atapi_ioreq_cb(struct blockif_req *br, i if (!err && aior->done == aior->len) { tfd = ATA_S_READY | ATA_S_DSC; - hdr->prdbc = aior->len; } else { p->sense_key = ATA_SENSE_ILLEGAL_REQUEST; p->asc = 0x21; tfd = (p->sense_key << 12) | ATA_S_READY | ATA_S_ERROR; - hdr->prdbc = 0; } cfis[4] = (cfis[4] & ~7) | ATA_I_CMD | ATA_I_IN;