diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2017-08-12 17:11:02 +1000 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2017-08-21 11:52:55 +0200 |
commit | 41e93a3087296b14e8f671010420bd29d07c989f (patch) | |
tree | a2ab5d709bc3ab2db6e45792776411a2e4ef0ee7 | |
parent | 07144be9c156103e19a336c35213bd393392d401 (diff) | |
download | linux-41e93a3087296b14e8f671010420bd29d07c989f.tar.bz2 |
m68k/mac: Don't hang waiting for Cuda power-down command
Testing shows that the CUDA_POWERDOWN command never completes (for a
Centris 660av or LC 475, at least). So, don't wait for command completion
on those Cuda-based models that do not support soft power. Just proceed to
log the usual message, "It is now safe to turn off your Macintosh."
Reported-by: Stan Johnson <userm57@yahoo.com>
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
-rw-r--r-- | arch/m68k/mac/misc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c index 8aa8792e3174..944795fd2c7a 100644 --- a/arch/m68k/mac/misc.c +++ b/arch/m68k/mac/misc.c @@ -357,6 +357,17 @@ static void cuda_shutdown(void) struct adb_request req; if (cuda_request(&req, NULL, 2, CUDA_PACKET, CUDA_POWERDOWN) < 0) return; + + /* Avoid infinite polling loop when PSU is not under Cuda control */ + switch (macintosh_config->ident) { + case MAC_MODEL_C660: + case MAC_MODEL_Q605: + case MAC_MODEL_Q605_ACC: + case MAC_MODEL_P475: + case MAC_MODEL_P475F: + return; + } + while (!req.complete) cuda_poll(); } |