Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sdmmc Print 'Standard Function Interface Code" in sd...
details: https://anonhg.NetBSD.org/src/rev/086e96c6877f
branches: trunk
changeset: 780702:086e96c6877f
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Sat Aug 04 04:06:00 2012 +0000
description:
Print 'Standard Function Interface Code" in sdmmc_print(), if not SD_IO_SFIC_NO_STANDARD.
diffstat:
sys/dev/sdmmc/sdmmc.c | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diffs (56 lines):
diff -r a2e7aaa55474 -r 086e96c6877f sys/dev/sdmmc/sdmmc.c
--- a/sys/dev/sdmmc/sdmmc.c Sat Aug 04 04:05:36 2012 +0000
+++ b/sys/dev/sdmmc/sdmmc.c Sat Aug 04 04:06:00 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdmmc.c,v 1.14 2012/07/17 05:47:07 skrll Exp $ */
+/* $NetBSD: sdmmc.c,v 1.15 2012/08/04 04:06:00 kiyohara Exp $ */
/* $OpenBSD: sdmmc.c,v 1.18 2009/01/09 10:58:38 jsg Exp $ */
/*
@@ -49,7 +49,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdmmc.c,v 1.14 2012/07/17 05:47:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc.c,v 1.15 2012/08/04 04:06:00 kiyohara Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -444,7 +444,7 @@
struct sdmmc_attach_args *sa = aux;
struct sdmmc_function *sf = sa->sf;
struct sdmmc_cis *cis = &sf->sc->sc_fn0->cis;
- int i;
+ int i, x;
if (pnp) {
if (sf->number == 0)
@@ -455,16 +455,22 @@
if (i != 0)
printf("\"");
- if (cis->manufacturer != SDMMC_VENDOR_INVALID &&
- cis->product != SDMMC_PRODUCT_INVALID) {
+ if ((cis->manufacturer != SDMMC_VENDOR_INVALID &&
+ cis->product != SDMMC_PRODUCT_INVALID) ||
+ sa->interface != SD_IO_SFIC_NO_STANDARD) {
+ x = !!(cis->manufacturer != SDMMC_VENDOR_INVALID);
+ x += !!(cis->product != SDMMC_PRODUCT_INVALID);
+ x += !!(sa->interface != SD_IO_SFIC_NO_STANDARD);
printf("%s(", i ? " " : "");
if (cis->manufacturer != SDMMC_VENDOR_INVALID)
printf("manufacturer 0x%x%s",
- cis->manufacturer,
- cis->product == SDMMC_PRODUCT_INVALID ?
- "" : ", ");
+ cis->manufacturer, (--x == 0) ? "" : ", ");
if (cis->product != SDMMC_PRODUCT_INVALID)
- printf("product 0x%x", cis->product);
+ printf("product 0x%x%s",
+ cis->product, (--x == 0) ? "" : ", ");
+ if (sa->interface != SD_IO_SFIC_NO_STANDARD)
+ printf("standard function interface code 0x%x",
+ sf->interface);
printf(")");
}
printf("%sat %s", i ? " " : "", pnp);
Home |
Main Index |
Thread Index |
Old Index