Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: typec: ucsi_glink: drop special handling for CCI_BUSY

Newer Qualcomm platforms (sm8450+) successfully handle busy state and
send the Command Completion after sending the Busy state. Older devices
have firmware bug and can not continue after sending the CCI_BUSY state,
but the command that leads to CCI_BUSY is already forbidden by the
NO_PARTNER_PDOS quirk.

Follow other UCSI glue drivers and drop special handling for CCI_BUSY
event. Let the UCSI core properly handle this state.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240408-qcom-ucsi-fixes-bis-v1-3-716c145ca4b1@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dmitry Baryshkov and committed by
Greg Kroah-Hartman
1a395af9 c82d6cbb

+3 -5
+3 -5
drivers/usb/typec/ucsi/ucsi_glink.c
··· 176 176 left = wait_for_completion_timeout(&ucsi->sync_ack, 5 * HZ); 177 177 if (!left) { 178 178 dev_err(ucsi->dev, "timeout waiting for UCSI sync write response\n"); 179 - ret = -ETIMEDOUT; 179 + /* return 0 here and let core UCSI code handle the CCI_BUSY */ 180 + ret = 0; 180 181 } else if (ucsi->sync_val) { 181 182 dev_err(ucsi->dev, "sync write returned: %d\n", ucsi->sync_val); 182 183 } ··· 244 243 ucsi_connector_change(ucsi->ucsi, con_num); 245 244 } 246 245 247 - if (ucsi->sync_pending && cci & UCSI_CCI_BUSY) { 248 - ucsi->sync_val = -EBUSY; 249 - complete(&ucsi->sync_ack); 250 - } else if (ucsi->sync_pending && 246 + if (ucsi->sync_pending && 251 247 (cci & (UCSI_CCI_ACK_COMPLETE | UCSI_CCI_COMMAND_COMPLETE))) { 252 248 complete(&ucsi->sync_ack); 253 249 }