svn commit: r279967 - head/usr.sbin/bhyve
Alexander Motin
mav at FreeBSD.org
Fri Mar 13 20:56:18 UTC 2015
Author: mav
Date: Fri Mar 13 20:56:17 2015
New Revision: 279967
URL: https://svnweb.freebsd.org/changeset/base/279967
Log:
Change prdbc value reporting.
MFC after: 2 weeks
Modified:
head/usr.sbin/bhyve/pci_ahci.c
Modified: head/usr.sbin/bhyve/pci_ahci.c
==============================================================================
--- head/usr.sbin/bhyve/pci_ahci.c Fri Mar 13 20:14:55 2015 (r279966)
+++ head/usr.sbin/bhyve/pci_ahci.c Fri Mar 13 20:56:17 2015 (r279967)
@@ -1662,6 +1662,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);
@@ -1677,13 +1680,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);
}
@@ -1738,6 +1736,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;
@@ -1745,12 +1746,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;
More information about the svn-src-all
mailing list