update(class/msc/usbh_msc): move msc scsi commands out to prevent blocking enum thread

Signed-off-by: sakumisu <1203593632@qq.com>
This commit is contained in:
sakumisu
2025-01-26 00:15:33 +08:00
parent 49d9775a1b
commit c827c2e50b
6 changed files with 63 additions and 61 deletions

View File

@@ -101,11 +101,11 @@ static int usbhost_open(FAR struct inode *inode)
DEBUGASSERT(inode->i_private);
msc_class = (struct usbh_msc *)inode->i_private;
if (msc_class->hport && msc_class->hport->connected) {
return OK;
} else {
if (usbh_msc_scsi_init(msc_class) < 0) {
return -ENODEV;
}
return OK;
}
static int usbhost_close(FAR struct inode *inode)