Added callback support to MSC SCSI command execution #1743
Replies: 3 comments 4 replies
-
can you elaborate in more details. Which specific function supply callback and not use it ? and how your snippet help with that. |
Beta Was this translation helpful? Give feedback.
-
There are three functions that are called with callbacks and subsequently call tuh_msc_scsi_command: tuh_msc_read_capacity (called by config_test_unit_ready_complete) In addition, there are others that take callbacks that call tuh_msc_scsi_command: tuh_msc_inquiry In all of these cases, if tuh_msc_scsi_command doesn't support handling the callbacks then the callback would never get called. It only gets thrown away. |
Beta Was this translation helpful? Give feedback.
-
When I turn on debug logging I can't get anything to mount at all, so I used some more lightweight logging. Now I understand what's going on. The code is using get_itf() to make the callback persistent across routine calls, such that a call to usbh_edpt_xfer_with_callback isn't necessary. |
Beta Was this translation helpful? Give feedback.
-
I noticed that many calls to tuh_msc_scsi_command() supply a callback but there seems to be no provision to actually use the callback. Not sure if this is a hack or not (?) but in my code I added support for callbacks. Feel free to criticize or use:
Beta Was this translation helpful? Give feedback.
All reactions