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.
This commit is contained in:
Warner Losh 2009-03-11 08:14:44 +00:00
parent 3ca789f14a
commit 3ef22bdd2f

View File

@ -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 =