Skip to contentSkip to conversation

Fix for minor error in 2.4 /proc/isapnp output

PATCH New Hilko Bengen 1 participant 1 message Feb 6, 2004 Pnp support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix for minor error in 2.4 /proc/isapnp output

In isapnp_proc.c, the wrong registers from the PnP device are read to determine the iomem area the device is configured to use. According to the "Plug and Play ISA Specification Version 1.0a", only bits 23 through 8 of the start address can be retrieved from two one-byte registers.

The attached patch makes isapnp_proc.c read the right registers.q Please apply it to the 2.4 tree.

Greetings,
-Hilko

drivers/pnp/isapnp_proc.c renamed from linux-2.4.24/drivers/pnp/isapnp_proc.c +1 -1
diff -uir orig/linux-2.4.24/drivers/pnp/isapnp_proc.c linux-2.4.24/drivers/pnp/isapnp_proc.c
@@ -649,7 +649,7 @@
 	if (next)
 		isapnp_printf(buffer, "\n");
 	for (i = next = 0; i < 4; i++) {
-		tmp = isapnp_read_dword(ISAPNP_CFG_MEM + (i << 3));
+		tmp = isapnp_read_word(ISAPNP_CFG_MEM + (i << 3)) << 8;
 		if (!tmp)
 			continue;
 		if (!next) {