summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pci/if_mtd_pci.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/if_mtd_pci.c b/sys/dev/pci/if_mtd_pci.c
index 9e66cd9acec..20a412ef6b1 100644
--- a/sys/dev/pci/if_mtd_pci.c
+++ b/sys/dev/pci/if_mtd_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mtd_pci.c,v 1.6 2003/09/25 22:06:00 mickey Exp $ */
+/* $OpenBSD: if_mtd_pci.c,v 1.7 2003/09/29 03:08:17 mickey Exp $ */
/*
* Copyright (c) 2003 Oleg Safiullin <form@pdp11.org.ru>
@@ -84,6 +84,11 @@ mtd_pci_attach(struct device *parent, struct device *self, void *aux)
const char *intrstr = NULL;
bus_size_t iosize;
+ sc->sc_devid = PCI_PRODUCT(pa->pa_id);
+ if (sc->sc_devid == PCI_PRODUCT_MYSON_MTD800 &&
+ pci_conf_read(pa->pa_pc, pa->pa_tag, MTD_PCI_LOIO) & 0x300)
+ pa->pa_flags &= ~PCI_FLAGS_IO_ENABLED;
+
#ifndef MTD_USE_IO
if (pci_mapreg_map(pa, MTD_PCI_LOMEM, PCI_MAPREG_TYPE_MEM, 0,
&sc->sc_bust, &sc->sc_bush, NULL, &iosize, 0)) {