From 3ef22bdd2f7722e972a5d7e2d6d7739c1afe6ec4 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Wed, 11 Mar 2009 08:14:44 +0000 Subject: [PATCH] Allow zero length memroy space descriptor sections. It is apparently legal in the spec. Add newline to the verbose messages we print when debugging when this happens. The Hitachi HT-4840-11 is the only card to hit these in years, and it works well enough if we're liberal about what we accept. --- sys/dev/pccard/pccard_cis.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/pccard/pccard_cis.c b/sys/dev/pccard/pccard_cis.c index 605ea171623c..dbd71658df2f 100644 --- a/sys/dev/pccard/pccard_cis.c +++ b/sys/dev/pccard/pccard_cis.c @@ -1198,8 +1198,7 @@ pccard_parse_cis_tuple(const struct pccard_tuple *tuple, void *arg) if (lengthsize == 0) { DPRINTF(("cfe memspace " - "lengthsize == 0")); - state->card->error++; + "lengthsize == 0\n")); } for (i = 0; i < cfe->num_memspace; i++) { if (lengthsize) { @@ -1211,9 +1210,8 @@ pccard_parse_cis_tuple(const struct pccard_tuple *tuple, void *arg) cfe->memspace[i].length = 0; } if (cfe->memspace[i].length == 0) { - DPRINTF(("cfe->memspace[%d].length == 0", + DPRINTF(("cfe->memspace[%d].length == 0\n", i)); - state->card->error++; } if (cardaddrsize) { cfe->memspace[i].cardaddr =