summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2006-12-11 04:26:17 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2006-12-11 04:26:17 +0000
commit1fa769d01d87e84f7d78ea1caac21ad7b134b948 (patch)
tree15fadfcc88eaa42e55a5db3a3af608e83c49ca3f /sys/dev/pci
parent392ac149b50e28008cd857a5eb434483a0aecf88 (diff)
stash the field showing which ports are hooked up, and dump it if verbose
debug is on
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/ahci.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c
index e6d3cfaf252..101570d7d84 100644
--- a/sys/dev/pci/ahci.c
+++ b/sys/dev/pci/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.10 2006/12/11 04:14:37 dlg Exp $ */
+/* $OpenBSD: ahci.c,v 1.11 2006/12/11 04:26:16 dlg Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -105,6 +105,8 @@ struct ahci_softc {
bus_space_handle_t sc_ioh;
bus_size_t sc_ios;
bus_dma_tag_t sc_dmat;
+
+ u_int32_t sc_portmap;
};
#define DEVNAME(_s) ((_s)->sc_dev.dv_xname)
@@ -178,9 +180,11 @@ ahci_attach(struct device *parent, struct device *self, void *aux)
break;
}
- printf("%s: CAP: 0x%b ports: %d ncmds: %d gen: %s\n",
+ printf("%s: capabilities: 0x%b ports: %d ncmds: %d gen: %s\n",
DEVNAME(sc), reg, AHCI_FMT_CAP,
AHCI_REG_CAP_NP(reg), AHCI_REG_CAP_NCS(reg), gen);
+ printf("%s: ports implemented: 0x%08x\n", DEVNAME(sc),
+ sc->sc_portmap);
}
#endif
@@ -281,6 +285,8 @@ ahci_init(struct ahci_softc *sc)
printf(": AHCI %s", revision);
+ sc->sc_portmap = ahci_read(sc, AHCI_REG_PI);
+
return (0);
}