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:	Tue, 26 May 2009 22:16:59 +0200
From:	pHilipp Zabel <philipp.zabel@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Ian Molton <spyro@....com>, Pierre Ossman <pierre@...man.eu>
Subject: Re: [PATCH 2/5] mmc: tmio_mmc: add bus_shift support

On Mon, May 25, 2009 at 9:27 PM, Philipp Zabel <philipp.zabel@...il.com> wrote:
> Some ASIC3 devices in the wild are connected with the address bus shifted
> by one line, so that its 16-bit registers appear 32-bit aligned in host
> memory space.

This patch has to be amended:

diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index 245de05..8223977 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -495,7 +495,8 @@ static int tmio_mmc_resume(struct platform_device *dev)

        /* Enable the MMC/SD Control registers */
        sd_config_write16(host, CNF_CMD, SDCREN);
-       sd_config_write32(host, CNF_CTL_BASE, dev->resource[0].start & 0xfffe);
+       sd_config_write32(host, CNF_CTL_BASE,
+               (dev->resource[0].start >> host->bus_shift) & 0xfffe);

        /* Tell the MFD core we are ready to be enabled */
        if (cell->enable) {
@@ -566,7 +567,8 @@ static int __devinit tmio_mmc_probe(struct
platform_device *dev)

        /* Enable the MMC/SD Control registers */
        sd_config_write16(host, CNF_CMD, SDCREN);
-       sd_config_write32(host, CNF_CTL_BASE, dev->resource[0].start & 0xfffe);
+       sd_config_write32(host, CNF_CTL_BASE,
+               (dev->resource[0].start >> host->bus_shift) & 0xfffe);

        /* Tell the MFD core we are ready to be enabled */
        if (cell->enable) {

The resources have to be shifted back when configuring the SD control
register space.

regards
Philipp
--
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