mirror of
https://github.com/torvalds/linux.git
synced 2026-11-29 10:07:52 +00:00
usb: typec: ucsi: Always cancel the command if PPM reports BUSY condition
This makes it possible to execute next command immediately after the busy condition. Signed-off-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b53908f9a2
commit
094902bc6a
@@ -128,8 +128,10 @@ static int ucsi_exec_command(struct ucsi *ucsi, u64 cmd)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (cci & UCSI_CCI_BUSY)
|
||||
if (cci & UCSI_CCI_BUSY) {
|
||||
ucsi->ops->async_write(ucsi, UCSI_CANCEL, NULL, 0);
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
if (!(cci & UCSI_CCI_COMMAND_COMPLETE))
|
||||
return -EIO;
|
||||
|
||||
Reference in New Issue
Block a user