From: "Kyungmin Park" <kmpark@infradead.org>
To: "Pierre Ossman" <drzeus-list@drzeus.cx>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][MMC] Fix wrong EXT_CSD_REV handling
Date: Thu, 13 Dec 2007 17:08:16 +0900 [thread overview]
Message-ID: <9c9fda240712130008s227a77dsbd9333c5227d51eb@mail.gmail.com> (raw)
In-Reply-To: <20071213085332.18d2790d@poseidon.drzeus.cx>
On Dec 13, 2007 4:53 PM, Pierre Ossman <drzeus-list@drzeus.cx> wrote:
> On Thu, 13 Dec 2007 16:13:11 +0900
> Kyungmin Park <kyungmin.park@samsung.com> wrote:
>
> > It already checked the ext_csd_struct is less than 2,
> > so it doesn't need to check it.
> > Current code only accepts the revision 1.2.
> >
> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>
> It wasn't wrong the last time you brought this up, and it still isn't wrong. Those bits aren't defined until version 1.2 of the EXT_CSD register, hence we do not trust them. If you have some broken card that you feel you must have support for, then start working on some quirks system.
Now see the code.
First, it checks the ext_csd_struct.
ext_csd_struct = ext_csd[EXT_CSD_REV];
if (ext_csd_struct > 2) {
printk(KERN_ERR "%s: unrecognised EXT_CSD structure "
"version %d\n", mmc_hostname(card->host),
ext_csd_struct);
err = -EINVAL;
goto out;
}
=> here possible values are 0, 1, 2
=> It only accepts the ext_csd 2 but my *broken* card has 1.
so it's failed.
if (ext_csd_struct >= 2) {
card->ext_csd.sectors =
ext_csd[EXT_CSD_SEC_CNT + 0] << 0 |
ext_csd[EXT_CSD_SEC_CNT + 1] << 8 |
ext_csd[EXT_CSD_SEC_CNT + 2] << 16 |
ext_csd[EXT_CSD_SEC_CNT + 3] << 24;
if (card->ext_csd.sectors)
mmc_card_set_blockaddr(card);
}
In my MMC Spec. (v4.2), there's no problem to read it even though it's
revision 1.1
Anyway how do it handle this one? Do you have any idea?
Thank you,
Kyungmin Park
next prev parent reply other threads:[~2007-12-13 8:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-13 7:13 Kyungmin Park
2007-12-13 7:53 ` Pierre Ossman
2007-12-13 8:08 ` Kyungmin Park [this message]
2007-12-13 8:24 ` Pierre Ossman
2007-12-14 2:01 ` Kyungmin Park
2007-12-18 8:04 ` Pierre Ossman
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=9c9fda240712130008s227a77dsbd9333c5227d51eb@mail.gmail.com \
--to=kmpark@infradead.org \
--cc=drzeus-list@drzeus.cx \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®