lkml.org 
[lkml]   [2005]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2/2] Proper MMC command classes support
Removes the check for high command classes and instead checks that the
command classes needed are present.
Previous solution killed forward compatibility at no apparent gain.

Signed-of-by: Pierre Ossman <drzeus@drzeus.cx>

This patch only checks for CCC_BLOCK_READ even though CCC_BLOCK_WRITE is
also needed. My intention is to make the card read-only if the write
command class is unavailable. But such a patch will conflict with the SD
patches previously submitted. So I need to know which version should be
used as a base.

Index: linux-wbsd/drivers/mmc/mmc_block.c
===================================================================
--- linux-wbsd/drivers/mmc/mmc_block.c (revision 134)
+++ linux-wbsd/drivers/mmc/mmc_block.c (working copy)
@@ -443,7 +443,10 @@
struct mmc_blk_data *md;
int err;

- if (card->csd.cmdclass & ~0x1ff)
+ /*
+ * Check that the card supports the command class(es) we need.
+ */
+ if (!(card->csd.cmdclass & CCC_BLOCK_READ))
return -ENODEV;

if (card->csd.read_blkbits < 9) {
\
 
 \ /
  Last update: 2005-05-18 00:33    [W:0.048 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site