public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] usb: xhci: Fix vendor command error if the request type is USB_REQ_SET_ADDRESS or USB_REQ_SET_CONFIGURATION.
@ 2015-11-25  5:57 Ted Chen
  2015-11-25  5:57 ` Ted Chen
  2015-11-26  1:24 ` Marek Vasut
  0 siblings, 2 replies; 8+ messages in thread
From: Ted Chen @ 2015-11-25  5:57 UTC (permalink / raw)
  To: u-boot

Add a condition of set_address and set_configuration to check
if the request is standardized.

Signed-off-by: Ted Chen <tedchen@realtek.com>
---
 drivers/usb/host/xhci.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index ca598aa..cb8a04b 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -941,10 +941,12 @@ static int _xhci_submit_control_msg(struct usb_device *udev, unsigned long pipe,
 	if (usb_pipedevice(pipe) == ctrl->rootdev)
 		return xhci_submit_root(udev, pipe, buffer, setup);
 
-	if (setup->request == USB_REQ_SET_ADDRESS)
+	if (setup->request == USB_REQ_SET_ADDRESS &&
+	   (setup->requesttype & USB_TYPE_MASK) == USB_TYPE_STANDARD)
 		return xhci_address_device(udev, root_portnr);
 
-	if (setup->request == USB_REQ_SET_CONFIGURATION) {
+	if (setup->request == USB_REQ_SET_CONFIGURATION &&
+	   (setup->requesttype & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
 		ret = xhci_set_configuration(udev);
 		if (ret) {
 			puts("Failed to configure xHCI endpoint\n");
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-01-25 20:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-25  5:57 [U-Boot] [PATCH] usb: xhci: Fix vendor command error if the request type is USB_REQ_SET_ADDRESS or USB_REQ_SET_CONFIGURATION Ted Chen
2015-11-25  5:57 ` Ted Chen
2015-11-25  9:09   ` Anand Moon
2015-12-07  8:16     ` Joe Culler
2015-12-07  8:31       ` Joe Culler
2015-11-26  1:24 ` Marek Vasut
2016-01-25 11:11   ` Ted
2016-01-25 20:53     ` Marek Vasut

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