diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-03-20 15:20:24 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-03-20 15:20:24 -0600 |
commit | ec7904d89eb37a7ccb0ef130f2089206f185ebe5 (patch) | |
tree | 9fbe4e4e850e86075cf8da3ae73480696bc65536 | |
parent | 641ed1fd58895554a604c5314fff44330c9e9bf0 (diff) | |
download | nuttx-ec7904d89eb37a7ccb0ef130f2089206f185ebe5.tar.gz nuttx-ec7904d89eb37a7ccb0ef130f2089206f185ebe5.tar.bz2 nuttx-ec7904d89eb37a7ccb0ef130f2089206f185ebe5.zip |
If DCD supports queuing of stall requests then USB MSC delay work-around is not necessary
-rw-r--r-- | nuttx/ChangeLog | 4 | ||||
-rw-r--r-- | nuttx/TODO | 9 | ||||
-rw-r--r-- | nuttx/arch/arm/src/sam34/Kconfig | 1 | ||||
-rw-r--r-- | nuttx/drivers/usbdev/Kconfig | 16 |
4 files changed, 30 insertions, 0 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 2e3b67ecb..5f7accac9 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -7014,4 +7014,8 @@ * include/nuttx/i2c.h: More typo fixes from Vijay Kumar (2014-3-19). * arch/Kconfig and *_assert.h: Add a configuration option to enable dumping of the USB trace buffer on assertion (2014-3-19). + * drivers/usbdev/Kconfig, arch/arm/src/sam34/Kconfig, and + drivers/usbdev/usbmsc_scsi.c: If DCD can support queuing of stall + requests, then the USB MSC stall work around delays are not necessary + (2014-3-20). diff --git a/nuttx/TODO b/nuttx/TODO index 84b6e8030..762e172d4 100644 --- a/nuttx/TODO +++ b/nuttx/TODO @@ -947,6 +947,15 @@ o USB (drivers/usbdev, drivers/usbhost) Description: There is a workaround for a bug in drivers/usbdev/usbdev_storage.c. that involves delays. This needs to be redesigned to eliminate these delays. See logic conditioned on CONFIG_USBMSC_RACEWAR. + + If queuing of stall requests is supported by DCD then this workaround + is not required. In this case, (1) the stall is not sent until all + write requests preceding the stall request are sent, (2) the stall is + sent, and then after the stall is cleared, (3) all write requests + queued after the stall are sent. + + See, for example, the queuing of pending stall requests in the SAM3/4 + UDP driver at arch/arm/src/sam34/sam_udp.c. Status: Open Priority: Medium diff --git a/nuttx/arch/arm/src/sam34/Kconfig b/nuttx/arch/arm/src/sam34/Kconfig index 2c244a858..16aa5bc05 100644 --- a/nuttx/arch/arm/src/sam34/Kconfig +++ b/nuttx/arch/arm/src/sam34/Kconfig @@ -561,6 +561,7 @@ config SAM34_UDP bool "USB Device Full Speed (UDP)" default n depends on ARCH_CHIP_SAM4S || ARCH_CHIP_SAM4E + select ARCH_USBDEV_STALLQUEUE config SAM34_UDPHS bool "USB Device High Speed (UDPHS)" diff --git a/nuttx/drivers/usbdev/Kconfig b/nuttx/drivers/usbdev/Kconfig index f512bd4a7..8da9d9e35 100644 --- a/nuttx/drivers/usbdev/Kconfig +++ b/nuttx/drivers/usbdev/Kconfig @@ -72,6 +72,22 @@ bool "Board DMA Allocation Hooks" memory of the specified size; usbdev_dma_free() is the corresponding function that will be called to free the DMA-capable memory. +config ARCH_USBDEV_STALLQUEUE + bool + default n + ---help--- + This option is set by the USB device controller driver (DCD) + selection. These selection means that the DCD can support + queuing of stall requests. By this, it is meant that, (1) the + stall is not sent until all write requests preceding the stall + request are sent, (2) the stall is sent, and then after the + stall is cleared, (3) all write requests queued after the stall + are sent. + + If the driver does not support this feature, that the class drivers + will enable some hokey and inefficient delay logic to workaround + the lack of queuing. + config USBDEV_TRACE bool "Enable USB tracing for debug" default n |