ricardgb commented on issue #19435:
URL: https://github.com/apache/nuttx/issues/19435#issuecomment-4973088236
## Patch (diff)
```diff
diff --git a/drivers/usbdev/usbmsc.c b/drivers/usbdev/usbmsc.c
index bfac6ff03f..bae9bc2f99 100644
--- a/drivers/usbdev/usbmsc.c
+++ b/drivers/usbdev/usbmsc.c
@@ -741,7 +741,7 @@ static int usbmsc_setup(FAR struct usbdevclass_driver_s
*driver,
if (ctrl->type == USB_REQ_RECIPIENT_INTERFACE)
{
if (priv->config == USBMSC_CONFIGID &&
- index == USBMSC_INTERFACEID &&
+ index == priv->devinfo.ifnobase &&
value == USBMSC_ALTINTERFACEID)
{
/* Signal to instantiate the interface change */
@@ -764,7 +764,7 @@ static int usbmsc_setup(FAR struct usbdevclass_driver_s
*driver,
if (ctrl->type == (USB_DIR_IN | USB_REQ_RECIPIENT_INTERFACE) &&
priv->config == USBMSC_CONFIGIDNONE)
{
- if (index != USBMSC_INTERFACEID)
+ if (index != priv->devinfo.ifnobase)
{
ret = -EDOM;
}
@@ -805,7 +805,7 @@ static int usbmsc_setup(FAR struct usbdevclass_driver_s
*driver,
{
/* Only one interface is supported */
- if (index != USBMSC_INTERFACEID)
+ if (index != priv->devinfo.ifnobase)
{
usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_MSRESETNDX),
index);
@@ -836,7 +836,7 @@ static int usbmsc_setup(FAR struct usbdevclass_driver_s
*driver,
{
/* Only one interface is supported */
- if (index != USBMSC_INTERFACEID)
+ if (index != priv->devinfo.ifnobase)
{
usbtrace(TRACE_CLSERROR(USBMSC_TRACEERR_GETMAXLUNNDX),
index);
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]