summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2019-11-20 16:34:58 +0000
committerpatrick <patrick@openbsd.org>2019-11-20 16:34:58 +0000
commitddfcd1cc9cf308d9c3039e0fbda6ccbe3295d2b3 (patch)
tree1564c3ddb2647d5146e1497893b2590c3d92ffda
parentregen (diff)
downloadwireguard-openbsd-ddfcd1cc9cf308d9c3039e0fbda6ccbe3295d2b3.tar.xz
wireguard-openbsd-ddfcd1cc9cf308d9c3039e0fbda6ccbe3295d2b3.zip
Some Intel SD/MMC controllers do not like the voltage being
set to 0V, so add a quirk for Apollo Lake, Gemini Lake and 100 Series. Tested by and ok bmercer@ and mlarkin@ for 100 Series Tested by and diff from James Hastings for Apollo and Gemini Lake
-rw-r--r--sys/dev/pci/sdhc_pci.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/pci/sdhc_pci.c b/sys/dev/pci/sdhc_pci.c
index d1b6688f573..712ffe69fc2 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.20 2016/04/30 11:32:23 kettenis Exp $ */
+/* $OpenBSD: sdhc_pci.c,v 1.21 2019/11/20 16:34:58 patrick Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -127,6 +127,13 @@ sdhc_pci_attach(struct device *parent, struct device *self, void *aux)
PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_ENE_SDCARD)
sc->sc.sc_flags |= SDHC_F_NOPWR0;
+ /* Some Intel controllers break if set to 0V bus power. */
+ if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_INTEL &&
+ (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_INTEL_100SERIES_LP_EMMC ||
+ PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_INTEL_APOLLOLAKE_EMMC ||
+ PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_INTEL_GLK_EMMC))
+ sc->sc.sc_flags |= SDHC_F_NOPWR0;
+
/* Some RICOH controllers need to be bumped into the right mode. */
if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_RICOH &&
(PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_RICOH_R5U822 ||