diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-12-03 04:33:07 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-12-03 04:33:07 +0000 |
commit | b74cd21dd67661ec78aa874b0703af9abd95872f (patch) | |
tree | 6f77e03afe8c6d310eb2280c8b85946043c9ec8b /sys/dev/ic/ahci.c | |
parent | 49d2025234edfff3228b41cb00528dc9353ebe13 (diff) |
Turn ahci port start into a callback so sxiahci can do some magic to
setup dma. Modified version of a patch from Edwin Amsler which was
based on changes made in Bitrig by Artturi Alm.
ok dlg@
Diffstat (limited to 'sys/dev/ic/ahci.c')
-rw-r--r-- | sys/dev/ic/ahci.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c index 680dae6f7fb..db893ab3ef1 100644 --- a/sys/dev/ic/ahci.c +++ b/sys/dev/ic/ahci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahci.c,v 1.16 2014/07/13 23:10:23 deraadt Exp $ */ +/* $OpenBSD: ahci.c,v 1.17 2014/12/03 04:33:06 jsg Exp $ */ /* * Copyright (c) 2006 David Gwynne <dlg@openbsd.org> @@ -75,7 +75,7 @@ int ahci_port_alloc(struct ahci_softc *, u_int); void ahci_port_free(struct ahci_softc *, u_int); int ahci_port_init(struct ahci_softc *, u_int); -int ahci_port_start(struct ahci_port *, int); +int ahci_default_port_start(struct ahci_port *, int); int ahci_port_stop(struct ahci_port *, int); int ahci_port_clo(struct ahci_port *); int ahci_port_softreset(struct ahci_port *); @@ -175,6 +175,9 @@ ahci_attach(struct ahci_softc *sc) u_int32_t pi; int i; + if (sc->sc_port_start == NULL) + sc->sc_port_start = ahci_default_port_start; + if (ahci_init(sc) != 0) { /* error already printed by ahci_init */ goto unmap; @@ -832,7 +835,7 @@ reterr: } int -ahci_port_start(struct ahci_port *ap, int fre_only) +ahci_default_port_start(struct ahci_port *ap, int fre_only) { u_int32_t r; |