On Jan 10, 2011, at 8:57 AM, Pierre Tardy wrote: >> >> >> Since the code is not called that often could you change the above code to: >> >>> if (mmc_card_sdio(card)) >>> return !(card->quirks & MMC_QUIRK_BROKEN_CLK_GATING); > Well, The comment in the >> return true; >> >> more obvious that quirk only applies to sdio. > > Disagree.Actually, before this code, there is a pretty long comment, > that explain that this quirk only apply to sdio. > > If we figure out later that some sdcard does not like clock gating > either, we could add this quirk to those bad sdcard as well. I am okay with this -- if you resubmit -- just indicate the quirk is more generic than just sdio > > Here is the whole resulting function. I think this is clear enough: > > static bool mmc_host_may_gate_card(struct mmc_card *card) > { > > /* If there is no card we may gate it */ > if (!card) > return true; > /* > * Don't gate SDIO cards! These need to be clocked at all times > * since they may be independent systems generating interrupts > * and other events. The clock requests counter from the core will > * go down to zero since the core does not need it, but we will not > * gate the clock, because there is somebody out there that may still > * be using it. > */ > return !(card->quirks & MMC_QUIRK_BROKEN_CLK_GATING); > > > } > Pierre -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html