Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6cbf0c70 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4d470070
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment