lkml.org 
[lkml]   [2009]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: MMC layer regression with single-block controllers
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).

Thanks!
Manuel Lauss


\
 
 \ /
  Last update: 2009-03-25 11:55    [W:0.055 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site