Re: [RFC][PATCH] MMC: Use write timeout value as read from CSR

From: Pierre Ossman
Date: Sun Sep 14 2008 - 09:48:34 EST


On Tue, 9 Sep 2008 10:42:53 +0100
"Matt Fleming" <mattjfleming@xxxxxxxxxxxxxx> wrote:

>
> The stack trace where this check is needed is here,
>
> mmc_get_timeout()
> mmc_spi_readblock()
> mmc_spi_request()
> mmc_wait_for_req()
> mmc_send_cxd_data()
> mmc_send_csd()
> mmc_attach_sd()
>
> Maybe it would be a good idea to move the line at
> drivers/mmc/core/mmc.c:447 up before the call to mmc_send_csd()? Then
> it'd probably be possible to remove that !host->mmc->card check from
> mmc_get_timeout().

No, that shouldn't be needed. If you look at mmc_send_cxd_data(), it
dutifully calls mmc_set_data_timeout(), so your check isn't needed (for
that case at least).

mmc_send_cid() is a bit more problematic. We probably need to
restructure things so that a mmc_card structure is available there as
well.

Rgds
--
-- Pierre Ossman

Linux kernel, MMC maintainer http://www.kernel.org
rdesktop, core developer http://www.rdesktop.org

WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/