summaryrefslogtreecommitdiff
path: root/sys/dev/pci/ahci.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2006-12-12 02:41:51 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2006-12-12 02:41:51 +0000
commit2e1a1c4fca8b75bf5fadfa95afaed986d5e40406 (patch)
tree124ad60010ee21b073225505829917177858ce55 /sys/dev/pci/ahci.c
parentd5f9726a1b1d99b7c23019d128c3f00a18af9e46 (diff)
feng shui
Diffstat (limited to 'sys/dev/pci/ahci.c')
-rw-r--r--sys/dev/pci/ahci.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c
index 17ab0484ddf..c8fd227106a 100644
--- a/sys/dev/pci/ahci.c
+++ b/sys/dev/pci/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.28 2006/12/12 02:39:25 dlg Exp $ */
+/* $OpenBSD: ahci.c,v 1.29 2006/12/12 02:41:50 dlg Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -257,8 +257,6 @@ ahci_attach(struct device *parent, struct device *self, void *aux)
u_int32_t reg;
int i;
- sc->sc_dmat = pa->pa_dmat;
-
if (ahci_map_regs(sc, pa) != 0) {
/* error already printed by ahci_map_regs */
return;
@@ -276,6 +274,10 @@ ahci_attach(struct device *parent, struct device *self, void *aux)
printf("\n");
+ sc->sc_dmat = pa->pa_dmat;
+
+ reg = ahci_read(sc, AHCI_REG_CAP);
+ sc->sc_ncmds = AHCI_REG_CAP_NCS(reg);
#ifdef AHCI_DEBUG
if (ahcidebug & AHCI_D_VERBOSE) {
const char *gen;
@@ -416,9 +418,6 @@ ahci_init(struct ahci_softc *sc)
printf(": AHCI %s", revision);
- reg = ahci_read(sc, AHCI_REG_CAP);
- sc->sc_ncmds = AHCI_REG_CAP_NCS(reg);
-
return (0);
}