diff options
author | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2015-02-11 07:13:45 +0000 |
---|---|---|
committer | Jonathan Matthew <jmatthew@cvs.openbsd.org> | 2015-02-11 07:13:45 +0000 |
commit | a6a9aec194d5f7552a3fdbbc23b475617d98942e (patch) | |
tree | f10cf42e4520bbf5de8e98dd584a7cbeeb0b2e6e /sys/dev/ic | |
parent | 2bda179157c412aa23997828c91da1b492bb0c6d (diff) |
include extended capabilities in ahci debug output
ok dlg@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/ahci.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/ahcireg.h | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c index bbeb1feb3cc..fb36dd3bbfc 100644 --- a/sys/dev/ic/ahci.c +++ b/sys/dev/ic/ahci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahci.c,v 1.18 2015/02/11 07:08:34 jmatthew Exp $ */ +/* $OpenBSD: ahci.c,v 1.19 2015/02/11 07:13:44 jmatthew Exp $ */ /* * Copyright (c) 2006 David Gwynne <dlg@openbsd.org> @@ -209,6 +209,8 @@ ahci_attach(struct ahci_softc *sc) printf("%s: capabilities 0x%b, %d ports, %d cmds, gen %s\n", DEVNAME(sc), sc->sc_cap, AHCI_FMT_CAP, AHCI_REG_CAP_NP(sc->sc_cap), sc->sc_ncmds, gen); + printf("%s: extended capabilities 0x%b\n", DEVNAME(sc), + ahci_read(sc, AHCI_REG_CAP2), AHCI_FMT_CAP2); } #endif diff --git a/sys/dev/ic/ahcireg.h b/sys/dev/ic/ahcireg.h index f4e53f3d4d3..4510118e80b 100644 --- a/sys/dev/ic/ahcireg.h +++ b/sys/dev/ic/ahcireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ahcireg.h,v 1.4 2015/02/11 07:08:34 jmatthew Exp $ */ +/* $OpenBSD: ahcireg.h,v 1.5 2015/02/11 07:13:44 jmatthew Exp $ */ /* * Copyright (c) 2006 David Gwynne <dlg@openbsd.org> @@ -69,6 +69,16 @@ #define AHCI_REG_EM_LOC 0x01c /* Enclosure Mgmt Location */ #define AHCI_REG_EM_CTL 0x020 /* Enclosure Mgmt Control */ +#define AHCI_REG_CAP2 0x024 /* HBA Capabilities Extended */ +#define AHCI_REG_CAP2_DESO (1<<5) /* DevSlp from slumber only */ +#define AHCI_REG_CAP2_SADM (1<<4) /* Aggro DevSlp mgmt */ +#define AHCI_REG_CAP2_SDS (1<<3) /* Supports DevSlp */ +#define AHCI_REG_CAP2_APST (1<<2) /* Auto partial->slumber */ +#define AHCI_REG_CAP2_NVMP (1<<1) /* NVMHCI present */ +#define AHCI_REG_CAP2_BOH (1<<0) /* BIOS/OS handoff */ +#define AHCI_FMT_CAP2 "\020" "\006DESO" "\005SADM" "\004SDS" \ + "\003APST" "\002NVMP" "\001BOH" + #define AHCI_PORT_REGION(_p) (0x100 + ((_p) * 0x80)) #define AHCI_PORT_SIZE 0x80 |