Commit e2954e5f authored by Finn Thain's avatar Finn Thain Committed by Michael Ellerman

macintosh/adb-iop: Implement sending -> idle state transition

On leaving the 'sending' state, proceed to the 'idle' state if no reply is
expected. Drop redundant test for adb_iop_state == sending && current_req.
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Tested-by: default avatarStan Johnson <userm57@yahoo.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/6991996dd4aaf0b52cfd650172bf0f6fbe37a452.1590880623.git.fthain@telegraphics.com.au
parent 32226e81
...@@ -77,15 +77,14 @@ static void adb_iop_done(void) ...@@ -77,15 +77,14 @@ static void adb_iop_done(void)
static void adb_iop_complete(struct iop_msg *msg) static void adb_iop_complete(struct iop_msg *msg)
{ {
struct adb_request *req;
unsigned long flags; unsigned long flags;
local_irq_save(flags); local_irq_save(flags);
req = current_req; if (current_req->reply_expected)
if ((adb_iop_state == sending) && req && req->reply_expected) {
adb_iop_state = awaiting_reply; adb_iop_state = awaiting_reply;
} else
adb_iop_done();
local_irq_restore(flags); local_irq_restore(flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment