Re: [PATCH] mmc: core: retry CMD1 in mmc_send_op_cond() even if the ocr = 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Shimoda-san,

thank you for this bugfix! Looks like a nice catch.

> +
> +		/*
> +		 * According to eMMC specification, we should issue CMD1

Maybe it is good to specify where? I found it in the standard v5.1,
section 6.4.3.

> +		 * repeatidly in the idle state until the eMMC is ready even if

"repeatedly"

> +		 * the mmc_attach_mmc() calls this function with ocr = 0.

I would suggest to remove the "if ..." part from the comment. Because
you remove the 'if (ocr == 0)' code, so it becomes less obvious what
that part of the comment relates to.

> +		 * Otherwise some eMMC devices seem to enter the inactive mode
> +		 * after mmc_init_card() issued CMD0 when the eMMC device is
> +		 * busy.
> +		 */

Other than that, good documentation!

> +		if (!ocr && !mmc_host_is_spi(host))
> +			cmd.arg = cmd.resp[0] | BIT(30);

I think BIT(30) is okay for this bugfix. But as a follow up, we should
turn this into a define. It could be used in mmc_init_card() as well and
will make the code way more readable.

All the best,

   Wolfram

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux