diff mbox

[v4,02/15] mmc: sd: query function modes for uhs cards

Message ID m3vcxh52ra.fsf@pullcord.laptop.org (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Ball May 11, 2011, 3:34 a.m. UTC
Hi,

On Thu, May 05 2011, Arindam Nath wrote:
> SD cards which conform to Physical Layer Spec v3.01 can support
> additional Bus Speed Modes, Driver Strength, and Current Limit
> other than the default values. We use CMD6 mode 0 to read these
> additional card functions. The values read here will be used
> during UHS-I initialization steps.
>
> Signed-off-by: Arindam Nath <arindam.nath@amd.com>
> Reviewed-by: Philip Rakity <prakity@marvell.com>
> Tested-by: Philip Rakity <prakity@marvell.com>

Thanks, pushed to mmc-next for .40 with the trivial changes below:

-			if ((err != -EINVAL)
-			&& (err != -ENOSYS)
-			&& (err != -EFAULT))
+			if (err != -EINVAL && err != -ENOSYS && err != -EFAULT)
 				goto out;
 
 			printk(KERN_WARNING "%s: problem reading "
@@ -332,14 +327,11 @@ static int mmc_read_switch(struct mmc_card *card)
 			 * If the host or the card can't do the switch,
 			 * fail more gracefully.
 			 */
-			if ((err != -EINVAL)
-			&& (err != -ENOSYS)
-			&& (err != -EFAULT))
+			if (err != -EINVAL && err != -ENOSYS && err != -EFAULT)
 				goto out;
 
 			printk(KERN_WARNING "%s: problem reading "


- Chris.
diff mbox

Patch

diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index d4410c9..027d7cb 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -190,7 +190,7 @@  static int mmc_decode_scr(struct mmc_card *card)
 	scr->sda_vsn = UNSTUFF_BITS(resp, 56, 4);
 	scr->bus_widths = UNSTUFF_BITS(resp, 48, 4);
 	if (scr->sda_vsn == SCR_SPEC_VER_2)
-		/* Check if Physical Layer Spec v3.0 is supported*/
+		/* Check if Physical Layer Spec v3.0 is supported */
 		scr->sda_spec3 = UNSTUFF_BITS(resp, 47, 1);
 
 	if (UNSTUFF_BITS(resp, 55, 1))
@@ -288,13 +288,11 @@  static int mmc_read_switch(struct mmc_card *card)
 		 * If the host or the card can't do the switch,
 		 * fail more gracefully.
 		 */
-		if ((err != -EINVAL)
-		&& (err != -ENOSYS)
-		&& (err != -EFAULT))
+		if (err != -EINVAL && err != -ENOSYS && err != -EFAULT)
 			goto out;
 
 		printk(KERN_WARNING "%s: problem reading Bus Speed modes.\n",
@@ -310,14 +308,11 @@  static int mmc_read_switch(struct mmc_card *card)
 			 * If the host or the card can't do the switch,
 			 * fail more gracefully.
 			 */