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]
Message-ID: <20061123194236.GD8984@flint.arm.linux.org.uk>
Date:	Thu, 23 Nov 2006 19:42:36 +0000
From:	Russell King <rmk+lkml@....linux.org.uk>
To:	Vitaly Wool <vitalywool@...il.com>
Cc:	drzeus-mmc@...eus.cx, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fix random SD/MMC card recognition failures on ARM Versatile

On Thu, Nov 23, 2006 at 10:29:30PM +0300, Vitaly Wool wrote:
> On 11/23/06, Russell King <rmk+lkml@....linux.org.uk> wrote:
> >Doubtful.  mmci_stop_data() already does this, which will be called
> >immediately prior to mmci_request_end().  So you're doubling up the
> >writes to registers again.
> 
> There's the case (mmci_cmd_irq) where mmc_stop_data is not called
> prior to mmci_request_end(), so it's not that simple.

Ah, I see it.  In that case we need to call mmc_stop_data() when
we're ending the initial command due to an error.  IOW, like this:

diff --git a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c
index 828503c..5ad0259 100644
--- a/drivers/mmc/mmci.c
+++ b/drivers/mmc/mmci.c
@@ -42,6 +42,8 @@ mmci_request_end(struct mmci_host *host,
 {
 	writel(0, host->base + MMCICOMMAND);
 
+	BUG_ON(host->data);
+
 	host->mrq = NULL;
 	host->cmd = NULL;
 
@@ -198,6 +200,8 @@ mmci_cmd_irq(struct mmci_host *host, str
 	}
 
 	if (!cmd->data || cmd->error != MMC_ERR_NONE) {
+		if (host->data)
+			mmci_stop_data(host);
 		mmci_request_end(host, cmd->mrq);
 	} else if (!(cmd->data->flags & MMC_DATA_READ)) {
 		mmci_start_data(host, cmd->data);


-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
-
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