Re: [PATCH 4/5] mmc: cmdq: support for command queue enabled host

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

 



Hi Asutosh,

Asutosh Das <asutoshd <at> codeaurora.org> writes:

> +	} else if (status & CQIS_TCC) {
> +		/* read QCTCN and complete the request */
> +		comp_status = cmdq_readl(cq_host, CQTCN);
> +		if (!comp_status) {
> +			pr_err("%s: bogus comp-stat\n", __func__);
> +			cmdq_dumpregs(cq_host);
> +			WARN_ON(1);
> +		}
> +		for_each_set_bit(tag, &comp_status, cq_host->num_slots) {
> +			/* complete the corresponding mrq */
> +			cmdq_finish_data(mmc, tag);
   
    According to eMMC 5.1 spec: CQE shall set bit n of QCTCN
    when a task execution is completed (with success or error).

    Assume an error and an data completion both occur at the same time,
    then two bits of CQTCN register will be set. One bit presents the completion.
    The other one indicates the error slot.

    Based on your implementation, host will handle the error with cmdq_finish_data.
    Later, mrq->data->error/mrq->cmd->error are used to check error status.
    However, there is no cmdq code to set those two error flags.
    They are supposed to be setup in legacy eMMC irq handling, which is replaced
    by your cmdq irq handling. Thus actually host will receive the error request with
    no error flag. As a result, host will treat the error request as a successful one.
 
     Thus there will be no error handling. Or the error handling will be executed
     after the error request has been finished as a successful completion.

> +			/* complete DCMD on tag 31 */
> +		}
> +		cmdq_writel(cq_host, comp_status, CQTCN);
> +	} else if (status & CQIS_RED) {
> +		/* task response has an error */
> +		pr_err("%s: RED error %d !!!\n", mmc_hostname(mmc), status);
> +		cmdq_dumpregs(cq_host);
> +		BUG_ON(1);

    Please check my comments.
     Thank you.

Best regards,
Hu Ziji

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux