Re: [patch 1/6] [RFC] Add MMC Password Protection (lock/unlock) support V6

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

 



Hi Russel and Pierre,

Thanks for all comments, I'm fixing the series and will send another version asap.

ext Russell King wrote:
On Fri, Nov 17, 2006 at 09:01:11AM -0400, Anderson Briglia wrote:
Index: linux-omap-2.6.git/drivers/mmc/mmc_sysfs.c
===================================================================
--- linux-omap-2.6.git.orig/drivers/mmc/mmc_sysfs.c 2006-11-14 08:46:54.000000000 -0400 +++ linux-omap-2.6.git/drivers/mmc/mmc_sysfs.c 2006-11-14 09:06:39.000000000 -0400
@@ -17,6 +17,7 @@

 #include <linux/mmc/card.h>
 #include <linux/mmc/host.h>
+#include <linux/mmc/protocol.h>

Why does this file need mmc/protocol.h?  I don't see anything added
which would require this include.

We need this here because mmc_card_lockable function uses "CCC_LOCK_CARD" macro defined on linux/mmc/protocol.h


@@ -73,10 +74,19 @@ static void mmc_release_card(struct devi
  * This currently matches any MMC driver to any MMC card - drivers
  * themselves make the decision whether to drive this card in their
  * probe method.  However, we force "bad" cards to fail.
+ *
+ * We also fail for all locked cards; drivers expect to be able to do block
+ * I/O still on probe(), which is not possible while the card is locked.
+ * Device probing must be triggered sometime later to make the card available

Your mailer wrapped the patch...  Also it would be nice to have this manually
wrapped so it's viewable sanely on a standard 80 column display.

@@ -75,12 +76,19 @@ struct mmc_card {
 #define mmc_card_bad(c)		((c)->state & MMC_STATE_BAD)
 #define mmc_card_sd(c)		((c)->state & MMC_STATE_SDCARD)
 #define mmc_card_readonly(c)	((c)->state & MMC_STATE_READONLY)
+#define mmc_card_locked(c)	((c)->state & MMC_STATE_LOCKED)
+#define mmc_card_clear_locked(c)	((c)->state &= ~MMC_STATE_LOCKED)

Since we separate out the "mmc_card_set_xxx" macros, please do the same
with the "mmc_card_clear_xxx" for consistency sake.




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux