Fix a few issues related to new USB device boardctl() commands

This commit is contained in:
Gregory Nutt 2016-03-25 14:23:27 -06:00
parent 9b9c374a83
commit 3e4ae24387
5 changed files with 20 additions and 21 deletions

View File

@ -11579,4 +11579,6 @@
processed when the poll from the correct device is received (2016-03-20). processed when the poll from the correct device is received (2016-03-20).
* sched/wqueue/kwork_signal.c: Fix logic to find an IDLE worker thread; * sched/wqueue/kwork_signal.c: Fix logic to find an IDLE worker thread;
the test for busy was backward. From Linfei Chen (2016-03-22). the test for busy was backward. From Linfei Chen (2016-03-22).
* include/sys/boardctl.h, configs/boardctl.c, and many configurations: Add
boardctl() support that will permit applications to control USB devices
(2016-03-25).

27
TODO
View File

@ -462,27 +462,22 @@ o Kernel/Protected Build
Title: apps/system PARTITIONING Title: apps/system PARTITIONING
Description: Several of the USB device helper applications in apps/system Description: Several of the USB device helper applications in apps/system
violate OS/application partitioning and will fail on a kernel violate OS/application partitioning and will fail on a kernel
or protected build. These include directories: or protected build. Many of these have been fixed by adding
the BOARDIOC_USBDEV_CONTROL boarctl command. But there are
- apps/system/cdcacm still issues.
- apps/system/composite
- apps/system/usbmsc
These functions call directly into operating system functions These functions call directly into operating system functions
like: like:
- usbmsc_archinitialize - usbdev_serialinitialize - Called in apps/examples/usbserial,
- composite_archinitialize apps/examples/usbterm
- cdcacm_initialize - cdcacm_classobject - Called from apps/system/composite.
- cdcacm_uninitialize - usbmsc_configure - Called fromo apps/system/usbmsc and
- usbmsc_initialize apps/system/composite
- usbmsc_uninitialize - usbmsc_bindlun - Called fromo apps/system/usbmsc and
- composite_initialize apps/system/composite
- composite-Uninitialize - usbmsc_exportluns - Called fromo apps/system/usbmsc.
Since the corrsponding device drivers may not be present, these
cannot be replaced with IOCTLs. Perhaps they should be support
with new boardctl commands?
Status: Open Status: Open
Priority: Medium/High -- the kernel build configuration is not fully fielded Priority: Medium/High -- the kernel build configuration is not fully fielded
yet. yet.

@ -1 +1 @@
Subproject commit bf0380106515b5c3e7793e0d1cbf37604016e499 Subproject commit 4f47454f0557095bcd2e29ac1923bbf588689c33

View File

@ -235,11 +235,13 @@ int board_uniqueid(FAR uint8_t *uniqueid);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_BOARDCTL_USBDEVCTRL #ifdef CONFIG_BOARDCTL_USBDEVCTRL
#if defined(CONFIG_CDCACM) && !defined(CONFIG_CDCACM_COMPOSITE) #ifdef CONFIG_CDCACM
#endif #endif
#if defined(CONFIG_USBMSC) && !defined(CONFIG_USBMSC_COMPOSITE)
#ifdef CONFIG_USBMSC
int board_usbmsc_initialize(int port); int board_usbmsc_initialize(int port);
#endif #endif
#ifdef CONFIG_USBDEV_COMPOSITE #ifdef CONFIG_USBDEV_COMPOSITE
int board_composite_initialize(int port); int board_composite_initialize(int port);
#endif #endif

View File

@ -225,7 +225,7 @@ struct boardioc_symtab_s
enum boardioc_usbdev_identifier_e enum boardioc_usbdev_identifier_e
{ {
BOARDIOC_USBDEV_NONE = 0 /* Not valid */ BOARDIOC_USBDEV_NONE = 0 /* Not valid */
#if defined(CONFIG_CDCACM) && !defined(CONFIG_CDCACM_COMPOSITE) #ifdef CONFIG_CDCACM
, BOARDIOC_USBDEV_CDCACM /* CDC/ACM */ , BOARDIOC_USBDEV_CDCACM /* CDC/ACM */
#endif #endif
#ifdef CONFIG_USBMSC #ifdef CONFIG_USBMSC