Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/isapnp PR/10154: Antti Kantee: ignore 0 length resou...



details:   https://anonhg.NetBSD.org/src/rev/700cc973fd47
branches:  trunk
changeset: 486506:700cc973fd47
user:      christos <christos%NetBSD.org@localhost>
date:      Tue May 23 17:50:53 2000 +0000

description:
PR/10154: Antti Kantee: ignore 0 length resource(s)

diffstat:

 sys/dev/isapnp/isapnpres.c |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (54 lines):

diff -r 3902ddcd8570 -r 700cc973fd47 sys/dev/isapnp/isapnpres.c
--- a/sys/dev/isapnp/isapnpres.c        Tue May 23 17:08:07 2000 +0000
+++ b/sys/dev/isapnp/isapnpres.c        Tue May 23 17:50:53 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isapnpres.c,v 1.9 1998/09/05 14:15:26 christos Exp $   */
+/*     $NetBSD: isapnpres.c,v 1.10 2000/05/23 17:50:53 christos Exp $  */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -348,6 +348,8 @@
                r->maxbase = (buf[4] << 8) | buf[3];
                r->align = buf[5];
                r->length = buf[6];
+               if (r->length == 0)
+                   pa->ipa_nio--;
 #ifdef DEBUG_ISAPNP
                isapnp_print_io("", r);
 #endif
@@ -360,6 +362,8 @@
                r->maxbase = r->minbase;
                r->align = 1;
                r->length = buf[2];
+               if (r->length == 0)
+                   pa->ipa_nio--;
 #ifdef DEBUG_ISAPNP
                isapnp_print_io("FIXED ", r);
 #endif
@@ -376,6 +380,8 @@
                r->maxbase = (buf[4] << 16) | (buf[3] << 8);
                r->align = (buf[6] << 8) | buf[5];
                r->length = (buf[8] << 16) | (buf[7] << 8);
+               if (r->length == 0)
+                   pa->ipa_nmem--;
 #ifdef DEBUG_ISAPNP
                isapnp_print_mem("", r);
 #endif
@@ -401,6 +407,8 @@
                    (buf[10] << 8) | buf[9];
                r->length = (buf[16] << 24) | (buf[15] << 16) |
                    (buf[14] << 8) | buf[13];
+               if (r->length == 0)
+                   pa->ipa_nmem32--;
 #ifdef DEBUG_ISAPNP
                isapnp_print_mem("32-bit ", r);
 #endif
@@ -415,6 +423,8 @@
                r->align = 1;
                r->length = (buf[8] << 24) | (buf[7] << 16) |
                    (buf[6] << 8) | buf[5];
+               if (r->length == 0)
+                   pa->ipa_nmem32--;
 #ifdef DEBUG_ISAPNP
                isapnp_print_mem("FIXED 32-bit ", r);
 #endif



Home | Main Index | Thread Index | Old Index