summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Belay <ambx1@neo.rr.com>2004-03-20 13:49:10 +0000
committerAdam Belay <ambx1@neo.rr.com>2004-03-20 13:49:10 +0000
commit84350f79f3ef76e2ee86f3ca0c45594a813bf24b (patch)
treeb80dff81de14a0668a80cc24274aaefbabfc045a
parenta747324c1c92856bdac5fd09e6d881cd38a6d170 (diff)
[ISAPNP] MEM Config Fix
This patch fixes a bug in the resource configuration function. If there are more than one memory ranges, the isapnp driver will write into the incorrect configuration register.
-rw-r--r--drivers/pnp/isapnp/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index 56b6808a0ab6..b864b06882eb 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -1048,7 +1048,7 @@ static int isapnp_set_resources(struct pnp_dev *dev, struct pnp_resource_table *
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();