public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Pierre Ossman <drzeus-list@drzeus.cx>, linux-kernel@vger.kernel.org
Subject: Re: 2GB MMC/SD cards
Date: Sat, 3 Jun 2006 16:02:29 +0100	[thread overview]
Message-ID: <20060603150229.GC31182@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20060603141548.GA31182@flint.arm.linux.org.uk>

On Sat, Jun 03, 2006 at 03:15:48PM +0100, Russell King wrote:
> I don't know what to do about this since I don't have any cards and
> I've not seen any bug reports to investigate what's going on.  So I'm
> just going to say "the code as it stands is correct as to my best
> knowledge, please provide details of it's failings."

It would be nice to get the results from the following patch from people
with failing cards.  Obviously they need to enable the debugging message
to see it.

diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c
--- a/drivers/mmc/mmc_block.c
+++ b/drivers/mmc/mmc_block.c
@@ -44,6 +44,7 @@
 #define MMC_SHIFT	3
 
 static int major;
+static int debug;
 
 /*
  * There is one mmc_blk_data per slot.
@@ -324,6 +325,19 @@ static struct mmc_blk_data *mmc_blk_allo
 	 */
 	md->read_only = mmc_blk_readonly(card);
 
+	if (debug)
+		printk(KERN_INFO "%s: sd%u mmca%u cap0x%x rd:b%u:m%u:p%u wr:b%u:m%u:p%u\n",
+			mmc_card_id(card),
+			mmc_card_sd(card),
+			card->csd.mmca_vsn,
+			card->csd.capacity,
+			card->csd.read_blkbits,
+			card->csd.read_misalign,
+			card->csd.read_partial,
+			card->csd.write_blkbits,
+			card->csd.write_misalign,
+			card->csd.write_partial);
+
 	/*
 	 * Figure out a workable block size.  MMC cards have:
 	 *  - two block sizes, one for read and one for write.
@@ -575,5 +589,8 @@ module_exit(mmc_blk_exit);
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Multimedia Card (MMC) block device driver");
 
+module_param(debug, int, 0644);
+MODULE_PARM_DESC(debug, "enable debugging messages");
+
 module_param(major, int, 0444);
 MODULE_PARM_DESC(major, "specify the major device number for MMC block driver");

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  reply	other threads:[~2006-06-03 15:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-29 14:00 2GB MMC/SD cards Pierre Ossman
2006-06-03 14:15 ` Russell King
2006-06-03 15:02   ` Russell King [this message]
2006-06-03 18:40   ` Matt Reimer
2006-06-03 21:13     ` Pierre Ossman
2006-06-05 22:29       ` Jordan Crouse
2006-06-06  7:17         ` Richard Purdie
2006-06-05 22:52       ` Pierre Ossman
2006-06-07  9:08         ` Pierre Ossman
2006-06-07 16:58           ` Russell King
2006-06-07 20:36             ` Pierre Ossman
2006-06-08 23:01               ` Pierre Ossman
2006-06-22 15:08                 ` Marcin Juszkiewicz
2006-08-13 10:14                 ` Daniel Drake
2006-08-22 15:19                   ` Juha Yrjola
2006-08-22 17:00                     ` Jeff Chua
2006-08-23 18:28                     ` Pierre Ossman
2006-08-25  9:07                     ` Russell King
2006-06-03 21:11   ` 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=20060603150229.GC31182@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --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