iomap: make the default iomap functions fail softer
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 5 May 2007 03:44:23 +0000 (20:44 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 5 May 2007 03:44:23 +0000 (20:44 -0700)
We used to BUG_ON() for a badly mapped IO port, which is certainly
correct, but actually made it harder to debug the case where the ATA
drivers had incorrectly mapped a nonconnected ATA port.

So make badly mapped ports trigger a WARN_ON(), and throw the IO away
instead (and return all ones for reads).  For things like broken driver
initialization - which is the most likely cause anyway - that should
mean that the machine comes up and is usable (at least that was the case
for the ATA breakage that triggered this patch).

It tends to be a whole lot easier to do a "dmesg" on a working machine
than to try to capture logs off a dead one.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

No differences found