On 17/07/12 05:44, Jaehoon Chung wrote:

<snip>

> +/**
> + *   mmc_start_bkops - start BKOPS for supported cards
> + *   @card: MMC card to start BKOPS
> + *
> + *   Start background operations whenever requested.
> + *   when the urgent BKOPS bit is set in a R1 command response
> + *   then background operations should be started immediately.
> +*/
> +void mmc_start_bkops(struct mmc_card *card)
> +{
> +     int err;
> +     int timeout;
> +     u8 use_busy_signal;
> +
> +     BUG_ON(!card);
> +     if (!card->ext_csd.bkops_en || !(card->host->caps2 & MMC_CAP2_BKOPS))
> +             return;
> +
> +     if (mmc_is_exception_event(card, EXT_CSD_URGENT_BKOPS))
> +             if (card->ext_csd.raw_bkops_status)
> +                     mmc_card_set_need_bkops(card);
> +
> +     /*
> +      * If card is already doing bkops or need for
> +      * bkops flag is not set, then do nothing just
> +      * return
> +      */
> +     if (mmc_card_doing_bkops(card) || !mmc_card_need_bkops(card))
> +             return;
> +
> +     mmc_claim_host(card->host);
> +     if (card->ext_csd.raw_bkops_status >= EXT_CSD_BKOPS_LEVEL_2) {
> +             timeout = MMC_BKOPS_MAX_TIMEOUT;
> +             use_busy_signal = 0;
> +     } else {
> +             timeout = 0;
> +             use_busy_signal = 1;
> +     }

Is this the right way around?
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to