Date: Sun, 16 Mar 2014 12:33:41 +0000 (UTC) From: Tycho Nightingale <tychon@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263238 - head/usr.sbin/bhyve Message-ID: <201403161233.s2GCXfZQ056291@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tychon Date: Sun Mar 16 12:33:40 2014 New Revision: 263238 URL: http://svnweb.freebsd.org/changeset/base/263238 Log: Though there currently isn't a way to insert new media into an ATAPI drive, at least pretend to support Asynchronous Notification (AN) to avoid a guest needlessly polling for it. Approved by: grehan (co-mentor) Modified: head/usr.sbin/bhyve/pci_ahci.c Modified: head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- head/usr.sbin/bhyve/pci_ahci.c Sun Mar 16 12:32:16 2014 (r263237) +++ head/usr.sbin/bhyve/pci_ahci.c Sun Mar 16 12:33:40 2014 (r263238) @@ -95,6 +95,13 @@ enum sata_fis_type { #define MODEPAGE_CD_CAPABILITIES 0x2A /* + * ATA commands + */ +#define ATA_SF_ENAB_SATA_SF 0x10 +#define ATA_SATA_SF_AN 0x05 +#define ATA_SF_DIS_SATA_SF 0x90 + +/* * Debug printf */ #ifdef AHCI_DEBUG @@ -1169,6 +1176,17 @@ ahci_handle_cmd(struct ahci_port *p, int case ATA_SETFEATURES: { switch (cfis[3]) { + case ATA_SF_ENAB_SATA_SF: + switch (cfis[12]) { + case ATA_SATA_SF_AN: + p->tfd = ATA_S_DSC | ATA_S_READY; + break; + default: + p->tfd = ATA_S_ERROR | ATA_S_READY; + p->tfd |= (ATA_ERROR_ABORT << 8); + break; + } + break; case ATA_SF_ENAB_WCACHE: case ATA_SF_DIS_WCACHE: case ATA_SF_ENAB_RCACHE:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403161233.s2GCXfZQ056291>