lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 25 Aug 2011 13:44:31 +0900
From:	NamJae Jeon <linkinjeon@...il.com>
To:	linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	Chris Ball <cjb@...top.org>, linus.walleij@...aro.org,
	Kyungmin Park <kmpark@...radead.org>
Subject: RFC : mmc : Use wait_for_completion_timeout() instead of
 wait_for_completion in case of multiple write blocks.

Hi.

If card is infinitely holding pull down busy line(data 0) while
writing multiple blocks, write will be blocked in
mmc_wait_for_req_done().
I suggest to use wait_for_completion_timeout instread of
wait_for_completion like the below code.

How do you think about my suggestion ?

Thanks.

------------------------------------------------------------------------------------------------------------------
static void mmc_wait_for_req_done(struct mmc_host *host, struct
mmc_request *mrq)
{
        unsigned int write_timeout = 0;
	
        if(mrq->data != NULL && (mrq->data->flags & MMC_DATA_WRITE) &&
(mrq->cmd->opcode & MMC_WRITE_MULTIPLE_BLOCK)) {
                write_timeout =
usecs_to_jiffies(mrq->data->timeout_ns/1000) * mrq->data->blocks;
                wait_for_completion_timeout(&mrq->completion, write_timeout);
        }
        else wait_for_completion(&mrq->completion);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ