Re: [PATCH] Support for read-only MMC cards

From: Pierre Ossman
Date: Sat Jun 04 2005 - 15:25:40 EST


Russell King wrote:

>Can't we set mmc_card_readonly status if !CCC_BLOCK_WRITE ? Would that
>not simplify the code in the open method as well?
>
>
>

Well, that depends on what we want mmc_card_readonly to signify. My
thought was that it meant the entire card was read only (as should be
the case with the external ro-switch on SD cards). This might not be the
same thing as that the card lacks block writes. E.g. there are cards
with combined I/O and storage functionality.

For most cases the lack of CCC_BLOCK_WRITE will mean read-only for
everything that the card can do. But I'm not convinced that's the case
for all cards. The fact that there are command classes for streamed
writes should indicate possible corner cases.
-
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/