public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pierre Ossman <drzeus-list@drzeus.cx>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>
Subject: [PATCH 2/2] Proper MMC command classes support
Date: Wed, 18 May 2005 00:19:30 +0200	[thread overview]
Message-ID: <428A6DF2.2010604@drzeus.cx> (raw)
In-Reply-To: <428A6C3A.40505@drzeus.cx>

[-- Attachment #1: Type: text/plain, Size: 528 bytes --]

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.


[-- Attachment #2: mmc-block-ccc.patch --]
[-- Type: text/x-patch, Size: 493 bytes --]

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) {

      parent reply	other threads:[~2005-05-17 22:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-17 22:12 [PATCH 0/2] Proper MMC command classes support Pierre Ossman
2005-05-17 22:14 ` [PATCH 1/2] " Pierre Ossman
2005-05-17 22:19 ` Pierre Ossman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=428A6DF2.2010604@drzeus.cx \
    --to=drzeus-list@drzeus.cx \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox