From 7c79fb2004932e83ad21b84871ae1192c9183fa7 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 17 Jul 2003 19:44:50 -0700 Subject: [PATCH] [PATCH] make isapnp request its port properly --- drivers/pnp/isapnp/core.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c index 967f95bd4ac33..b8e973c99b9fb 100644 --- a/drivers/pnp/isapnp/core.c +++ b/drivers/pnp/isapnp/core.c @@ -255,14 +255,22 @@ static void __init isapnp_peek(unsigned char *data, int bytes) static int isapnp_next_rdp(void) { int rdp = isapnp_rdp; + static int old_rdp = 0; + + if(old_rdp) + { + release_region(old_rdp, 1); + old_rdp = 0; + } while (rdp <= 0x3ff) { /* * We cannot use NE2000 probe spaces for ISAPnP or we * will lock up machines. */ - if ((rdp < 0x280 || rdp > 0x380) && !check_region(rdp, 1)) + if ((rdp < 0x280 || rdp > 0x380) && request_region(rdp, 1, "ISAPnP")) { isapnp_rdp = rdp; + old_rdp = rdp; return 0; } rdp += RDP_STEP; -- 2.53.0