diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-10-25 14:40:37 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-10-25 14:40:37 +0000 |
commit | ac127ea7b0247cf23f3c7be443cadf9f2983d248 (patch) | |
tree | 3f5d91016a6b36608a34ba06034de328f6cb21f7 /nuttx/drivers/usbdev/usbdev_scsi.c | |
parent | 89b3d89c8ff69d5dffcc0359220b3fe12a91be58 (diff) | |
download | px4-nuttx-ac127ea7b0247cf23f3c7be443cadf9f2983d248.tar.gz px4-nuttx-ac127ea7b0247cf23f3c7be443cadf9f2983d248.tar.bz2 px4-nuttx-ac127ea7b0247cf23f3c7be443cadf9f2983d248.zip |
Fix to handler transfers larger than one request
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1077 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/usbdev/usbdev_scsi.c')
-rw-r--r-- | nuttx/drivers/usbdev/usbdev_scsi.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/nuttx/drivers/usbdev/usbdev_scsi.c b/nuttx/drivers/usbdev/usbdev_scsi.c index 08e7cc1b4..726748920 100644 --- a/nuttx/drivers/usbdev/usbdev_scsi.c +++ b/nuttx/drivers/usbdev/usbdev_scsi.c @@ -1998,8 +1998,9 @@ static int usbstrg_cmdreadstate(FAR struct usbstrg_dev_s *priv) req->len = priv->nreqbytes; req->private = privreq; req->callback = usbstrg_wrcomplete; + req->flags = 0; - ret = EP_SUBMIT(priv->epbulkin, req); + ret = EP_SUBMIT(priv->epbulkin, req); if (ret != OK) { usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_CMDREADSUBMIT), (uint16)-ret); @@ -2227,6 +2228,8 @@ static int usbstrg_cmdfinishstate(FAR struct usbstrg_dev_s *priv) req->len = priv->nreqbytes; req->callback = usbstrg_wrcomplete; req->private = privreq; + req->flags = USBDEV_REQFLAGS_NULLPKT; + ret = EP_SUBMIT(priv->epbulkin, privreq->req); if (ret < 0) { @@ -2367,10 +2370,12 @@ static int usbstrg_cmdstatusstate(FAR struct usbstrg_dev_s *priv) usbstrg_dumpdata("SCSCI CSW", (ubyte*)csw, USBSTRG_CSW_SIZEOF); - req->len = USBSTRG_CSW_SIZEOF; - req->callback = usbstrg_wrcomplete; - req->private = privreq; - ret = EP_SUBMIT(priv->epbulkin, req); + req->len = USBSTRG_CSW_SIZEOF; + req->callback = usbstrg_wrcomplete; + req->private = privreq; + req->flags = USBDEV_REQFLAGS_NULLPKT; + + ret = EP_SUBMIT(priv->epbulkin, req); if (ret < 0) { usbtrace(TRACE_CLSERROR(USBSTRG_TRACEERR_SNDSTATUSSUBMIT), (uint16)-ret); |