summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2005-05-12 20:18:19 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-05-12 20:18:19 -0400
commit53155109b6ac611d9bb4a4ef9d3109b219b8d0e1 (patch)
treef652feb315954c9569870518ec7502d56154b6e3 /drivers/net
parent88d7bd8cb9eb8d64bf7997600b0d64f7834047c5 (diff)
[PATCH] smc91x addr config check
The PAGE_SIZE mask is indeed confusing. Use the exact mask for this context which has nothing to do with memory pages at all. Also cast to int since the value to compare with is an int. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/smc91x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 5e561ba44333..1e2b860dab23 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -1863,7 +1863,7 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr)
SMC_SELECT_BANK(1);
val = SMC_GET_BASE();
val = ((val & 0x1F00) >> 3) << SMC_IO_SHIFT;
- if (((unsigned long)ioaddr & ((PAGE_SIZE-1)<<SMC_IO_SHIFT)) != val) { /*XXX: WTF? */
+ if (((unsigned int)ioaddr & (0x3e0 << SMC_IO_SHIFT)) != val) {
printk("%s: IOADDR %p doesn't match configuration (%x).\n",
CARDNAME, ioaddr, val);
}