Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/sdmmc Don't print an error when we find a CIS tuple ...



details:   https://anonhg.NetBSD.org/src/rev/023596d5a93f
branches:  trunk
changeset: 829385:023596d5a93f
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun Jan 28 14:34:06 2018 +0000

description:
Don't print an error when we find a CIS tuple code in the vendor-unique
range (80h-8Fh).

diffstat:

 sys/dev/sdmmc/sdmmc_cis.c |  15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diffs (36 lines):

diff -r 2369e6f78b0b -r 023596d5a93f sys/dev/sdmmc/sdmmc_cis.c
--- a/sys/dev/sdmmc/sdmmc_cis.c Sun Jan 28 14:22:23 2018 +0000
+++ b/sys/dev/sdmmc/sdmmc_cis.c Sun Jan 28 14:34:06 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sdmmc_cis.c,v 1.4 2012/02/01 22:34:43 matt Exp $       */
+/*     $NetBSD: sdmmc_cis.c,v 1.5 2018/01/28 14:34:06 jmcneill Exp $   */
 /*     $OpenBSD: sdmmc_cis.c,v 1.1 2006/06/01 21:53:41 uwe Exp $       */
 
 /*
@@ -20,7 +20,7 @@
 /* Routines to decode the Card Information Structure of SD I/O cards */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdmmc_cis.c,v 1.4 2012/02/01 22:34:43 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc_cis.c,v 1.5 2018/01/28 14:34:06 jmcneill Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -260,9 +260,14 @@
                        break;
 
                default:
-                       aprint_error_dev(dev,
-                           "unknown tuple code %#x, length %d\n",
-                           tplcode, tpllen);
+                       /*
+                        * Tuple codes between 80h-8Fh are vendor unique.
+                        * Print a warning about all other codes.
+                        */
+                       if ((tplcode & 0xf0) != 0x80)
+                               aprint_error_dev(dev,
+                                   "unknown tuple code %#x, length %d\n",
+                                   tplcode, tpllen);
                        reg += tpllen;
                        break;
                }



Home | Main Index | Thread Index | Old Index