public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Manuel Lauss <mano@roarinelk.homelinux.net>
Cc: Pierre Ossman <drzeus@drzeus.cx>, linux-kernel@vger.kernel.org
Subject: Re: MMC layer regression with single-block controllers
Date: Wed, 25 Mar 2009 12:04:01 +0100	[thread overview]
Message-ID: <20090325110401.GM27476@kernel.dk> (raw)
In-Reply-To: <20090325104837.GA18389@roarinelk.homelinux.net>

On Wed, Mar 25 2009, Manuel Lauss wrote:
> Hello Pierre, Jens,
> 
> On Tue, Mar 24, 2009 at 09:01:38PM +0100, Pierre Ossman wrote:
> > On Mon, 23 Mar 2009 10:28:02 +0100
> > Manuel Lauss <mano@roarinelk.homelinux.net> wrote:
> > 
> > > Hello Pierre,
> > > 
> > > Since about 2.6.28-rc1, I hit the following BUG_ON() in mmc/core.c
> > > (line 155):
> > > 
> > >         if (mrq->data) {
> > >                 BUG_ON(mrq->data->blksz > host->max_blk_size);
> > > >>>>>>>>>       BUG_ON(mrq->data->blocks > host->max_blk_count);  <<<<<<
> > >                 BUG_ON(mrq->data->blocks * mrq->data->blksz >
> > >                         host->max_req_size);
> > > 
> > > It's easy to reproduce; just set your favorite host controllers'
> > > mmc->max_blk_cnt to 1 (or anything smaller than 4).  As far as I can
> > > tell it was introduced with some block layer changes before 2.6.28-rc1
> > > was released.
> > > 
> > 
> > Ouch. Have you determined that it is the block layer that isn't
> > respecting its settings? If so, the we probably need to notify Jens
> > Axboe.
> 
> (Added Jens to CC).
> 
> Yes, it seems the block layer doesn't honor the one-sector request made
> in drivers/mmc/card/queue.c:187 (and 161).  The debug log says:
> 
> mmc0: new SD card at address aaaa
> blk_queue_max_sectors: set to minimum 8
> mmc0: starting CMD16 arg 00000200 flags 00000095
> mmc0: req done (CMD16): 0: 00000900 00000000 00000000 00000000
> mmcblk0: mmc0:aaaa SD01G 968 MiB
>  mmcblk0:<7>mmc0: starting CMD18 arg 00000000 flags 000000b5
> mmc0:     blksz 512 blocks 8 flags 00000200 tsac 100 ms nsac 0
> mmc0:     CMD12 arg 00000000 flags 0000049d
> ------------[ cut here ]------------
> kernel BUG at /mnt/work/sh7760/kernel/linux-2.6.git/drivers/mmc/core/core.c:155!
> 
> 
> This "blk_queue_max_sectors: set to minimum 8" is what's haunting my
> mmc host driver (hardware has enormous problems doing multiblock writes,
> hence the limitation to a single block per request).

Well, as the warning tells you, it's not supported. But that doesn't
mean you can't do single sector transfers and complete the IO when you
have done all of them.

-- 
Jens Axboe


  reply	other threads:[~2009-03-25 11:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-23  9:28 MMC layer regression with single-block controllers Manuel Lauss
2009-03-24 20:01 ` Pierre Ossman
2009-03-25 10:48   ` Manuel Lauss
2009-03-25 11:04     ` Jens Axboe [this message]
2009-03-25 11:36       ` Pierre Ossman
2009-03-25 11:42         ` Jens Axboe
2009-03-25 15:53           ` Pierre Ossman
2009-03-25 16:14             ` Jens Axboe
2009-03-25 16:24               ` Pierre Ossman
2009-03-25 17:43                 ` Jens Axboe

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=20090325110401.GM27476@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=drzeus@drzeus.cx \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mano@roarinelk.homelinux.net \
    /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