summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-09-07 10:12:02 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-09-07 10:12:02 -0600
commit41f052cc7b494d198e5bcb662790c1c1102c5dfb (patch)
tree34e36a41bb604d7869c5b97b2693528875dec51e
parenta565e702360db5afd59864a83f6f922b7e8817de (diff)
downloadpx4-nuttx-41f052cc7b494d198e5bcb662790c1c1102c5dfb.tar.gz
px4-nuttx-41f052cc7b494d198e5bcb662790c1c1102c5dfb.tar.bz2
px4-nuttx-41f052cc7b494d198e5bcb662790c1c1102c5dfb.zip
Fix warnings in USB MSC when compiled for a high speed device; also fix USB MSC default VID/PID configuration
-rw-r--r--apps/ChangeLog.txt2
-rw-r--r--nuttx/ChangeLog2
-rw-r--r--nuttx/configs/sama5d3x-ek/demo/defconfig8
-rw-r--r--nuttx/drivers/usbdev/Kconfig21
-rw-r--r--nuttx/drivers/usbdev/usbmsc_desc.c6
5 files changed, 25 insertions, 14 deletions
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index c91f07574..4d076afa1 100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -640,5 +640,5 @@
though msconn returned. The USB MSC logic really should not use
a pthread, but we are stuck with that for now. The work-around
is the msconn now daemonizes itself so that it so taht the pthread
- is created in a different task group (2013-8-6).
+ is created in a different task group (2013-9-7).
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 6e89dab6f..e08ce2653 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -5520,4 +5520,6 @@
* drivers/usbdev/usbdev_strings.c: Extended decoding and stringifging
of USB trace output to include trace output from class drivers.
(2013-9-6).
+ * drivers/usbdev/usbmsc_desc.c: Fix a warning when USB MSC is
+ compiled for a high-speed device (2013-9-7).
diff --git a/nuttx/configs/sama5d3x-ek/demo/defconfig b/nuttx/configs/sama5d3x-ek/demo/defconfig
index 85eb8da94..e3362f2b6 100644
--- a/nuttx/configs/sama5d3x-ek/demo/defconfig
+++ b/nuttx/configs/sama5d3x-ek/demo/defconfig
@@ -443,9 +443,9 @@ CONFIG_USBMSC_NWRREQS=4
CONFIG_USBMSC_NRDREQS=4
CONFIG_USBMSC_BULKINREQLEN=512
CONFIG_USBMSC_BULKOUTREQLEN=512
-CONFIG_USBMSC_VENDORID=0x00
+CONFIG_USBMSC_VENDORID=0x584e
CONFIG_USBMSC_VENDORSTR="Nuttx"
-CONFIG_USBMSC_PRODUCTID=0x00
+CONFIG_USBMSC_PRODUCTID=0x5342
CONFIG_USBMSC_PRODUCTSTR="Mass Storage"
CONFIG_USBMSC_VERSIONNO=0x399
# CONFIG_USBMSC_REMOVABLE is not set
@@ -640,6 +640,10 @@ CONFIG_EXAMPLES_USBMSC_DEVPATH2="/dev/mmcsd1"
CONFIG_EXAMPLES_USBMSC_DEVMINOR3=2
CONFIG_EXAMPLES_USBMSC_DEVPATH3="/dev/mmcsd2"
# CONFIG_EXAMPLES_USBMSC_DEBUGMM is not set
+CONFIG_EXAMPLES_USBMSC_CMD_STACKSIZE=768
+CONFIG_EXAMPLES_USBMSC_CMD_PRIORITY=100
+CONFIG_EXAMPLES_USBMSC_DAEMON_STACKSIZE=2048
+CONFIG_EXAMPLES_USBMSC_DAEMON_PRIORITY=100
# CONFIG_EXAMPLES_USBTERM is not set
# CONFIG_EXAMPLES_WATCHDOG is not set
diff --git a/nuttx/drivers/usbdev/Kconfig b/nuttx/drivers/usbdev/Kconfig
index f95ca0fa1..2adc79fe7 100644
--- a/nuttx/drivers/usbdev/Kconfig
+++ b/nuttx/drivers/usbdev/Kconfig
@@ -127,8 +127,8 @@ config COMPOSITE_EP0MAXPACKET
config COMPOSITE_VENDORID
hex "Composite vendor ID"
- default 0
-
+ default 0x0000
+
config COMPOSITE_VENDORSTR
string "Composite vendor ID"
default "Nuttx"
@@ -137,8 +137,8 @@ config COMPOSITE_VENDORSTR
config COMPOSITE_PRODUCTID
hex "Composite product id"
- default 0
-
+ default 0x0000
+
config COMPOSITE_PRODUCTSTR
string "Composite product string"
default "Composite device"
@@ -523,8 +523,13 @@ config USBMSC_BULKOUTREQLEN
config USBMSC_VENDORID
hex "Mass storage Vendor ID"
- default 0x00
-
+ default 0x584e
+ ---help---
+ The vendor ID (VID). The value here is bogus. You should not use
+ it in any commercial products! You must go through the proper
+ channels to request a vendor ID for your company if you do not
+ already have one!
+
config USBMSC_VENDORSTR
string "Mass storage vendor string"
default "Nuttx"
@@ -533,7 +538,9 @@ config USBMSC_VENDORSTR
config USBMSC_PRODUCTID
hex "Mass storage Product ID"
- default 0x00
+ default 0x5342
+ ---help---
+ The product ID (PID).
config USBMSC_PRODUCTSTR
string "Mass storage product string"
diff --git a/nuttx/drivers/usbdev/usbmsc_desc.c b/nuttx/drivers/usbdev/usbmsc_desc.c
index 6d7561b3f..90e9decda 100644
--- a/nuttx/drivers/usbdev/usbmsc_desc.c
+++ b/nuttx/drivers/usbdev/usbmsc_desc.c
@@ -359,7 +359,6 @@ int16_t usbmsc_mkcfgdesc(uint8_t *buf)
#ifdef CONFIG_USBDEV_DUALSPEED
FAR const struct usb_epdesc_s *epdesc;
bool hispeed = (speed == USB_SPEED_HIGH);
- uint16_t bulkmxpacket;
#endif
/* Configuration descriptor. If the USB mass storage device is
@@ -388,12 +387,11 @@ int16_t usbmsc_mkcfgdesc(uint8_t *buf)
hispeed = !hispeed;
}
- bulkmxpacket = USBMSC_BULKMAXPACKET(hispeed);
- epdesc = USBMSC_EPBULKINDESC(hispeed);
+ epdesc = USBMSC_EPBULKINDESC(hispeed);
memcpy(buf, epdesc, USB_SIZEOF_EPDESC);
buf += USB_SIZEOF_EPDESC;
- epdesc = USBMSC_EPBULKOUTDESC(hispeed);
+ epdesc = USBMSC_EPBULKOUTDESC(hispeed);
memcpy(buf, epdesc, USB_SIZEOF_EPDESC);
#else
memcpy(buf, &g_fsepbulkoutdesc, USB_SIZEOF_EPDESC);