public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usbcore: fix check_ctrlrecip to allow control transfers in state ADDRESS
@ 2006-03-11  1:42 Horst Schirmeier
  0 siblings, 0 replies; only message in thread
From: Horst Schirmeier @ 2006-03-11  1:42 UTC (permalink / raw)
  To: Greg KH, linux-usb-devel, linux-kernel

check_ctrlrecip() disallows any control transfers if the device is
deconfigured (in configuration 0, ie. state ADDRESS). This for example
makes it impossible to read the device descriptors without configuring
the device, although most standard device requests are allowed in this
state by the spec. This patch allows control transfers for the ADDRESS
state, too.

Signed-off-by: Horst Schirmeier <horst@schirmeier.com> 

---

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 2b68998..3461476 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -498,7 +498,8 @@ static int check_ctrlrecip(struct dev_st
 {
 	int ret = 0;
 
-	if (ps->dev->state != USB_STATE_CONFIGURED)
+	if (ps->dev->state != USB_STATE_ADDRESS
+	 && ps->dev->state != USB_STATE_CONFIGURED)
 		return -EHOSTUNREACH;
 	if (USB_TYPE_VENDOR == (USB_TYPE_MASK & requesttype))
 		return 0;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-11  1:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-11  1:42 [PATCH] usbcore: fix check_ctrlrecip to allow control transfers in state ADDRESS Horst Schirmeier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox