lkml.org 
[lkml]   [2010]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 2/7] mmc: at91_mci: fix timeout errors
    Date
    From: Wolfgang Muees <wolfgang.mues@auerswald.de>

    Fix two timeout errors, one for slow SDHC cards and one for slow users while
    inserting SD cards.

    Signed-off-by: Wolfgang Muees <wolfgang.mues@auerswald.de>
    Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
    ---
    drivers/mmc/host/at91_mci.c | 6 ++++--
    1 files changed, 4 insertions(+), 2 deletions(-)

    diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
    index 6835104..f2cb716 100644
    --- a/drivers/mmc/host/at91_mci.c
    +++ b/drivers/mmc/host/at91_mci.c
    @@ -756,7 +756,8 @@ static void at91_mci_request(struct mmc_host *mmc, struct mmc_request *mrq)
    host->request = mrq;
    host->flags = 0;

    - mod_timer(&host->timer, jiffies + HZ);
    + /* more than 1s timeout needed with slow SD cards */
    + mod_timer(&host->timer, jiffies + msecs_to_jiffies(2000));

    at91_mci_process_next(host);
    }
    @@ -944,7 +945,8 @@ static irqreturn_t at91_mmc_det_irq(int irq, void *_host)
    pr_debug("****** Resetting SD-card bus width ******\n");
    at91_mci_write(host, AT91_MCI_SDCR, at91_mci_read(host, AT91_MCI_SDCR) & ~AT91_MCI_SDCBUS);
    }
    - mmc_detect_change(host->mmc, msecs_to_jiffies(100));
    + /* 0.5s needed because of early card detect switch firing */
    + mmc_detect_change(host->mmc, msecs_to_jiffies(500));
    }
    return IRQ_HANDLED;
    }
    --
    1.5.6.5


    \
     
     \ /
      Last update: 2010-02-26 18:41    [W:0.023 / U:61.452 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site