diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2007-09-06 08:01:02 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2007-09-06 08:01:02 +0000 |
commit | 47262e2d33ab712b068ff95f285a7507eaea6669 (patch) | |
tree | 2a248a93914928182cd93d62c43a86dbe6776851 /sys/dev/pci/sdhc_pci.c | |
parent | eb6444be9218520b716f377b4ca282b6fd8ff64b (diff) |
Don't try disabling bus power before setting the voltage on
the buggy ENE controller.
Tested by Alexey Suslikov <alexey.suslikov@gmail.com> who
pointed out a similiar workaround in Linux.
ok miod@, nit and ok kettenis@
Diffstat (limited to 'sys/dev/pci/sdhc_pci.c')
-rw-r--r-- | sys/dev/pci/sdhc_pci.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/sdhc_pci.c b/sys/dev/pci/sdhc_pci.c index 5ae66552af5..46a7ebe66f0 100644 --- a/sys/dev/pci/sdhc_pci.c +++ b/sys/dev/pci/sdhc_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdhc_pci.c,v 1.5 2006/07/19 20:58:45 fgsch Exp $ */ +/* $OpenBSD: sdhc_pci.c,v 1.6 2007/09/06 08:01:01 jsg Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -85,6 +85,11 @@ sdhc_pci_attach(struct device *parent, struct device *self, void *aux) pa->pa_function == 4) sdhc_takecontroller(pa); + /* ENE controllers break if set to 0V bus power */ + if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_ENE && + PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ENE_SDCARD) + sc->sc.sc_flags |= SDHC_F_NOPWR0; + if (pci_intr_map(pa, &ih)) { printf(": can't map interrupt\n"); return; |