summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorChristopher Pascoe <pascoe@cvs.openbsd.org>2007-03-05 06:06:14 +0000
committerChristopher Pascoe <pascoe@cvs.openbsd.org>2007-03-05 06:06:14 +0000
commit9379313426d0d7a7c96c9988500c6afd306f8da7 (patch)
tree9c02cdfaf8d022493c7c65a4897f2faa7c5fd446 /sys
parentb43efacdc812b6a3f746e170328bab9ee423e507 (diff)
Recognise ATAPI device signatures.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/ahci.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c
index 08cec427a88..4a316acba45 100644
--- a/sys/dev/pci/ahci.c
+++ b/sys/dev/pci/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.64 2007/03/04 14:49:46 pascoe Exp $ */
+/* $OpenBSD: ahci.c,v 1.65 2007/03/05 06:06:13 pascoe Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -1372,11 +1372,16 @@ ahci_ata_probe(void *xsc, int port)
{
struct ahci_softc *sc = xsc;
struct ahci_port *ap = sc->sc_ports[port];
+ u_int32_t sig;
if (ap == NULL)
return (ATA_PORT_T_NONE);
- return (ATA_PORT_T_DISK);
+ sig = ahci_pread(ap, AHCI_PREG_SIG);
+ if ((sig & 0xffff0000) == 0xeb140000)
+ return ATA_PORT_T_ATAPI;
+ else
+ return ATA_PORT_T_DISK;
}
int