-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USB MSC: speed optimization #182
Conversation
089fb6f
to
a466843
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tore-espressif Left some comments.
a466843
to
55fcd56
Compare
55fcd56
to
3a2a44f
Compare
dcdbe29
to
da0e56a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @tore-espressif ,
I have checked the code again and run error_recovery_1 and _2 locally.
Small comments only, otherwise LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tore-espressif
Please check the review comments
@tore-espressif Changes LGTM |
ef0257d
to
6928417
Compare
This will save CPU time when MSC driver has nothing to do
msc driver offered debug functions that accessed an array outside of its boundaries
The MSC driver can now only be used with the VFS component. The MSC driver will reuse an intermediate VFS buffer to send larger transfers to MSC device, dramatically increasing transfer speeds Expose SCSI commands as esp_private include" SCSI commands can be used for direct access of memory blocks
6928417
to
f83def3
Compare
Checklist
url
field definedChange description
After the application starts new USB transfer, the USB-OTG peripheral will schedule it for next frame (which can be as delayed as 1ms). Therefore, the application must submit large-enough (>1kB) transfers to fully leverage USB FullSpeed bandwidth. For larger USB transfers we need more DMA capable memory, plus we need the same amount for memory for buffer in Virtual File System.
This change reuses the VFS buffer for USB transfers, which saves memory and does not require any copying between buffers. Plus, the user gets a convenient API to change the buffer size per file with
setvbuf()
, without any configuration of the MSC driver