diff --git a/arch/arm/src/stm32/stm32_otgfshost.c b/arch/arm/src/stm32/stm32_otgfshost.c index 699c5c958c0..a693a60bf12 100644 --- a/arch/arm/src/stm32/stm32_otgfshost.c +++ b/arch/arm/src/stm32/stm32_otgfshost.c @@ -1881,7 +1881,13 @@ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, if (xfrd > 0) { - /* Yes, return the amount of data received */ + /* Yes, return the amount of data received. + * + * REVISIT: This behavior is clearly correct for CDC/ACM + * bulk transfers and HID interrupt transfers. But I am + * not so certain for MSC bulk transfers which, I think, + * could have NAKed packets in the middle of a transfer. + */ return xfrd; } diff --git a/arch/arm/src/stm32/stm32_otghshost.c b/arch/arm/src/stm32/stm32_otghshost.c index 2a100e7a54e..d78ab4a3cb9 100644 --- a/arch/arm/src/stm32/stm32_otghshost.c +++ b/arch/arm/src/stm32/stm32_otghshost.c @@ -1886,7 +1886,13 @@ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, if (xfrd > 0) { - /* Yes, return the amount of data received */ + /* Yes, return the amount of data received. + * + * REVISIT: This behavior is clearly correct for CDC/ACM + * bulk transfers and HID interrupt transfers. But I am + * not so certain for MSC bulk transfers which, I think, + * could have NAKed packets in the middle of a transfer. + */ return xfrd; } diff --git a/arch/arm/src/stm32f7/stm32_otghost.c b/arch/arm/src/stm32f7/stm32_otghost.c index 03a9ca1a1ca..da25d3dbc9b 100644 --- a/arch/arm/src/stm32f7/stm32_otghost.c +++ b/arch/arm/src/stm32f7/stm32_otghost.c @@ -1880,7 +1880,13 @@ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, if (xfrd > 0) { - /* Yes, return the amount of data received */ + /* Yes, return the amount of data received. + * + * REVISIT: This behavior is clearly correct for CDC/ACM + * bulk transfers and HID interrupt transfers. But I am + * not so certain for MSC bulk transfers which, I think, + * could have NAKed packets in the middle of a transfer. + */ return xfrd; } diff --git a/arch/arm/src/stm32l4/stm32l4_otgfshost.c b/arch/arm/src/stm32l4/stm32l4_otgfshost.c index 7855ea2eebd..b0fa7645eab 100644 --- a/arch/arm/src/stm32l4/stm32l4_otgfshost.c +++ b/arch/arm/src/stm32l4/stm32l4_otgfshost.c @@ -1885,7 +1885,13 @@ static ssize_t stm32l4_in_transfer(FAR struct stm32l4_usbhost_s *priv, if (xfrd > 0) { - /* Yes, return the amount of data received */ + /* Yes, return the amount of data received. + * + * REVISIT: This behavior is clearly correct for CDC/ACM + * bulk transfers and HID interrupt transfers. But I am + * not so certain for MSC bulk transfers which, I think, + * could have NAKed packets in the middle of a transfer. + */ return xfrd; }