All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Fritz <chf.fritz@googlemail.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc <linux-mmc@vger.kernel.org>
Subject: [PATCH v2] mmc: core: apply NO_CMD23 quirk to an ATP card
Date: Sun, 10 Sep 2017 01:44:47 +0200	[thread overview]
Message-ID: <1505000687.23171.20.camel@googlemail.com> (raw)
In-Reply-To: <1504998772.4004.2.camel@googlemail.com>

To get an ATP card work reliable on a high speed bus, CMD23 needs
to be disabled.

Without this patch:

 $ dd if=/dev/urandom of=/mnt/test bs=1M count=10

    <mmc0: starting CMD23 arg 00000400 flags 00000015>
    mmc0: starting CMD25 arg 00a71f00 flags 000000b5
    mmc0:     blksz 512 blocks 1024 flags 00000100 tsac 3000 ms nsac 0
    mmc0:     CMD12 arg 00000000 flags 0000049d
    sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
    mmc0: Timeout waiting for hardware interrupt.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
---
Changes since v1:
 - s/CMD32/CMD23

 drivers/mmc/core/card.h   | 1 +
 drivers/mmc/core/quirks.h | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/drivers/mmc/core/card.h b/drivers/mmc/core/card.h
index f06cd91..af9c48c 100644
--- a/drivers/mmc/core/card.h
+++ b/drivers/mmc/core/card.h
@@ -75,6 +75,7 @@ struct mmc_fixup {
 #define EXT_CSD_REV_ANY (-1u)
 
 #define CID_MANFID_SANDISK      0x2
+#define CID_MANFID_ATP          0x9
 #define CID_MANFID_TOSHIBA      0x11
 #define CID_MANFID_MICRON       0x13
 #define CID_MANFID_SAMSUNG      0x15
diff --git a/drivers/mmc/core/quirks.h b/drivers/mmc/core/quirks.h
index fb72593..3205f0e 100644
--- a/drivers/mmc/core/quirks.h
+++ b/drivers/mmc/core/quirks.h
@@ -52,6 +52,12 @@ static const struct mmc_fixup mmc_blk_fixups[] = {
 		  MMC_QUIRK_BLK_NO_CMD23),
 
 	/*
+	 * Some SD cards lockup while using CMD23 multiblock transfers.
+	 */
+	MMC_FIXUP("AF SD", CID_MANFID_ATP, CID_OEMID_ANY, add_quirk_sd,
+		  MMC_QUIRK_BLK_NO_CMD23),
+
+	/*
 	 * Some MMC cards need longer data read timeout than indicated in CSD.
 	 */
 	MMC_FIXUP(CID_NAME_ANY, CID_MANFID_MICRON, 0x200, add_quirk_mmc,
-- 
2.1.4


  reply	other threads:[~2017-09-09 23:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-09 23:12 [PATCH] mmc: block: apply NO_CMD32 quirk to an ATP card Christoph Fritz
2017-09-09 23:44 ` Christoph Fritz [this message]
2017-09-22  8:42   ` [PATCH v2] mmc: core: apply NO_CMD23 " Ulf Hansson
2017-09-22  9:26     ` Shawn Lin
2017-09-23 19:51       ` Christoph Fritz
2017-09-25  3:33         ` Shawn Lin
2017-09-25 11:23           ` Christoph Fritz
2017-09-26  0:56             ` Shawn Lin
2017-12-04 13:38               ` Christoph Fritz
2017-12-09 22:44                 ` Christoph Fritz
2017-12-09 22:47                   ` [PATCH v3] mmc: core: apply NO_CMD23 quirk to some specific cards Christoph Fritz
2017-12-11 13:00                     ` Ulf Hansson
2017-12-11 20:19                       ` Christoph Fritz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1505000687.23171.20.camel@googlemail.com \
    --to=chf.fritz@googlemail.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.