diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-10-27 22:40:10 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-10-27 22:40:10 +0000 |
commit | e6b22157354611433eb01f6c20f7ac166a8fe21d (patch) | |
tree | a8ff95b487fb47d413f6911bdead8ede712bac7d /nuttx | |
parent | 802835b705971be113b05966aabb02ac7064ee2f (diff) | |
download | px4-nuttx-e6b22157354611433eb01f6c20f7ac166a8fe21d.tar.gz px4-nuttx-e6b22157354611433eb01f6c20f7ac166a8fe21d.tar.bz2 px4-nuttx-e6b22157354611433eb01f6c20f7ac166a8fe21d.zip |
Fix errors in list handling + request buffer size
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1085 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/drivers/usbdev/usbdev_scsi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nuttx/drivers/usbdev/usbdev_scsi.c b/nuttx/drivers/usbdev/usbdev_scsi.c index 006c6fa5f..94ae730a7 100644 --- a/nuttx/drivers/usbdev/usbdev_scsi.c +++ b/nuttx/drivers/usbdev/usbdev_scsi.c @@ -2073,7 +2073,7 @@ static int usbstrg_cmdwritestate(FAR struct usbstrg_dev_s *priv) * data to be written. */ - privreq = (FAR struct usbstrg_req_s *)sq_peek(&priv->rdreqlist); + privreq = (FAR struct usbstrg_req_s *)sq_remfirst(&priv->rdreqlist); /* If there no request data available, then just return an error. * This will cause us to remain in the CMDWRITE state. When a filled request is @@ -2138,7 +2138,7 @@ static int usbstrg_cmdwritestate(FAR struct usbstrg_dev_s *priv) * to get the next read request. */ - req->len = priv->epbulkout->maxpacket; + req->len = CONFIG_USBSTRG_BULKOUTREQLEN; req->private = privreq; req->callback = usbstrg_rdcomplete; @@ -2150,7 +2150,7 @@ static int usbstrg_cmdwritestate(FAR struct usbstrg_dev_s *priv) /* Did the host decide to stop early? */ - if (xfrd != priv->epbulkout->maxpacket) + if (xfrd != CONFIG_USBSTRG_BULKOUTREQLEN) { priv->shortpacket = 1; goto errout; |