From d9e3082d1feebdb2ee25a7e13539d12280bd5613 Mon Sep 17 00:00:00 2001 From: Casper Hornstrup Date: Wed, 13 Nov 2002 21:57:47 +0000 Subject: [PATCH] 2002-11-13 Rick Gaiser * drivers/bus/isapnp/isapnp.c (FindNextReadPort): Increment Port before checking wether port address is in NE2000 address space range and returning port address value. svn path=/trunk/; revision=3754 --- reactos/ChangeLog | 6 +++++ reactos/drivers/bus/isapnp/isapnp.c | 37 ++++++++++++++++------------- 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/reactos/ChangeLog b/reactos/ChangeLog index 012bdcd9938..c2936d4c1e8 100644 --- a/reactos/ChangeLog +++ b/reactos/ChangeLog @@ -1,3 +1,9 @@ +2002-11-13 Rick Gaiser + + * drivers/bus/isapnp/isapnp.c (FindNextReadPort): Increment Port before + checking wether port address is in NE2000 address space range and returning + port address value. + 2002-11-10 Casper S. Hornstrup * drivers/bus/acpi/include/acpi.h: Include platform/types.h. diff --git a/reactos/drivers/bus/isapnp/isapnp.c b/reactos/drivers/bus/isapnp/isapnp.c index 894fef4feee..e5c5836ccbc 100644 --- a/reactos/drivers/bus/isapnp/isapnp.c +++ b/reactos/drivers/bus/isapnp/isapnp.c @@ -1,4 +1,4 @@ -/* $Id: isapnp.c,v 1.4 2002/09/08 10:22:03 chorns Exp $ +/* $Id: isapnp.c,v 1.5 2002/11/13 21:57:47 chorns Exp $ * * PROJECT: ReactOS ISA PnP Bus driver * FILE: isapnp.c @@ -215,21 +215,26 @@ VOID DeactivateLogicalDevice(UCHAR LogicalDevice) static ULONG FindNextReadPort(VOID) { - ULONG Port; - - Port = (ULONG)IsaPnPReadPort; - while (Port <= ISAPNP_MAX_READ_PORT) { - /* - * We cannot use NE2000 probe spaces for - * ISAPnP or we will lock up machines - */ - if ((Port < 0x280) || (Port > 0x380)) - { - return Port; - } - Port += READ_DATA_PORT_STEP; - } - return 0; + ULONG Port; + + Port = (ULONG)IsaPnPReadPort; + while (TRUE) { + Port += READ_DATA_PORT_STEP; + + if (Port > ISAPNP_MAX_READ_PORT) + { + return 0; + } + + /* + * We cannot use NE2000 probe spaces for + * ISAPnP or we will lock up machines + */ + if ((Port < 0x280) || (Port > 0x380)) + { + return Port; + } + } } static BOOLEAN IsolateReadDataPortSelect(VOID)