Commit 53155109 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Jeff Garzik

[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: default avatarNicolas Pitre <nico@cam.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 88d7bd8c
...@@ -1863,7 +1863,7 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr) ...@@ -1863,7 +1863,7 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr)
SMC_SELECT_BANK(1); SMC_SELECT_BANK(1);
val = SMC_GET_BASE(); val = SMC_GET_BASE();
val = ((val & 0x1F00) >> 3) << SMC_IO_SHIFT; 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", printk("%s: IOADDR %p doesn't match configuration (%x).\n",
CARDNAME, ioaddr, val); CARDNAME, ioaddr, val);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment