STM32, STM32 F7, STM32 L4: OTG host drivers: Do not do data toggle if interrupt transfer is NAKed. Sugested by webbbn@gmail.com

This commit is contained in:
Gregory Nutt 2017-03-09 15:07:31 -06:00
parent 110ae16af2
commit 9cd3f7f80a
4 changed files with 0 additions and 48 deletions

View File

@ -2539,18 +2539,6 @@ static inline void stm32_gint_hcinisr(FAR struct stm32_usbhost_s *priv,
}
else if (chan->chreason == CHREASON_NAK)
{
/* Halt on NAK only happens on an INTR channel. Fetch the HCCHAR register
* and check for an interrupt endpoint.
*/
regval = stm32_getreg(STM32_OTGFS_HCCHAR(chidx));
if ((regval & OTGFS_HCCHAR_EPTYP_MASK) == OTGFS_HCCHAR_EPTYP_INTR)
{
/* Toggle the IN data toggle (Used by Bulk and INTR only) */
chan->indata1 ^= true;
}
/* Set the NAK error result */
chan->result = EAGAIN;

View File

@ -2544,18 +2544,6 @@ static inline void stm32_gint_hcinisr(FAR struct stm32_usbhost_s *priv,
}
else if (chan->chreason == CHREASON_NAK)
{
/* Halt on NAK only happens on an INTR channel. Fetch the HCCHAR register
* and check for an interrupt endpoint.
*/
regval = stm32_getreg(STM32_OTGHS_HCCHAR(chidx));
if ((regval & OTGHS_HCCHAR_EPTYP_MASK) == OTGHS_HCCHAR_EPTYP_INTR)
{
/* Toggle the IN data toggle (Used by Bulk and INTR only) */
chan->indata1 ^= true;
}
/* Set the NAK error result */
chan->result = EAGAIN;

View File

@ -2538,18 +2538,6 @@ static inline void stm32_gint_hcinisr(FAR struct stm32_usbhost_s *priv,
}
else if (chan->chreason == CHREASON_NAK)
{
/* Halt on NAK only happens on an INTR channel. Fetch the HCCHAR
* register and check for an interrupt endpoint.
*/
regval = stm32_getreg(STM32_OTG_HCCHAR(chidx));
if ((regval & OTG_HCCHAR_EPTYP_MASK) == OTG_HCCHAR_EPTYP_INTR)
{
/* Toggle the IN data toggle (Used by Bulk and INTR only) */
chan->indata1 ^= true;
}
/* Set the NAK error result */
chan->result = EAGAIN;

View File

@ -2544,18 +2544,6 @@ static inline void stm32l4_gint_hcinisr(FAR struct stm32l4_usbhost_s *priv,
}
else if (chan->chreason == CHREASON_NAK)
{
/* Halt on NAK only happens on an INTR channel. Fetch the HCCHAR register
* and check for an interrupt endpoint.
*/
regval = stm32l4_getreg(STM32L4_OTGFS_HCCHAR(chidx));
if ((regval & OTGFS_HCCHAR_EPTYP_MASK) == OTGFS_HCCHAR_EPTYP_INTR)
{
/* Toggle the IN data toggle (Used by Bulk and INTR only) */
chan->indata1 ^= true;
}
/* Set the NAK error result */
chan->result = EAGAIN;