Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1000132yba; Thu, 4 Apr 2019 02:07:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxQTptdGceCMRe5uznx+lpzlzZN8osGA09CKxi6aNU+STGyMxa2w9FS8qfxdn85nnFhdNZg X-Received: by 2002:a17:902:380c:: with SMTP id l12mr4985025plc.238.1554368826477; Thu, 04 Apr 2019 02:07:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554368826; cv=none; d=google.com; s=arc-20160816; b=pDeiQlH3R4EvXz+xOY7F/Bf5kSqRo5XKiOXHkn/EWSl+BXiSgJ+8MmhGsB37vA3X0T HjSIaqKFq2KBATi3kEfd5cOd7kqsfSN4tnsmS7Gek86L1MIOmpjO0Svb5mdviol2320g lSr+DTEZ0GFcl5PcBJLL1BWe9NInWHh5jh8n3j4f/E/ZhI00MiViC34jAC+ln9hYryqn /Zw72tzM5O7sD1aKKNI8X1yjy9R66nQXcAOZUa/VfoFsvSIhZ6KhDys/FH6SXk9S+cr7 0Pw2WcNjLhFCUV1+EWaLYWSAl6Xgnxi/bBP515e27Q2sohYrwpL2oFlDfM0Ux2J78x4s RCkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SR30KwiX23FWgy/cODZnp/734OjUFfVNl5KnNNRiHb0=; b=kmSA+qgMKWpzr3ZuNwF2Vgi5PxzmW8X4Wq2kvxb+wdsrvjEwq+X5ICQJZ+ArCb3Mt8 Xurvtc3TLAN/c8YUGbHL2SJw1MlR5OxUaEeJb5cIrzbwQlbpKv+6xPFfpnKPi87ppH4s JN5HmS8Rn4ESwv8jCEsng5vSDTVPN2M6+0UcrFSgRwXqlA4L+XUhZeUpgN+LjSToPbOP wF72Ha0Pp9ENetFWGuA4DGJID9qp/GKrctMk2gieiVTEltycnQfO2xDBUZYvr/DqLTDU 9YpFSCGm6oc7gKzsk4ZCdxTdBn1gluVqazGAa9oJa75Qed6C0yCCh2qdDCNOPMNkNdyj X85w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LRehPuGm; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f65si16274806pff.195.2019.04.04.02.06.51; Thu, 04 Apr 2019 02:07:06 -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=@kernel.org header.s=default header.b=LRehPuGm; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732188AbfDDJFm (ORCPT + 99 others); Thu, 4 Apr 2019 05:05:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:43840 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731960AbfDDJFk (ORCPT ); Thu, 4 Apr 2019 05:05:40 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DEAA121855; Thu, 4 Apr 2019 09:05:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368739; bh=Q2h3aC1LFV/OMNug+ftgeLvbBsBaCBSDPMKm3wseYm4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LRehPuGmVntDiHHyJqyejcLLIPYX8jyhay/5YXTVNsXvXDQrf/2jrH+wrWGWpAzv5 /OqLzC8t7wxiwykJxuogFRZ19eNjCHa5GyaUDx1PM8QfUHtlVZsyFTm/fvRp8joj8u Iyb31wJjnF4kS1tkO4tKW3DE9+Zh2vO01FejENjA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Roger Quadros , Sekhar Nori , Felipe Balbi , Sasha Levin Subject: [PATCH 4.19 152/187] usb: dwc3: gadget: Fix OTG events when gadget driver isnt loaded Date: Thu, 4 Apr 2019 10:48:09 +0200 Message-Id: <20190404084610.283046710@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084603.119654039@linuxfoundation.org> References: <20190404084603.119654039@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 169e3b68cadb5775daca009ced4faf01ffd97dcf ] On v3.10a in dual-role mode, if port is in device mode and gadget driver isn't loaded, the OTG event interrupts don't come through. It seems that if the core is configured to be OTG2.0 only, then we can't leave the DCFG.DEVSPD at Super-speed (default) if we expect OTG to work properly. It must be set to High-speed. Fix this issue by configuring DCFG.DEVSPD to the supported maximum speed at gadget init. Device tree still needs to provide correct supported maximum speed for this to work. This issue wasn't present on v2.40a but is seen on v3.10a. It doesn't cause any side effects on v2.40a. Signed-off-by: Roger Quadros Signed-off-by: Sekhar Nori Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin --- drivers/usb/dwc3/gadget.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 700fb626ad03..524104eed8a7 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -3233,6 +3233,8 @@ int dwc3_gadget_init(struct dwc3 *dwc) goto err4; } + dwc3_gadget_set_speed(&dwc->gadget, dwc->maximum_speed); + return 0; err4: -- 2.19.1