diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-03-19 17:56:15 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-03-19 17:56:15 +0000 |
commit | 5fac8e83aba8dcd6493d8502783e471c8ddf2be6 (patch) | |
tree | 5d423851b7062520785d7624c9a1d0b3a09ce33b /nuttx/drivers/usbdev/usbmsc_scsi.c | |
parent | d1aa52f99c7510c1f515a4cac81bf4fac3083c83 (diff) | |
download | px4-nuttx-5fac8e83aba8dcd6493d8502783e471c8ddf2be6.tar.gz px4-nuttx-5fac8e83aba8dcd6493d8502783e471c8ddf2be6.tar.bz2 px4-nuttx-5fac8e83aba8dcd6493d8502783e471c8ddf2be6.zip |
Minor updates for PIC32 USB device driver bugs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4497 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/usbdev/usbmsc_scsi.c')
-rw-r--r-- | nuttx/drivers/usbdev/usbmsc_scsi.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/nuttx/drivers/usbdev/usbmsc_scsi.c b/nuttx/drivers/usbdev/usbmsc_scsi.c index fa443497f..ccc967618 100644 --- a/nuttx/drivers/usbdev/usbmsc_scsi.c +++ b/nuttx/drivers/usbdev/usbmsc_scsi.c @@ -1626,11 +1626,6 @@ static int usbmsc_idlestate(FAR struct usbmsc_dev_s *priv) req->priv = privreq; req->callback = usbmsc_rdcomplete; - if (EP_SUBMIT(priv->epbulkout, req) != OK) - { - usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_IDLERDSUBMIT), (uint16_t)-ret); - } - /* Change to the CMDPARSE state and return success */ usbtrace(TRACE_CLASSSTATE(USBMSC_CLASSSTATE_IDLECMDPARSE), priv->cdb[0]); @@ -1638,6 +1633,13 @@ static int usbmsc_idlestate(FAR struct usbmsc_dev_s *priv) ret = OK; } + /* In any event, return the request to be refilled */ + + if (EP_SUBMIT(priv->epbulkout, req) != OK) + { + usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_IDLERDSUBMIT), (uint16_t)-ret); + } + return ret; } |