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, commit4bcc595ccd
("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 commitf2be629568
("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>
This commit is contained in:

committed by
Michael Ellerman

parent
0792a2c8e0
commit
2341629ead
@@ -203,15 +203,15 @@ static int adb_scan_bus(void)
|
||||
}
|
||||
|
||||
/* Now fill in the handler_id field of the adb_handler entries. */
|
||||
pr_debug("adb devices:\n");
|
||||
for (i = 1; i < 16; i++) {
|
||||
if (adb_handler[i].original_address == 0)
|
||||
continue;
|
||||
adb_request(&req, NULL, ADBREQ_SYNC | ADBREQ_REPLY, 1,
|
||||
(i << 4) | 0xf);
|
||||
adb_handler[i].handler_id = req.reply[2];
|
||||
pr_debug(" [%d]: %d %x\n", i, adb_handler[i].original_address,
|
||||
adb_handler[i].handler_id);
|
||||
printk(KERN_DEBUG "adb device [%d]: %d 0x%X\n", i,
|
||||
adb_handler[i].original_address,
|
||||
adb_handler[i].handler_id);
|
||||
devmask |= 1 << i;
|
||||
}
|
||||
return devmask;
|
||||
@@ -579,6 +579,8 @@ adb_try_handler_change(int address, int new_id)
|
||||
mutex_lock(&adb_handler_mutex);
|
||||
ret = try_handler_change(address, new_id);
|
||||
mutex_unlock(&adb_handler_mutex);
|
||||
if (ret)
|
||||
pr_debug("adb handler change: [%d] 0x%X\n", address, new_id);
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(adb_try_handler_change);
|
||||
|
Reference in New Issue
Block a user