diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2018-09-11 20:18:44 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-10-08 07:53:10 -0400 |
commit | 2341629eadc4a40aa46103c7f1ff5f38459688d3 (patch) | |
tree | 7ef371c2b3b07b075d3225006403444feebaec17 /drivers/macintosh/adb.c | |
parent | 0792a2c8e0bbda3605b8d42c6b9635be7b19982a (diff) |
macintosh/adb: Rework printk output again
Avoid the KERN_CONT problem by avoiding message fragments. The problem
arises during async ADB bus probing, when ADB messages may get mixed up
with other messages. See also, commit 4bcc595ccd80 ("printk: reinstate
KERN_CONT for printing continuation lines").
Remove a number of printk() continuation lines by logging handler
changes in adb_try_handler_change() instead.
This patch addresses the problematic use of "\n" at the beginning of
pr_cont() messages, which got overlooked in commit f2be6295684b
("macintosh/adb: Properly mark continued kernel messages").
That commit also changed printk(KERN_DEBUG ...) to pr_debug(...), which
hinders work on low-level ADB driver bugs. Revert that change.
Cc: Andreas Schwab <schwab@linux-m68k.org>
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/macintosh/adb.c')
-rw-r--r-- | drivers/macintosh/adb.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c index 76e98f0f7a3e..e49d1f287a17 100644 --- a/drivers/macintosh/adb.c +++ b/drivers/macintosh/adb.c | |||
@@ -203,15 +203,15 @@ static int adb_scan_bus(void) | |||
203 | } | 203 | } |
204 | 204 | ||
205 | /* Now fill in the handler_id field of the adb_handler entries. */ | 205 | /* Now fill in the handler_id field of the adb_handler entries. */ |
206 | pr_debug("adb devices:\n"); | ||
207 | for (i = 1; i < 16; i++) { | 206 | for (i = 1; i < 16; i++) { |
208 | if (adb_handler[i].original_address == 0) | 207 | if (adb_handler[i].original_address == 0) |
209 | continue; | 208 | continue; |
210 | adb_request(&req, NULL, ADBREQ_SYNC | ADBREQ_REPLY, 1, | 209 | adb_request(&req, NULL, ADBREQ_SYNC | ADBREQ_REPLY, 1, |
211 | (i << 4) | 0xf); | 210 | (i << 4) | 0xf); |
212 | adb_handler[i].handler_id = req.reply[2]; | 211 | adb_handler[i].handler_id = req.reply[2]; |
213 | pr_debug(" [%d]: %d %x\n", i, adb_handler[i].original_address, | 212 | printk(KERN_DEBUG "adb device [%d]: %d 0x%X\n", i, |
214 | adb_handler[i].handler_id); | 213 | adb_handler[i].original_address, |
214 | adb_handler[i].handler_id); | ||
215 | devmask |= 1 << i; | 215 | devmask |= 1 << i; |
216 | } | 216 | } |
217 | return devmask; | 217 | return devmask; |
@@ -579,6 +579,8 @@ adb_try_handler_change(int address, int new_id) | |||
579 | mutex_lock(&adb_handler_mutex); | 579 | mutex_lock(&adb_handler_mutex); |
580 | ret = try_handler_change(address, new_id); | 580 | ret = try_handler_change(address, new_id); |
581 | mutex_unlock(&adb_handler_mutex); | 581 | mutex_unlock(&adb_handler_mutex); |
582 | if (ret) | ||
583 | pr_debug("adb handler change: [%d] 0x%X\n", address, new_id); | ||
582 | return ret; | 584 | return ret; |
583 | } | 585 | } |
584 | EXPORT_SYMBOL(adb_try_handler_change); | 586 | EXPORT_SYMBOL(adb_try_handler_change); |