Commit Graph

246 Commits

Author SHA1 Message Date
Gregory Nutt 28eb253401 Composite: Final review for coding style before merge 2017-07-16 08:36:01 -06:00
Gregory Nutt e6af1b9994 Composite: Simplify some intiialization of data structures. 2017-07-16 07:41:38 -06:00
Gregory Nutt 771c367411 Cosmetic changes to alignment. 2017-07-16 07:15:08 -06:00
Gregory Nutt 5d67ddda4e USBMSC: Add missing logic to saved device description. 2017-07-16 07:00:48 -06:00
Gregory Nutt 0729151d29 Trivial, costmetic 2017-07-15 17:11:41 -06:00
Gregory Nutt 23cbc28b05 Detangle use of board_xyzclassobject() and board_xyzuninitialize() 2017-07-14 06:59:45 -06:00
Gregory Nutt 4eb548226b Merge remote-tracking branch 'origin/master' into composite 2017-06-19 17:27:00 -06:00
Oleg Evseev 794ecbfd86 Use struct instead of pointer to the struct as sizeof argument in memset in usbmsc.c
Otherwise it leads to error: argument to 'sizeof' in 'memset' call is the same pointer type 'struct usbmsc_lun_s *' as the destination
2017-06-19 19:45:35 +03:00
Gregory Nutt 9dd41bdd2f Composite: More compile-related fixes 2017-06-01 17:02:43 -06:00
Gregory Nutt fc1438c95d Merge remote-tracking branch 'origin/master' into composite 2017-06-01 16:35:41 -06:00
Gregory Nutt 89f77cd91a Fix some incomplete name changes 2017-06-01 16:11:27 -06:00
Gregory Nutt bd9b548914 Remove COMPILE_TIME_ASSERTION 2017-06-01 15:05:41 -06:00
Frank Benkert 7e6f481581 Part II of the same big commit 2017-06-01 14:58:04 -06:00
Frank Benkert dcc9b07715 [[This is part 1 or several commits]]
We developed a huge Changeset over a year ago to make USB Composite configuration dynamical and be able to instanciate the CDCACM multiple times inside this device.  We use this feature to switch between one in normal and up to three CDCACMs in maintenance boot.

The control path starts in “boardctl.c” where the configuration for the device is constructed.  There are still a few issues which I’ll ask you to have a look at before this beast can be merged.

1. To be able to construct the data dynamically I have changed some USB-Structs to be packed. Maybe there are additional structs to change (just for completeness – not for current functionality).

2. I’ve added the Macro “COMPILE_TIME_ASSERTION” two times (in usbmsc_desc.c and in cdcacm_desc.c) to stay private. Maybe you’ll find a better place. It’s used to check the size of the structs against the assumptions.

3. I’ve changed the interface for some USB-Functions to receive also the dynamic configuration. Maybe this can be done more elegant.

4. The original NuttX (without the patch) seems to have problems with a Composite device holding a CDCACM and an MSC. The “USB SET CONFIGURATION” request does not to work at all. This makes the test fail under Windows and under Linux. Applying this patch doesn’t change anything – because it only changes the configuration – not the behavior. Maybe you’ll have a look at this problem before applying the patch.
2017-06-01 14:08:22 -06:00
Gregory Nutt ae17e6bcf0 Cosmetic 2017-05-30 12:04:48 -06:00
Masatoshi Tateishi 80e22691fa USBMSC: Fix a wrong lun number issue
Jira: PDFW15IS-98
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-04-24 09:48:49 +09:00
Wolfgang Reißnegger cfe7c4012e USBMSC: Always set LUN readonly flag. 2017-02-08 17:17:19 -08:00
David Sidrane 548108764a BugFix:uart_ops_s portion of cdcacm will not be initalized with correct functions if CONFIG_SERIAL_DMA is lit.
This fixes the issses in a C99 compatible way
2016-12-17 04:29:41 -10:00
Wolfgang Reißnegger 88539a7497 USBMSC: Fix length of mode6 sense reply packet. 2016-11-18 17:23:21 -08:00
Gregory Nutt 4fcbe8e410 drivers: Disable priority inheritance on all semaphores used for signaling 2016-11-03 11:00:47 -06:00
Gregory Nutt e0b4a10dfa drivers/serial/pty.c, serial.c, usbdev/cdcacm.c, include/nuttx/fs/ioctl.h: Fix FIONWRITE and add FIONSPACE. All implementations of FIONWRITE were wrong. FIONWRITE should return the number of bytes waiting in the outgoing send queue, not the free space. Rather, FIONSPACE should return the free space in the send queue. 2016-07-25 14:06:32 -06:00
Wolfgang Reissnegger 4f83d58b24 USBMSC: Fix reversed logic on waiting for SCSI thread start.
The scsi thread was waiting for the wrong condition.

However, this was masked by the fact that the code creating the scsi thread
was also holding usbmsc_scsi_lock(priv) while initializing data, hence this
lock synchronized the scsi thread start with init completion.
2016-07-23 20:11:00 -07:00
Wolfgang Reissnegger 2974d2b07e USBMSC: Add locks when removing request from queue. 2016-07-23 20:10:41 -07:00
Wolfgang Reissnegger 81f7758848 USBMSC: Fix usbtrace() string. 2016-07-23 20:10:20 -07:00
ziggurat29 2cadf783fd cdcacm_unbind leaks write request objects. This arises due to freeing the
bulk IN endpoint before the loop that frees the requests via cdcasm_freereq.
That function checks the parameters and skips the freeing if either is NULL.
Freeing the bulk IN enpoint will cause the first param to be NULL, thereby
bypassing the free operation.  To fix, I moved the release of the bulk IN
endpoint until after to loop (much as was the case for the OUT and read
requests, which did not exhibit the problem).
2016-07-07 12:02:23 -05:00
Gregory Nutt a897fd4ccf Eliminate use of apps/system/usbmonitor. Use drivers/usbmonitor instead. 2016-06-30 13:09:22 -06:00
Gregory Nutt 505ca542e8 Remove some last traces of lowvsyslog that were missed; Add a SYSLOG emergency channel for handling assertion output more cleanly 2016-06-20 16:11:50 -06:00
Gregory Nutt 2b445ddccc Remove lowsyslog(). The new syslog() includes all of the functionality of lowsyslog(). No longer any need for two interfaces. 2016-06-20 08:57:08 -06:00
Gregory Nutt 1cdc746726 Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES 2016-06-11 14:14:08 -06:00
Gregory Nutt fc3540cffe Replace all occurrences of vdbg with vinfo 2016-06-11 11:59:51 -06:00
Gregory Nutt 3a74a438d9 Rename CONFIG_DEBUG_VERBOSE to CONFIG_DEBUG_INFO 2016-06-11 11:50:18 -06:00
Gregory Nutt 75a4a5dcbe Back part of a previous CDC/ACM change. Improve some Kconfig comments. 2016-03-19 12:45:33 -06:00
Gregory Nutt deed28b8f2 USB composite: Fix some errors in conditional compilation 2016-03-19 08:08:40 -06:00
Gregory Nutt 9644d42e91 USB CDC/ACM device: Trivial configuration clean-up 2016-03-19 07:36:39 -06:00
David Sidrane d2a017d9bb rdreqs was defined as CONFIG_CDCACM_NWRREQS size 2016-03-17 21:47:40 +00:00
David Sidrane 2cfa023039 RD - comments were for WR 2016-03-17 21:45:57 +00:00
Gregory Nutt 0fb035f76b Standardize some naming in code section comments 2016-02-21 18:09:04 -06:00
Gregory Nutt 2244ed46bc nuttx/drivers: Replace irqsave() with enter_critical_section(); replace irqrestore() with leave_critical_section() 2016-02-14 07:32:58 -06:00
Gregory Nutt 4a7e28ba96 CDC/ACM: Fix a bad default value in last commit 2015-12-08 07:33:49 -06:00
Gregory Nutt 513cc08c7f change default size of CDC/ACM serial buffer sizes 2015-12-07 17:18:14 -06:00
Gregory Nutt 2726f0ac7c USB serial driver Kconfig: Select default sizes for serial buffers so that the can hold even multiples of the max packet size. 2015-12-03 14:17:41 -06:00
Gregory Nutt cf14f8d1b5 drivers/: Fixes to spacing and alignement 2015-10-10 10:41:00 -06:00
Gregory Nutt 0b12dbf95d Fix some spacing problems 2015-10-04 15:04:00 -06:00
Gregory Nutt 16b32bbadd Standardize the width of all comment boxes in C files 2015-10-03 07:25:53 -06:00
Gregory Nutt 5b51a9fcdd Standardize the width of all comment boxes in C files 2015-10-02 17:43:18 -06:00
Gregory Nutt dbc9d67b3a USBDEV Kconfig: CONFIG_USBDEV_TRACE_INITIALIDSET missing from Kconfig file 2015-09-08 07:25:21 -06:00
Paul A. Patience 3b89eabd50 Correct #if to #ifdef when the macro can be undefined. Fix bug in AT24XX driver: it should compare AT24XX_ADDRSIZE to 2. 2015-09-01 13:52:29 -04:00
Gregory Nutt 51f386d08a Fix more common typos 2015-08-16 11:07:23 -06:00
Gregory Nutt 77f5c34af0 Fix some common typos 2015-08-16 11:00:30 -06:00
Gregory Nutt e9a4455038 drivers/usbdev: Eliminate some warnings 2015-07-01 10:02:19 -06:00