From 9379313426d0d7a7c96c9988500c6afd306f8da7 Mon Sep 17 00:00:00 2001 From: Christopher Pascoe Date: Mon, 5 Mar 2007 06:06:14 +0000 Subject: Recognise ATAPI device signatures. --- sys/dev/pci/ahci.c | 9 +++++++-- 1 file 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 @@ -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 -- cgit v1.2.3