diff options
| author | Warner Losh <imp@FreeBSD.org> | 2003-08-20 05:44:55 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2003-08-20 05:44:55 +0000 |
| commit | 82d2e53a5743079f1255413ae524796925935a35 (patch) | |
| tree | b7bd38c5d2a84c22b22cddc7de8fb07b44d73984 /sys/dev/pccard | |
| parent | 45cc9f5f4f1d6e11a5515a96f76323581f51b15e (diff) | |
Notes
Diffstat (limited to 'sys/dev/pccard')
| -rw-r--r-- | sys/dev/pccard/pccard_cis.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/dev/pccard/pccard_cis.c b/sys/dev/pccard/pccard_cis.c index e1b498bf675f7..2b8648d79d3e8 100644 --- a/sys/dev/pccard/pccard_cis.c +++ b/sys/dev/pccard/pccard_cis.c @@ -52,8 +52,8 @@ extern int pccard_cis_debug; #define PCCARDCISDEBUG #ifdef PCCARDCISDEBUG -#define DPRINTF(arg) if (pccard_cis_debug) printf arg -#define DEVPRINTF(arg) if (pccard_cis_debug) device_printf arg +#define DPRINTF(arg) do { if (pccard_cis_debug) printf arg; } while (0) +#define DEVPRINTF(arg) do { if (pccard_cis_debug) device_printf arg; } while (0) #else #define DPRINTF(arg) #define DEVPRINTF(arg) @@ -112,6 +112,9 @@ pccard_scan_cis(device_t dev, int (*fct)(struct pccard_tuple *, void *), u_long longlink_addr; /* Type suspect */ int mfc_count; int mfc_index; +#ifdef PCCARDCISDEBUG + int cis_none_cnt = 10; /* Only report 10 CIS_NONEs */ +#endif struct { int common; u_long addr; @@ -169,7 +172,13 @@ pccard_scan_cis(device_t dev, int (*fct)(struct pccard_tuple *, void *), /* two special-case tuples */ if (tuple.code == PCCARD_CISTPL_NULL) { - DPRINTF(("CISTPL_NONE\n 00\n")); +#ifdef PCCARDCISDEBUG + if (cis_none_cnt > 0) + DPRINTF(("CISTPL_NONE\n 00\n")); + else if (cis_none_cnt == 0) + DPRINTF(("TOO MANY CIS_NONE\n")); + cis_none_cnt--; +#endif tuple.ptr++; continue; } else if (tuple.code == PCCARD_CISTPL_END) { |
