[PATCH] drivers/usb/core/devio.c: Relax test in check_ctrlrecip

From: Matthias Dellweg
Date: Wed Sep 21 2011 - 15:28:18 EST


The generic test for the interface is not valid when the request type is
class specific.

Signed-off-by: Matthias Dellweg <2500@xxxxxx>
---
drivers/usb/core/devio.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 37518df..4e78768 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -615,7 +615,8 @@ static int check_ctrlrecip(struct dev_state *ps, unsigned int requesttype,
&& ps->dev->state != USB_STATE_ADDRESS
&& ps->dev->state != USB_STATE_CONFIGURED)
return -EHOSTUNREACH;
- if (USB_TYPE_VENDOR == (USB_TYPE_MASK & requesttype))
+ if ((USB_TYPE_VENDOR == (USB_TYPE_MASK & requesttype))
+ || (USB_TYPE_CLASS == (USB_TYPE_MASK & requesttype)))
return 0;

index &= 0xff;
--
1.7.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/