diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-09-29 03:08:18 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-09-29 03:08:18 +0000 |
commit | 4ae6757f7e51115cd506d4f5555ef6c733d05d5d (patch) | |
tree | 43f20f7b0088402be556a40e20f5e6ce8a39ed76 /sys/dev/pci/if_mtd_pci.c | |
parent | f087f1d66b7f7d08e8e09849a6cb5d158034373a (diff) |
gotta remember the product id and disable io mapping for old 800 chips; from form@
Diffstat (limited to 'sys/dev/pci/if_mtd_pci.c')
-rw-r--r-- | sys/dev/pci/if_mtd_pci.c | 7 |
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)) { |