diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-10-05 20:39:27 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-10-05 20:39:27 +0000 |
commit | 883437ccf6d9931831d1a591ac38b72ed749138a (patch) | |
tree | d91ab2c49c74187a858764f25bee4a0418db8cd7 /sys/dev | |
parent | 4592cc032e69370ea1a10fbc86d08ddc1dde17b5 (diff) |
Fill pciide_unmapregs_compat() with stuff which might work, if we ever get
there.
ok jsg
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/pciide.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c index 6afcf51c379..534ad48ec76 100644 --- a/sys/dev/pci/pciide.c +++ b/sys/dev/pci/pciide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciide.c,v 1.300 2009/10/05 20:01:40 jsg Exp $ */ +/* $OpenBSD: pciide.c,v 1.301 2009/10/05 20:39:26 deraadt Exp $ */ /* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */ /* @@ -1401,6 +1401,8 @@ pciide_mapregs_compat(struct pci_attach_args *pa, struct pciide_channel *cp, PCIIDE_COMPAT_CMD_SIZE); return (0); } + wdc_cp->cmd_iosz = *cmdsizep; + wdc_cp->ctl_iosz = *ctlsizep; return (1); } @@ -1408,7 +1410,17 @@ pciide_mapregs_compat(struct pci_attach_args *pa, struct pciide_channel *cp, int pciide_unmapregs_compat(struct pciide_softc *sc, struct pciide_channel *cp) { - panic("unmapregs_compat not implemented"); + struct channel_softc *wdc_cp = &cp->wdc_channel; + + bus_space_unmap(wdc_cp->cmd_iot, wdc_cp->cmd_ioh, wdc_cp->cmd_iosz); + bus_space_unmap(wdc_cp->ctl_iot, wdc_cp->cmd_ioh, wdc_cp->ctl_iosz); + + if (sc->sc_pci_ih != NULL) { + pciide_machdep_compat_intr_disestablish(sc->sc_pc, sc->sc_pci_ih); + sc->sc_pci_ih = NULL; + } + + return (0); } int |