From: Ross Zwisler <zwisler@google.com>
To: Raul E Rangel <rrangel@chromium.org>
Cc: linux-mmc@vger.kernel.org, djkurtz@chromium.org,
zwisler@chromium.org, hongjiefang <hongjiefang@asrmicro.com>,
Jennifer Dahm <jennifer.dahm@ni.com>,
linux-kernel@vger.kernel.org,
Kyle Roeschley <kyle.roeschley@ni.com>,
Avri Altman <avri.altman@wdc.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [PATCH v1] mmc: core: Verify SD bus width
Date: Mon, 15 Apr 2019 15:48:10 -0600 [thread overview]
Message-ID: <20190415214810.GA157394@google.com> (raw)
In-Reply-To: <20190415210031.54062-1-rrangel@chromium.org>
On Mon, Apr 15, 2019 at 03:00:31PM -0600, Raul E Rangel wrote:
> The SD Physical Layer Spec says the following: Since the SD Memory Card
> shall support at least the two bus modes 1-bit or 4-bit width, then any SD
> Card shall set at least bits 0 and 2 (SD_BUS_WIDTH="0101").
>
> This change verifies the card has specified a bus width.
>
> verified it didn't mount.
>
> Signed-off-by: Raul E Rangel <rrangel@chromium.org>
> ---
> AMD SDHC Device 7806 can get into a bad state after a card disconnect
> where anything transferred via the DATA lines will always result in a
> zero filled buffer. Currently the driver will continue without error if
> the HC is in this condition. A block device will be created, but reading
> from it will result in a zero buffer. This makes it seem like the SD
> device has been erased, when in actuality the data is never getting
> copied from the DATA lines to the data buffer.
>
> SCR is the first command in the SD initialization sequence that uses the
> DATA lines. By checking that the response was invalid, we can abort
> mounting the card.
>
> Here is an example of a bad trace: https://pastebin.com/TY2cF9n0
> Look for sd_scr and sd_ssr.
Personally I think that all the info you have here below the --- should be in
the actual commit message. It provides context for the bug that the patch is
fixing, what the old and new behaviors are and how you tested. The text below
the --- is for ephemeral things that don't matter once the code is committed:
what revision of the patch set you are on, noting that you've addressed
someone's comments, etc.
next prev parent reply other threads:[~2019-04-15 21:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 21:00 [PATCH v1] mmc: core: Verify SD bus width Raul E Rangel
2019-04-15 21:48 ` Ross Zwisler [this message]
2019-04-16 12:18 ` Avri Altman
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=20190415214810.GA157394@google.com \
--to=zwisler@google.com \
--cc=avri.altman@wdc.com \
--cc=djkurtz@chromium.org \
--cc=hongjiefang@asrmicro.com \
--cc=jennifer.dahm@ni.com \
--cc=kyle.roeschley@ni.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=rrangel@chromium.org \
--cc=ulf.hansson@linaro.org \
--cc=zwisler@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox