From: Linus Torvalds Date: Sat, 5 May 2007 03:44:23 +0000 (-0700) Subject: iomap: make the default iomap functions fail softer X-Git-Tag: v2.6.22-rc1~1034 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6cbf0c704d7c3bb215ae7e0381b1ff2ad5931f35;p=pandora-kernel.git iomap: make the default iomap functions fail softer 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 --- Reading git-diff-tree failed