From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6872190691 for ; Mon, 17 Jun 2024 09:09:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718615373; cv=none; b=oRVehGuMUy4aHh/HZNFz7vIrTiaYjFOFA5VRr8SQdBMey4ZyOdnsWt2bt7nlYX9stbshZk1sTwkOu4TTtgcEQkSVqgRo0pBluq903ekADBY+RX3MrXOSE06RKH4e3COBsdS4M1ax3LEE/19H9htx9gcyTHx7tr+4VE6jT3XLqtk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718615373; c=relaxed/simple; bh=N9LtM2vRDFqUSUD3GvIvDWzTA6qb4lliaF0n3rbZAuA=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=IuSyFXd+rj/bQ6HZK9MPVQ3lzqYlHlZFcgy5+62q674AAvBoi64b95oFGj1D7c7oR5NF7tVYRd7V2pE2xCES7vjDb12DpZ/qP99VLdsRrlIFm7+Pa7VIeTSZ4D8KJQuQ+y3b175mUoLK8etgd31BH48oB8yj8xuSHOnI5ngfzhQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RLop20Yt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="RLop20Yt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6453EC2BD10; Mon, 17 Jun 2024 09:09:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718615372; bh=N9LtM2vRDFqUSUD3GvIvDWzTA6qb4lliaF0n3rbZAuA=; h=Subject:To:Cc:From:Date:From; b=RLop20YtN3NoBgKA57pLUf0nR4eHGqnO0J7sib0emNifdEUrmquKuaBbDvY6mn3os J9gbVcByRUEwmL6inSoYtSx5hUhb4vKpXp7S0p6KMpWe+EmIRDT/uImGY3BNRsS+wR YpIue2J20t9bpzU7umn1lm9I0nqD9qMqoPHt9NuE= Subject: FAILED: patch "[PATCH] usb: typec: ucsi: Ack also failed Get Error commands" failed to apply to 5.15-stable tree To: heikki.krogerus@linux.intel.com,ammy.yi@intel.com,dmitry.baryshkov@linaro.org,gregkh@linuxfoundation.org Cc: From: Date: Mon, 17 Jun 2024 11:09:22 +0200 Message-ID: <2024061722-surround-richness-1add@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.15-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y git checkout FETCH_HEAD git cherry-pick -x 8bdf8a42bca4f47646fd105a387ab6926948c7f1 # git commit -s git send-email --to '' --in-reply-to '2024061722-surround-richness-1add@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^.. Possible dependencies: 8bdf8a42bca4 ("usb: typec: ucsi: Ack also failed Get Error commands") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 8bdf8a42bca4f47646fd105a387ab6926948c7f1 Mon Sep 17 00:00:00 2001 From: Heikki Krogerus Date: Fri, 31 May 2024 13:46:52 +0300 Subject: [PATCH] usb: typec: ucsi: Ack also failed Get Error commands It is possible that also the GET_ERROR command fails. If that happens, the command completion still needs to be acknowledged. Otherwise the interface will be stuck until it's reset. Reported-by: Ammy Yi Fixes: bdc62f2bae8f ("usb: typec: ucsi: Simplified registration and I/O API") Cc: stable@vger.kernel.org Signed-off-by: Heikki Krogerus Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240531104653.1303519-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index cb52e7b0a2c5..2cc7aedd490f 100644 --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@ -153,8 +153,13 @@ static int ucsi_exec_command(struct ucsi *ucsi, u64 cmd) } if (cci & UCSI_CCI_ERROR) { - if (cmd == UCSI_GET_ERROR_STATUS) + if (cmd == UCSI_GET_ERROR_STATUS) { + ret = ucsi_acknowledge(ucsi, false); + if (ret) + return ret; + return -EIO; + } return ucsi_read_error(ucsi); }