lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 02 Feb 2007 08:54:58 +0100
From:	Pierre Ossman <drzeus-mmc@...eus.cx>
To:	linux@...mustbejoking.demon.co.uk, linux-kernel@...r.kernel.org,
	sdhci-devel@...t.drzeus.cx
Subject: Re: [Sdhci-devel] [PATCH 2.6.20-rc2] Add a quirk to allow ENE PCI
 SD	card readers to work again

Hi Darren,

It has come to my attention that the current routine for setting power
is not compliant with the specification. As such, I'd like you to try
the following and see if removes the need for your patch:

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index dc1b04a..13ac2fe 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -685,23 +690,21 @@ static void sdhci_set_power(struct sdhci_host
*host, unsigned short power)
        if (power == (unsigned short)-1)
                goto out;

-       pwr = SDHCI_POWER_ON;
-
        switch (power) {
        case MMC_VDD_170:
        case MMC_VDD_180:
        case MMC_VDD_190:
-               pwr |= SDHCI_POWER_180;
+               pwr = SDHCI_POWER_180;
                break;
        case MMC_VDD_290:
        case MMC_VDD_300:
        case MMC_VDD_310:
-               pwr |= SDHCI_POWER_300;
+               pwr = SDHCI_POWER_300;
                break;
        case MMC_VDD_320:
        case MMC_VDD_330:
        case MMC_VDD_340:
-               pwr |= SDHCI_POWER_330;
+               pwr = SDHCI_POWER_330;
                break;
        default:
                BUG();
@@ -709,6 +712,10 @@ static void sdhci_set_power(struct sdhci_host
*host, unsigned short power)

        writeb(pwr, host->ioaddr + SDHCI_POWER_CONTROL);

+       pwr |= SDHCI_POWER_ON;
+
+       writeb(pwr, host->ioaddr + SDHCI_POWER_CONTROL);
+
 out:
        host->power = power;
 }


I'd appreciate if you could test this sooner rather than later as the
merge window is just around the corner.

Rgds
-- 
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  PulseAudio, core developer          http://pulseaudio.org
  rdesktop, core developer          http://www.rdesktop.org
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ