diff --git a/arch/arm/src/efm32/efm32_usbhost.c b/arch/arm/src/efm32/efm32_usbhost.c index 53f47ea7c1d..c2743fd5f70 100644 --- a/arch/arm/src/efm32/efm32_usbhost.c +++ b/arch/arm/src/efm32/efm32_usbhost.c @@ -1955,14 +1955,14 @@ static ssize_t efm32_in_transfer(FAR struct efm32_usbhost_s *priv, int chidx, /* Check for a special case: If (1) the transfer was NAKed and (2) * no Tx FIFO empty or Rx FIFO not-empty event occurred, then we * should be able to just flush the Rx and Tx FIFOs and try again. - * We can detect this latter case becasue the then the transfer + * We can detect this latter case because the then the transfer * buffer pointer and buffer size will be unaltered. */ elapsed = clock_systimer() - start; - if (ret != -EAGAIN || /* Not a NAK condition OR */ - elapsed >= EFM32_DATANAK_DELAY || /* Timeout has elapsed OR */ - chan->xfrd > 0) /* Data has been partially transferred */ + if (ret != -EAGAIN || /* Not a NAK condition OR */ + elapsed >= EFM32_DATANAK_DELAY || /* Timeout has elapsed OR */ + chan->xfrd > 0) /* Data has been partially transferred */ { /* Break out and return the error */ @@ -2221,14 +2221,14 @@ static ssize_t efm32_out_transfer(FAR struct efm32_usbhost_s *priv, int chidx, /* Check for a special case: If (1) the transfer was NAKed and (2) * no Tx FIFO empty or Rx FIFO not-empty event occurred, then we * should be able to just flush the Rx and Tx FIFOs and try again. - * We can detect this latter case becasue the then the transfer + * We can detect this latter case because the then the transfer * buffer pointer and buffer size will be unaltered. */ elapsed = clock_systimer() - start; - if (ret != -EAGAIN || /* Not a NAK condition OR */ - elapsed >= EFM32_DATANAK_DELAY || /* Timeout has elapsed OR */ - chan->xfrd != xfrlen) /* Data has been partially transferred */ + if (ret != -EAGAIN || /* Not a NAK condition OR */ + elapsed >= EFM32_DATANAK_DELAY || /* Timeout has elapsed OR */ + chan->xfrd > 0) /* Data has been partially transferred */ { /* Break out and return the error */ diff --git a/arch/arm/src/stm32/stm32_otgfshost.c b/arch/arm/src/stm32/stm32_otgfshost.c index 137ffa66e76..4791cdfae5e 100644 --- a/arch/arm/src/stm32/stm32_otgfshost.c +++ b/arch/arm/src/stm32/stm32_otgfshost.c @@ -1877,14 +1877,14 @@ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, /* Check for a special case: If (1) the transfer was NAKed and (2) * no Tx FIFO empty or Rx FIFO not-empty event occurred, then we * should be able to just flush the Rx and Tx FIFOs and try again. - * We can detect this latter case becasue the then the transfer + * We can detect this latter case because the then the transfer * buffer pointer and buffer size will be unaltered. */ elapsed = clock_systimer() - start; - if (ret != -EAGAIN || /* Not a NAK condition OR */ - elapsed >= STM32_DATANAK_DELAY || /* Timeout has elapsed OR */ - chan->xfrd > 0) /* Data has been partially transferred */ + if (ret != -EAGAIN || /* Not a NAK condition OR */ + elapsed >= STM32_DATANAK_DELAY || /* Timeout has elapsed OR */ + chan->xfrd > 0) /* Data has been partially transferred */ { /* Break out and return the error */ @@ -2143,14 +2143,14 @@ static ssize_t stm32_out_transfer(FAR struct stm32_usbhost_s *priv, int chidx, /* Check for a special case: If (1) the transfer was NAKed and (2) * no Tx FIFO empty or Rx FIFO not-empty event occurred, then we * should be able to just flush the Rx and Tx FIFOs and try again. - * We can detect this latter case becasue the then the transfer + * We can detect this latter case because the then the transfer * buffer pointer and buffer size will be unaltered. */ elapsed = clock_systimer() - start; - if (ret != -EAGAIN || /* Not a NAK condition OR */ - elapsed >= STM32_DATANAK_DELAY || /* Timeout has elapsed OR */ - chan->xfrd != xfrlen) /* Data has been partially transferred */ + if (ret != -EAGAIN || /* Not a NAK condition OR */ + elapsed >= STM32_DATANAK_DELAY || /* Timeout has elapsed OR */ + chan->xfrd > 0) /* Data has been partially transferred */ { /* Break out and return the error */ diff --git a/arch/arm/src/stm32/stm32_otghshost.c b/arch/arm/src/stm32/stm32_otghshost.c index 638caec1470..4856040a645 100644 --- a/arch/arm/src/stm32/stm32_otghshost.c +++ b/arch/arm/src/stm32/stm32_otghshost.c @@ -1877,14 +1877,14 @@ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, /* Check for a special case: If (1) the transfer was NAKed and (2) * no Tx FIFO empty or Rx FIFO not-empty event occurred, then we * should be able to just flush the Rx and Tx FIFOs and try again. - * We can detect this latter case becasue the then the transfer + * We can detect this latter case because the then the transfer * buffer pointer and buffer size will be unaltered. */ elapsed = clock_systimer() - start; - if (ret != -EAGAIN || /* Not a NAK condition OR */ - elapsed >= STM32_DATANAK_DELAY || /* Timeout has elapsed OR */ - chan->xfrd > 0) /* Data has been partially transferred */ + if (ret != -EAGAIN || /* Not a NAK condition OR */ + elapsed >= STM32_DATANAK_DELAY || /* Timeout has elapsed OR */ + chan->xfrd > 0) /* Data has been partially transferred */ { /* Break out and return the error */ @@ -2143,14 +2143,14 @@ static ssize_t stm32_out_transfer(FAR struct stm32_usbhost_s *priv, int chidx, /* Check for a special case: If (1) the transfer was NAKed and (2) * no Tx FIFO empty or Rx FIFO not-empty event occurred, then we * should be able to just flush the Rx and Tx FIFOs and try again. - * We can detect this latter case becasue the then the transfer + * We can detect this latter case because the then the transfer * buffer pointer and buffer size will be unaltered. */ elapsed = clock_systimer() - start; - if (ret != -EAGAIN || /* Not a NAK condition OR */ - elapsed >= STM32_DATANAK_DELAY || /* Timeout has elapsed OR */ - chan->xfrd != xfrlen) /* Data has been partially transferred */ + if (ret != -EAGAIN || /* Not a NAK condition OR */ + elapsed >= STM32_DATANAK_DELAY || /* Timeout has elapsed OR */ + chan->xfrd > 0) /* Data has been partially transferred */ { /* Break out and return the error */