You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/01/21 03:54:32 UTC
(nuttx) branch master updated: arm: sama5: sam_ehci: fix transfer cancellation process.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new bca8df7d65 arm: sama5: sam_ehci: fix transfer cancellation process.
bca8df7d65 is described below
commit bca8df7d65bc90bf9ac9dab4c5d5079a71aeb61d
Author: Takeyoshi Kikuchi <ki...@centurysys.co.jp>
AuthorDate: Sat Jan 20 13:28:16 2024 +0900
arm: sama5: sam_ehci: fix transfer cancellation process.
The logic of the conditional expression that determines whether
the QH is a target QH or not is reversed in the process of canceling
a transfer in INPROGRESS state.
Therefore, the QH in INPROGRESS state is not released and subsequent
communication is not successful.
Checked with CDC-ACM driver and cu command.
Signed-off-by: Takeyoshi Kikuchi <ki...@centurysys.co.jp>
---
arch/arm/src/sama5/sam_ehci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/src/sama5/sam_ehci.c b/arch/arm/src/sama5/sam_ehci.c
index cc689589f3..7331a0678f 100644
--- a/arch/arm/src/sama5/sam_ehci.c
+++ b/arch/arm/src/sama5/sam_ehci.c
@@ -2719,7 +2719,7 @@ static int sam_qh_cancel(struct sam_qh_s *qh, uint32_t **bp, void *arg)
/* Check if this is the QH that we are looking for */
- if (qh->epinfo == epinfo)
+ if (qh->epinfo != epinfo)
{
/* No... keep looking */
@@ -4441,7 +4441,7 @@ static int sam_cancel(struct usbhost_driver_s *drvr, usbhost_ep_t ep)
* head.
*/
- if (qh && qh != &g_asynchead)
+ if (qh && qh == &g_asynchead)
{
/* Claim that we successfully cancelled the transfer */