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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user