You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "raiden00pl (via GitHub)" <gi...@apache.org> on 2023/03/23 16:54:33 UTC

[GitHub] [nuttx] raiden00pl opened a new pull request, #8882: stm32/otgdev: remove invalid use of the priv field for EP

raiden00pl opened a new pull request, #8882:
URL: https://github.com/apache/nuttx/pull/8882

   ## Summary
   
   - {stm32/stm32l4/stm32f7/stm32h7/efm32}/otgdev: remove invalid use of the priv field for EP
   This field is for use in the class driver, not in the controller logic
   
   ## Impact
   One of the problems I found when debugging USBDEV composite on the STM32 OTG.
   
   ## Testing
   CI
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] davids5 merged pull request #8882: stm32/otgdev: remove invalid use of the priv field for EP

Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 merged PR #8882:
URL: https://github.com/apache/nuttx/pull/8882


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] raiden00pl commented on pull request #8882: stm32/otgdev: remove invalid use of the priv field for EP

Posted by "raiden00pl (via GitHub)" <gi...@apache.org>.
raiden00pl commented on PR #8882:
URL: https://github.com/apache/nuttx/pull/8882#issuecomment-1482464901

   EP structure definition states that this field is for use by class driver:
   https://github.com/apache/nuttx/blob/5651715486ed50df92ad3348da92833ac127153c/include/nuttx/usb/usbdev.h#L297
   
   and it is used by all class drivers, eg here:
   https://github.com/apache/nuttx/blob/5651715486ed50df92ad3348da92833ac127153c/drivers/usbdev/cdcacm.c#L1322
   
   We already store the device reference for all endpoints, so it should be used without problems:
   https://github.com/apache/nuttx/blob/5651715486ed50df92ad3348da92833ac127153c/arch/arm/src/stm32/stm32_otgfsdev.c#L5252
   
   I'm not sure if this change had any real consequences. I found a lot of problems when running the composite device for stm32 otgdev and it's hard to say which one actually fixed the problem (or maybe all of them together).
   
   The strangest thing was that the problems didn't occur on other architectures that I have, only on stm32 OTG and only with the composite class.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] davids5 commented on pull request #8882: stm32/otgdev: remove invalid use of the priv field for EP

Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 commented on PR #8882:
URL: https://github.com/apache/nuttx/pull/8882#issuecomment-1482433906

   @raiden00pl How did this manifest as a problem? 
   
   Why Is `priv->epin[EP0].ep.priv = priv` being the control not correct?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] raiden00pl commented on pull request #8882: stm32/otgdev: remove invalid use of the priv field for EP

Posted by "raiden00pl (via GitHub)" <gi...@apache.org>.
raiden00pl commented on PR #8882:
URL: https://github.com/apache/nuttx/pull/8882#issuecomment-1483059955

   I haven't met any problems with it yet. It works with CDCACM, RNDIS and USBMSC. After this change, the field is managed and used only by class drivers. The controller logic has nothing to do with it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org