linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Shawn Lin <shawn.lin@rock-chips.com>,
	bcm-kernel-feedback-list@broadcom.com,
	linux-rpi-kernel@lists.infradead.org,
	linux-mmc <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	P L Sai Krishna <lakshmi.sai.krishna.potthuri@xilinx.com>,
	Wan Zongshun <vincent.wan@amd.com>,
	Jisheng Zhang <jszhang@marvell.com>
Subject: Re: [RFC PATCH 0/21] Totally remove SDHCI_QUIRK_BROKEN_CARD_DETECTION quirk
Date: Mon, 1 Feb 2016 14:32:49 +0200	[thread overview]
Message-ID: <56AF5071.9050103@intel.com> (raw)
In-Reply-To: <20160129172817.GR10826@n2100.arm.linux.org.uk>

On 29/01/16 19:28, Russell King - ARM Linux wrote:
> On Fri, Jan 29, 2016 at 02:08:21PM +0200, Adrian Hunter wrote:
>> I might make a tree because I want to try to separate Russell's bug fixes
>> from the clean-ups, and then cc stable on the bug fixes.
> 
> It would be good if you could ask for that, I'll look at rearranging
> (and re-testing) the patches to achieve that.  Had I known that, I
> could've done it before posting the latest set of patches.

If you don't mind doing that, that would be great!

So far the fixes, I have identified:

1. mmc: sdhci: command response CRC error handling

Could have "fix" in the subject i.e. "fix command response CRC error handling".

Could change to be dependent only on "mmc: sdhci: move initialisation of
command error member".  Also I would treat end-bit and index errors the same
as CRC errors i.e. probably end up with:

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index d622435d1bcc..6cae93a89eba 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2325,8 +2325,23 @@ static void sdhci_cmd_irq(struct sdhci_host *host,
u32 intmask, u32 *mask)
 	if (intmask & SDHCI_INT_TIMEOUT)
 		host->cmd->error = -ETIMEDOUT;
 	else if (intmask & (SDHCI_INT_CRC | SDHCI_INT_END_BIT |
-			SDHCI_INT_INDEX))
+			SDHCI_INT_INDEX)) {
 		host->cmd->error = -EILSEQ;
+		/*
+		 * If this command initiates a data phase and a response
+		 * CRC error is signalled, the card can start transferring
+		 * data - the card may have received the command without
+		 * error.  We must not terminate the mmc_request early.
+		 *
+		 * If the card did not receive the command or returned an
+		 * error which prevented it sending data, the data phase
+		 * will time out.
+		 */
+		if (host->cmd->data) {
+			host->cmd = NULL;
+			return;
+		}
+	}

 	if (host->cmd->error) {
 		tasklet_schedule(&host->finish_tasklet);

2. mmc: sdhci: avoid unnecessary mapping/unmapping of align buffer

This looks like a bug fix because the mapping can be leaked on the error
path i.e. similar problem to the one fixed by "mmc: sdhci: plug DMA mapping
leak on error"

3. mmc: sdhci: plug DMA mapping leak on error

It looks like the 2nd chunk could be taken as a separate fix without
dependence on other patches.

4. mmc: sdhci-pxav3: fix higher speed mode capabilities

I can't test this so please indicate if you want it for stable.

5. mmc: sdhci: further fix for DMA unmapping in sdhci_post_req()

Could be made independent of other patches.

6. mmc: sdhci: fix data timeout (part 1)
mmc: sdhci: fix data timeout (part 2)

Could be just 1 patch.



  reply	other threads:[~2016-02-01 12:36 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27  5:05 [RFC PATCH 0/21] Totally remove SDHCI_QUIRK_BROKEN_CARD_DETECTION quirk Shawn Lin
2016-01-27  5:06 ` [RFC PATCH 01/21] mmc: sdhci-pltfm: consolidate parsing path Shawn Lin
2016-01-27  5:06 ` [RFC PATCH 02/21] mmc: sdhci-iproc: " Shawn Lin
2016-01-27  5:06 ` [RFC PATCH 03/21] mmc: sdhci-msm: " Shawn Lin
2016-01-27  5:06 ` [RFC PATCH 04/21] mmc: sdhci-of-arasan: " Shawn Lin
2016-01-27  5:06 ` [RFC PATCH 05/21] mmc: sdhci-of-at91: " Shawn Lin
2016-01-27  5:07 ` [RFC PATCH 06/21] mmc: sdhci-of-esdhc: " Shawn Lin
2016-01-27  5:07 ` [RFC PATCH 07/21] mmc: sdhci-pxav3: " Shawn Lin
2016-01-27  5:44   ` Jisheng Zhang
2016-01-27  6:17     ` Shawn Lin
2016-01-27  5:07 ` [RFC PATCH 08/21] mmc: sdhci-sirf: check sdhci_get_of_property return value Shawn Lin
2016-01-27  5:07 ` [RFC PATCH 09/21] mmc: sdhci_f_sdh30: " Shawn Lin
2016-01-27  5:08 ` [RFC PATCH 10/21] mmc: sdhci: remove SDHCI_QUIRK_BROKEN_CARD_DETECTION Shawn Lin
2016-01-27  7:11   ` Haibo Chen
2016-01-27  7:20     ` Shawn Lin
2016-01-27  5:08 ` [RFC PATCH 11/21] mmc: sdhci-acpi: " Shawn Lin
2016-01-27  5:08 ` [RFC PATCH 12/21] mmc: sdhci-bcm-kona: " Shawn Lin
2016-01-27  5:08 ` [RFC PATCH 13/21] mmc: sdhci-bcm2835: " Shawn Lin
2016-01-27  5:08 ` [RFC PATCH 14/21] mmc: sdhci-esdhc-imx: " Shawn Lin
     [not found]   ` <1453871318-3888-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-01-27  6:54     ` Haibo Chen
2016-01-27  6:58       ` Shawn Lin
2016-01-27  5:08 ` [RFC PATCH 15/21] mmc: sdhci-msm: " Shawn Lin
2016-01-27  5:08 ` [RFC PATCH 16/21] mmc: sdhci-of-esdhc: " Shawn Lin
2016-01-27  5:09 ` [RFC PATCH 17/21] mmc: sdhci-pci-core: " Shawn Lin
2016-01-27  5:09 ` [RFC PATCH 18/21] mmc: sdhci-pltfm: " Shawn Lin
2016-01-27  5:09 ` [RFC PATCH 19/21] mmc: sdhci-pxav2: " Shawn Lin
2016-01-27  5:09 ` [RFC PATCH 20/21] mmc: sdhci-s3c: " Shawn Lin
2016-01-27  5:09 ` [RFC PATCH 21/21] mmc: sdhci.h: " Shawn Lin
2016-01-27 12:59 ` [RFC PATCH 0/21] Totally remove SDHCI_QUIRK_BROKEN_CARD_DETECTION quirk Adrian Hunter
2016-01-27 13:23   ` Russell King - ARM Linux
2016-01-27 15:07     ` Ulf Hansson
2016-01-28  2:17       ` Shawn Lin
2016-01-28 11:29         ` One Thousand Gnomes
2016-01-28 15:03           ` Ulf Hansson
2016-01-28 15:54             ` One Thousand Gnomes
2016-01-28 12:03       ` Adrian Hunter
2016-01-28 15:16         ` Ulf Hansson
2016-01-28 16:27           ` Russell King - ARM Linux
2016-01-29 12:08           ` Adrian Hunter
2016-01-29 17:28             ` Russell King - ARM Linux
2016-02-01 12:32               ` Adrian Hunter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-01-27  5:04 Shawn Lin
2016-02-04 10:40 ` Ulf Hansson

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=56AF5071.9050103@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=jszhang@marvell.com \
    --cc=lakshmi.sai.krishna.potthuri@xilinx.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux@arm.linux.org.uk \
    --cc=shawn.lin@rock-chips.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vincent.wan@amd.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).