From patchwork Mon Aug 26 13:10:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 172168 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp4326635ily; Mon, 26 Aug 2019 06:11:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/jnbmFnaNIiaQYIhYOaZ2tufjVux5muYUgAqDNkUs5zmLKmRT4GJM94CFdvt3Mtl1IGMP X-Received: by 2002:a17:902:f217:: with SMTP id gn23mr18746742plb.21.1566825072773; Mon, 26 Aug 2019 06:11:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566825072; cv=none; d=google.com; s=arc-20160816; b=BLrtElIfQArxvgJjTLzKrDA5OZn/zhBzQ0dsI40/0flOW2XOL2HfD/++l7yjekuZGH NqEO+9BeT3tkIy+hm/OqIlPtJw/vf672gg/Mzi4v151pZly/wSh4Pwdv3JkAVs9pc5tv VqalPzPKDhlAkgqEoYvRcNeqFNUHpYjvhRdl1sO0iietopoRokegAv5T/OMK0PXVJlPI sAQn3dLBX8txcvCW42HzLT9LW6YMea3eASHJbWs+JtE+Tq/udBZfuekzgS/P+9ugEzKd 1SB2LhHcerXrMGR/P5akQBcXmAR3sfsQn4Vkyz1aiUXIganNFopXgLewuLMMkh/Wy3f2 0ENA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=RFJRbu+lxvwQh27lC/rFrMFalHNlwSB8srZD2/w+1pQ=; b=VoNzE9/tZ2+fSjq32UFV5NPze129zSnEaG2NHD4x5Rb+tpQmvg2Upweq0rjA0/rs8E CkJU9Yz0jiZeb/E3wyjElDZTJKsnV/g8tYbF33nhQ/x5u7+F8Po58x/BaUKG3jGWutLQ ccnxPcSR3UvTRN90gQnkGz4yqkvtFFIn9PtdRH7oF95aNZqr0+gEyzaPR8LYvRvz8SoV gxu73Fwd9EsATu2DHyw/ieslq/mqaY1ATMJbxmgM2BqgjWHUFaOoDRARj2kTSjyIqzMW A61QsA0YkA0P5uNRnOyzA4edXamITOKMzZ0TSV2QWyWBB2PjUT8sZ3xixdyyP9Wji8D8 Jfaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="el/xIRmM"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 37si9095809pgz.39.2019.08.26.06.11.12; Mon, 26 Aug 2019 06:11:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="el/xIRmM"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732201AbfHZNLL (ORCPT + 28 others); Mon, 26 Aug 2019 09:11:11 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:36274 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731526AbfHZNLK (ORCPT ); Mon, 26 Aug 2019 09:11:10 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x7QDB31c068390; Mon, 26 Aug 2019 08:11:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1566825063; bh=RFJRbu+lxvwQh27lC/rFrMFalHNlwSB8srZD2/w+1pQ=; h=From:To:CC:Subject:Date; b=el/xIRmMPOU9+sL7bDO5L85iz4ZwR6PFox0Js0EehNAkDd5VF6MF8tI5kZSAtGWGW ppPy1ximQvJn2F6QjIjQxLF2WmbFEC76YDZ0fDaeoaZHyhaUHLBciNomQ+SlSyaZgJ LwyXi9fxBb1gRliYeFTCCGJMqwrXOp5osgvuYZrg= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x7QDB2Vk075712 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 26 Aug 2019 08:11:03 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 26 Aug 2019 08:11:01 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 26 Aug 2019 08:11:01 -0500 Received: from lta0400828a.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x7QDAx7T084458; Mon, 26 Aug 2019 08:11:00 -0500 From: Roger Quadros To: CC: , , , , Roger Quadros Subject: [PATCH] usb: dwc3: don't set gadget->is_otg flag Date: Mon, 26 Aug 2019 16:10:58 +0300 Message-ID: <20190826131058.17393-1-rogerq@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 6a4290cc28be1 ("usb: dwc3: gadget: set the OTG flag in dwc3 gadget driver.") We don't yet support any of the OTG mechanisms (HNP/SRP/ADP) and are not setting gadget->otg_caps, so don't set gadget->is_otg flag. If we do then we end up publishing a OTG1.0 descriptor in the gadget descriptor which causes device enumeration to fail if we are connected to a host with CONFIG_USB_OTG enabled. Host side log without this patch [ 96.720453] usb 1-1: new high-speed USB device number 2 using xhci-hcd [ 96.901391] usb 1-1: Dual-Role OTG device on non-HNP port [ 96.907552] usb 1-1: set a_alt_hnp_support failed: -32 [ 97.060447] usb 1-1: new high-speed USB device number 3 using xhci-hcd [ 97.241378] usb 1-1: Dual-Role OTG device on non-HNP port [ 97.247536] usb 1-1: set a_alt_hnp_support failed: -32 [ 97.253606] usb usb1-port1: attempt power cycle [ 97.960449] usb 1-1: new high-speed USB device number 4 using xhci-hcd [ 98.141383] usb 1-1: Dual-Role OTG device on non-HNP port [ 98.147540] usb 1-1: set a_alt_hnp_support failed: -32 [ 98.300453] usb 1-1: new high-speed USB device number 5 using xhci-hcd [ 98.481391] usb 1-1: Dual-Role OTG device on non-HNP port [ 98.487545] usb 1-1: set a_alt_hnp_support failed: -32 [ 98.493532] usb usb1-port1: unable to enumerate USB device Signed-off-by: Roger Quadros --- drivers/usb/dwc3/gadget.c | 1 - 1 file changed, 1 deletion(-) -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 173f5329d3d9..48213421e9e9 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -3318,7 +3318,6 @@ int dwc3_gadget_init(struct dwc3 *dwc) dwc->gadget.speed = USB_SPEED_UNKNOWN; dwc->gadget.sg_supported = true; dwc->gadget.name = "dwc3-gadget"; - dwc->gadget.is_otg = dwc->dr_mode == USB_DR_MODE_OTG; dwc->gadget.lpm_capable = true; /*