Skip to content

Commit 094902b

Browse files
Heikki Krogerusgregkh
authored andcommitted
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]>
1 parent b53908f commit 094902b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/usb/typec/ucsi/ucsi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,10 @@ static int ucsi_exec_command(struct ucsi *ucsi, u64 cmd)
128128
if (ret)
129129
return ret;
130130

131-
if (cci & UCSI_CCI_BUSY)
131+
if (cci & UCSI_CCI_BUSY) {
132+
ucsi->ops->async_write(ucsi, UCSI_CANCEL, NULL, 0);
132133
return -EBUSY;
134+
}
133135

134136
if (!(cci & UCSI_CCI_COMMAND_COMPLETE))
135137
return -EIO;

0 commit comments

Comments
 (0)