From patchwork Sat Mar 5 08:43:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 592351 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id C0C53140180 for ; Sat, 5 Mar 2016 21:42:44 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=iIaUG4Oj; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 20FBEA768C; Sat, 5 Mar 2016 11:42:38 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lUWyL11L-YVp; Sat, 5 Mar 2016 11:42:38 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D3519A768E; Sat, 5 Mar 2016 11:42:33 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 92F6FA7680 for ; Sat, 5 Mar 2016 09:43:31 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lxs3RXjs_pDC for ; Sat, 5 Mar 2016 09:43:31 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f66.google.com (mail-pa0-f66.google.com [209.85.220.66]) by theia.denx.de (Postfix) with ESMTPS id 1DCC6A748F for ; Sat, 5 Mar 2016 09:43:28 +0100 (CET) Received: by mail-pa0-f66.google.com with SMTP id fl4so4279896pad.2 for ; Sat, 05 Mar 2016 00:43:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=C+2T18WNpdiR9ZW2KRlaH0Py+wRaLI4vwjk8Y3sVXj0=; b=iIaUG4OjygUzvaEsKeVydz09v9SlyToHSnW215Z0tLQpvxipIyLM4EBgu7GZCVTQ1/ dMztIF6IiEkWmwtnpNaTBPlDAJuykSwK54kmerZn2D+k0OanVgciimFZz1AxxLirGUmK HwdBtIwYeqtU3K2yJGOKTOq2WhJqqLBWFU2IWOylZjDMiThci70V/Z4YGdSzvh/oRmfd 7G7Mtkwa+b4sIDwht6ex8RXrdDbORUlNvXUdE1TcA6w41H235BbfS3LU+7iwTZA6IZjr x4N3kpDddUQ03gSYbmjPvRdKhSWu2QletKmpDCZZVScqdyE4VDrgW3C82ahvgTS/hJ92 3/pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=C+2T18WNpdiR9ZW2KRlaH0Py+wRaLI4vwjk8Y3sVXj0=; b=PO3Gh6dCR3j6UneHv6ksZkTbOFWwVjfMboyaAu8jof1dfuI7dNV/zDNlh8sQD46rCo JbRRC/IwZOSo7loZiNJ4l46WgsEu+f56HhJwkrvPlRNIGDD+lvCSCbMB4tchm8UcRY+J SIAaJWW+sPglItIUeLAKOU0ER7wCjwG8Qp5QIIVoTDuFvQjKfXHQcRVHn3HBOCwPpxHE 0qhektHXLz0nhg66lkYWNXgpXFUw/LP88qm0VPvkty6SK9WG9WT+ANjJ+/hTpbRNE7gO LxrDUUNjAvMxPcdnfTRD9PNWRHrP/cztVOEr/CMgYEPu5QS4MWONom/M4wnLcGAbyKTu jYJg== X-Gm-Message-State: AD7BkJJdGHVNtvcP3TTgk722Nzom3W3qrgPbhoEtI58ZkPad75IS3mTmeIRMHneJeIaCcQ== X-Received: by 10.67.23.202 with SMTP id ic10mr18055190pad.127.1457167406162; Sat, 05 Mar 2016 00:43:26 -0800 (PST) Received: from odroidxu4l.localdomain ([103.249.89.67]) by smtp.gmail.com with ESMTPSA id c9sm10645400pfd.90.2016.03.05.00.43.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 05 Mar 2016 00:43:25 -0800 (PST) From: Anand Moon To: Marek Vasut , Simon Glass , Sergey Temerkhanov , Radha Mohan Chintakuntla , Joe Hershberger , Ted Chen , Stephen Warren Date: Sat, 5 Mar 2016 19:13:13 +1030 Message-Id: <1457167393-2559-1-git-send-email-linux.amoon@gmail.com> X-Mailer: git-send-email 1.9.1 X-Mailman-Approved-At: Sat, 05 Mar 2016 11:42:28 +0100 Cc: u-boot@lists.denx.de Subject: [U-Boot] [U-BOOT.V2] usb: xhci: Fix vendor command error if the request X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Ted Chen From: Ted Chen type is USB_REQ_SET_ADDRESS or USB_REQ_SET_CONFIGURATION. To: marex@denx.de, swarren@nvidia.com, u-boot@lists.denx.de Cc: linux.amoon@gmail.com, Ted Chen Add a condition of set_address and set_configuration to check if the request is standardized. Signed-off-by: Ted Chen --- Resend this patch it some how got missed Changes since v1: None. Tested on Odroid XU4: with Ethernet USB3.0 RT8153-VB --- 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");