From: Adam Belay <ambx1@neo.rr.com>

This patch fixes a bug in the resource configuration function.  If there is
more than one memory range, the isapnp driver will write into the incorrect
configuration register.  I'm in the process of rewritting the configuration
code, but I think it's better to send this now rather than waiting to send it
all at once.


---

 25-akpm/drivers/pnp/isapnp/core.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/pnp/isapnp/core.c~pnp-08-mem-config-fix drivers/pnp/isapnp/core.c
--- 25/drivers/pnp/isapnp/core.c~pnp-08-mem-config-fix	2004-03-14 23:58:13.977756256 -0800
+++ 25-akpm/drivers/pnp/isapnp/core.c	2004-03-14 23:58:13.980755800 -0800
@@ -1046,7 +1046,7 @@ static int isapnp_set_resources(struct p
 	for (tmp = 0; tmp < PNP_MAX_DMA && (res->dma_resource[tmp].flags & (IORESOURCE_DMA | IORESOURCE_UNSET)) == IORESOURCE_DMA; tmp++)
 		isapnp_write_byte(ISAPNP_CFG_DMA+tmp, res->dma_resource[tmp].start);
 	for (tmp = 0; tmp < PNP_MAX_MEM && (res->mem_resource[tmp].flags & (IORESOURCE_MEM | IORESOURCE_UNSET)) == IORESOURCE_MEM; tmp++)
-		isapnp_write_word(ISAPNP_CFG_MEM+(tmp<<2), (res->mem_resource[tmp].start >> 8) & 0xffff);
+		isapnp_write_word(ISAPNP_CFG_MEM+(tmp<<3), (res->mem_resource[tmp].start >> 8) & 0xffff);
 	/* FIXME: We aren't handling 32bit mems properly here */
 	isapnp_activate(dev->number);
 	isapnp_cfg_end();

_