summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2007-09-06 08:01:02 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2007-09-06 08:01:02 +0000
commit47262e2d33ab712b068ff95f285a7507eaea6669 (patch)
tree2a248a93914928182cd93d62c43a86dbe6776851 /sys/dev/pci
parenteb6444be9218520b716f377b4ca282b6fd8ff64b (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')
-rw-r--r--sys/dev/pci/sdhc_pci.c7
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;