diff --git a/arch/arm/src/lpc17xx/lpc17_usbhost.c b/arch/arm/src/lpc17xx/lpc17_usbhost.c index 08bc9df8bf..fc4f4e92c7 100644 --- a/arch/arm/src/lpc17xx/lpc17_usbhost.c +++ b/arch/arm/src/lpc17xx/lpc17_usbhost.c @@ -1304,7 +1304,7 @@ static int lpc17_ctrltd(struct lpc17_usbhost_s *priv, uint32_t dirpid, else { uvdbg("Bad TD completion status: %d\n", EDCTRL->tdstatus); - ret = -EIO; + ret = ed->tdstatus == TD_CC_STALL ? -EPERM : -EIO; } } diff --git a/arch/arm/src/sama5/sam_ohci.c b/arch/arm/src/sama5/sam_ohci.c index d943d01d90..a59d441b07 100644 --- a/arch/arm/src/sama5/sam_ohci.c +++ b/arch/arm/src/sama5/sam_ohci.c @@ -2991,7 +2991,7 @@ static int sam_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, else { udbg("ERROR: Bad TD completion status: %d\n", ed->tdstatus); - ret = -EIO; + ret = ed->tdstatus == TD_CC_STALL ? -EPERM : -EIO; } }