aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Grehan <grehan@FreeBSD.org>2020-07-31 12:10:28 +0000
committerPeter Grehan <grehan@FreeBSD.org>2020-07-31 12:10:28 +0000
commitf1c3dac41471085d59a915db9d0a3ba99cabaf22 (patch)
tree6479d5b54e91f06401a956e7edd501e909c26789
parent74d677ebfdbb2889926f078250d070ba66073369 (diff)
downloadsrc-f1c3dac41471085d59a915db9d0a3ba99cabaf22.tar.gz
src-f1c3dac41471085d59a915db9d0a3ba99cabaf22.zip
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
Notes
Notes: svn path=/head/; revision=363733
-rw-r--r--usr.sbin/bhyve/pci_ahci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/bhyve/pci_ahci.c b/usr.sbin/bhyve/pci_ahci.c
index 6cc0b3b65ef2..dfdf57f664e7 100644
--- a/usr.sbin/bhyve/pci_ahci.c
+++ b/usr.sbin/bhyve/pci_ahci.c
@@ -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);