You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@mynewt.apache.org by "kasjer (via GitHub)" <gi...@apache.org> on 2026/03/13 18:55:07 UTC

[PR] tinyusb/msc_fat_view: Add support for bigger buffer [mynewt-core]

kasjer opened a new pull request, #3590:
URL: https://github.com/apache/mynewt-core/pull/3590

   So far **msc_fat_view** assumed that buffer size for
   read and writes is **512** bytes.
   
   Now it can utilized bigger buffers.
   Buffer size can be set by syscfg value `USBD_MSC_EP_BUFSIZE`.
   
   Setting this to bigger size can improve performance.
   
   <table>
   <tr><th colspan=2>Full speed
   <tr><td>Buffer size [bytes] <td>Read speed [kB/s]
   <tr><td>512<td>808
   <tr><td>1024<td>823
   <tr><td>2048<td>864
   <tr><td>4096<td>879
   <tr><td>8192<td>885
   <tr><td>32768<td>887
   </table>
   
   <table><tr><th colspan=2>High speed</th>
   </tr><tr><td>Buffer size [bytes]<td>Read speed [MB/s]
   <tr><td>512<td>6.1
   <tr><td>1024<td>7.9
   <tr><td>2048<td>8.2
   <tr><td>4096<td>8.5
   <tr><td>8192<td>8.4
   <tr><td>32768<td>8.4
   </table>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] tinyusb/msc_fat_view: Add support for bigger buffer [mynewt-core]

Posted by "sjanc (via GitHub)" <gi...@apache.org>.
sjanc commented on code in PR #3590:
URL: https://github.com/apache/mynewt-core/pull/3590#discussion_r2945100600


##########
hw/usb/tinyusb/msc_fat_view/src/msc_fat_view.c:
##########
@@ -1383,7 +1383,12 @@ tud_msc_read10_cb(uint8_t lun, uint32_t lba, uint32_t offset, void *buffer, uint
     if (medium_state < MEDIUM_RELOAD) {
         return -1;
     }
-    msc_fat_view_read_sector(lba, buffer);
+    MSC_FAT_VIEW_LOG_DEBUG("SCSI READ10 %d, %d, %d\n", (int)lba, (int)offset,
+                           (int)bufsize);
+
+    for (int i = 0; i < bufsize; i += SECTOR_SIZE, ++lba) {

Review Comment:
   nitpick:  bufsize is unsigned, so i should be too



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org