Hi, Sachin On 01/15/2014 04:31 PM, Sachin Kamat wrote:
mmc_gpio_get_cd returns a negative error value upon failure. However gpio_cd was initialised with the negated return value of the above function. This negation resulted in losing of the error value thereby triggering the code to take a wrong path as IS_ERR_VALUE(gpio_cd) now returned 0 even when mmc_gpio_get_cd returned an error value. This issue introduced by commit bf626e5550f2 ("mmc: dw_mmc: use slot-gpio to handle cd pin") caused card detection failure on Exynos5 boards which is now fixed by this patch. Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx> Cc: Zhangfei Gao <zhangfei.gao@xxxxxxxxxx> Cc: Jaehoon Chung <jh80.chung@xxxxxxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> ---
Thanks for the patch I just submitted one patch to fix the issue, in case you missed it. Also spin_lock is required for atomic accessing DW_MMC_CARD_PRESENT. Otherwise sd detect may be failed sometimes. Could you help take a look. Thanks -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html