Date: Tue, 17 Sep 2013 15:41:15 GMT From: zcore@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r257427 - soc2013/zcore/head/usr.sbin/bhyve Message-ID: <201309171541.r8HFfFaY074745@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: zcore Date: Tue Sep 17 15:41:15 2013 New Revision: 257427 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=257427 Log: fix CI clear for NCQ Modified: soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c Modified: soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c Tue Sep 17 14:23:15 2013 (r257426) +++ soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c Tue Sep 17 15:41:15 2013 (r257427) @@ -256,7 +256,6 @@ if (fis[2] & ATA_S_ERROR) p->is |= AHCI_P_IX_TFE; p->tfd = tfd; - p->ci &= ~(1 << slot); ahci_write_fis(p, FIS_TYPE_SETDEVBITS, fis); } @@ -374,7 +373,7 @@ static void handle_dma(struct ahci_port *p, int slot, uint8_t *cfis) { - int i, err, readop = 1; + int i, err, ncq = 0, readop = 1; uint64_t lba; uint32_t len; struct ahci_ioreq *aior; @@ -398,6 +397,7 @@ len = cfis[11] << 8 | cfis[3]; if (!len) len = 65536; + ncq = 1; } else if (cfis[2] == ATA_READ_DMA48 || cfis[2] == ATA_WRITE_DMA48) { lba = ((uint64_t)cfis[10] << 40) | ((uint64_t)cfis[9] << 32) | @@ -445,6 +445,9 @@ else err = blockif_write(p->bctx, breq); assert(err == 0); + + if (ncq) + p->ci &= ~(1 << slot); } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309171541.r8HFfFaY074745>