From owner-svn-src-all@freebsd.org  Fri Jul 31 12:10:29 2020
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF8233789D3;
 Fri, 31 Jul 2020 12:10:29 +0000 (UTC)
 (envelope-from grehan@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::19:3])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
 client-signature RSA-PSS (4096 bits) client-digest SHA256)
 (Client CN "mxrelay.nyi.freebsd.org",
 Issuer "Let's Encrypt Authority X3" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 4BJ5hP4Bb9z4hmM;
 Fri, 31 Jul 2020 12:10:29 +0000 (UTC)
 (envelope-from grehan@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 73C842136B;
 Fri, 31 Jul 2020 12:10:29 +0000 (UTC)
 (envelope-from grehan@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06VCATwH057872;
 Fri, 31 Jul 2020 12:10:29 GMT (envelope-from grehan@FreeBSD.org)
Received: (from grehan@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06VCATN9057871;
 Fri, 31 Jul 2020 12:10:29 GMT (envelope-from grehan@FreeBSD.org)
Message-Id: <202007311210.06VCATN9057871@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: grehan set sender to
 grehan@FreeBSD.org using -f
From: Peter Grehan <grehan@FreeBSD.org>
Date: Fri, 31 Jul 2020 12:10:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r363733 - head/usr.sbin/bhyve
X-SVN-Group: head
X-SVN-Commit-Author: grehan
X-SVN-Commit-Paths: head/usr.sbin/bhyve
X-SVN-Commit-Revision: 363733
X-SVN-Commit-Repository: base
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.33
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 31 Jul 2020 12:10:29 -0000

Author: grehan
Date: Fri Jul 31 12:10:28 2020
New Revision: 363733
URL: https://svnweb.freebsd.org/changeset/base/363733

Log:
  Replace magic numbers in Identify page register 0 with ATA definitions.
  
  No functional change. Verified with objdump output before/after.
  
  Requested by:	rpokala
  Reviewed by:	rpokala
  MFC after:	3 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 Jul 31 12:09:59 2020	(r363732)
+++ head/usr.sbin/bhyve/pci_ahci.c	Fri Jul 31 12:10:28 2020	(r363733)
@@ -999,7 +999,8 @@ ata_identify_init(struct ahci_port* p, int atapi)
 	struct ata_params* ata_ident = &p->ata_ident;
 
 	if (atapi) {
-		ata_ident->config = (2 << 14 | 5 << 8 | 1 << 7 | 2 << 5);
+		ata_ident->config = ATA_PROTO_ATAPI | ATA_ATAPI_TYPE_CDROM |
+		    ATA_ATAPI_REMOVABLE | ATA_DRQ_FAST;
 		ata_ident->capabilities1 = ATA_SUPPORT_LBA |
 			ATA_SUPPORT_DMA;
 		ata_ident->capabilities2 = (1 << 14 | 1);