Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2861499imu; Sun, 9 Dec 2018 11:04:08 -0800 (PST) X-Google-Smtp-Source: AFSGD/Uq1mAqEVVzUqBVjEU7+5EBQIgYw3iGviHS5z0uxQNHy1c0O4b191uR/aIQWA70Iq2ABpVF X-Received: by 2002:a17:902:1102:: with SMTP id d2mr9491054pla.138.1544382248551; Sun, 09 Dec 2018 11:04:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544382248; cv=none; d=google.com; s=arc-20160816; b=ucBFmV8y18+VUJI4exfod8/VggcUrENVtGMJYlUGkmMg4sIiDqMeyYVF+cPZd5bTr8 PDCBpuG5nvxBKXYpS4zhaJy1lnbcFT3TKsDpOO7INVzSoyLzANZXVDOwQ2aV+1WERDea n4jiFslSyl8A/149S3HmXC0kOTWNWmNF7e9U+0sLamBFoITfV0kA09Mo7chmTamQ+W/D 2eSmAUyZRdDazhaoDqvhSuJ0wWlY4K69D/D7UaXuXhsGylDeFuNBrRGflU7TxA08IC5J vebNSWl4Wg5+kDLPGmiw1j3Z4iOAmyi3JUVo0CxlL7+6sNkHzC9dJvOpmoW3s8fw8/f8 sUzQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OKSka/+/cVpRHh/4vbzTPbz+qQ+/vVf1kkbTmUZ6zvo=; b=J5AeweLGmz0wXN/Ks58cMNFcltCfMROxqNyk3V1TA/rMW3X+Se5G9r43glkZF2TEN0 8G0NZyCUHgVniKvHcMDVRjyCUhW5bkKbdzTV51uXmhUad6TLuuLGqcx/dSjMaN9t3g52 IReJv6EvFTLcyZeB34LkNtLwLpuxrHGq3nUoRTHCmnQRMXAMj/22cAU9f0Gwak0Pk4ap lhMox/w8b/cumpPPk2O9sv0bQPphgX4GflzPyIaFHx5wSxkqmqqFAoNCWm18H7dxx4I5 LZUmI8B3+JXx5RhnTN8Lun6AyoeQyLig/uv3DclV+zqzQKUVxndf5odoMxkCXFYElTRd 1W7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=CHw6CpTP; 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=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x128si9081538pfb.128.2018.12.09.11.03.53; Sun, 09 Dec 2018 11:04:08 -0800 (PST) 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=@googlemail.com header.s=20161025 header.b=CHw6CpTP; 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=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726290AbeLITBv (ORCPT + 99 others); Sun, 9 Dec 2018 14:01:51 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:52712 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726088AbeLITBt (ORCPT ); Sun, 9 Dec 2018 14:01:49 -0500 Received: by mail-wm1-f65.google.com with SMTP id r11-v6so8791640wmb.2; Sun, 09 Dec 2018 11:01:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OKSka/+/cVpRHh/4vbzTPbz+qQ+/vVf1kkbTmUZ6zvo=; b=CHw6CpTPHF19FzbrESn/kQOq6RBZjBX2S9LWGTvd4Jy5/8hOTLvK5HaSUSsTjyX1xs LGrSGfuk+YX1siefrZpEO2MfetpTNMBJPehrBu1bYDwZk6z7xwYUAwJpXYhqIFYXycZ2 mfp5AmwylQj3T79OqV0CnFOGUrte4hj3bZCwmJ4TUren8ZJEeIWaD3JVr0UFENi74RtA 28bdnI92HVtRQCuAoYYWN2r9D9dbuxJHM5Ca4uwhxwiGRhjT+RsBdIXFBn3GW/fXz8eQ Si9R+aUBbSZdgu+jIvtCMfGJ53rIeSF7CzDuNBxg0I5a1IE4pWpHFPSC3MsEi8gfLWHe Ak+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OKSka/+/cVpRHh/4vbzTPbz+qQ+/vVf1kkbTmUZ6zvo=; b=B0PXIeYjemZwSGl4mMmVZTpC4mcCyEdOFWQM1GiAYB+361xR3WzsP1JoRvQQkL5+Ug TcotRwxVItoHcs7yGs2FCc2YGN/yRVM0XUpKx+80/JjBHGVDmDLpc4vF8FWj0U7Wbtr+ DufCuFqijCSz9BuExHboXahgABQHperMZsXR9oxn6jLL2O9Wp+02r5ji/Z0+ZsJnjwa1 bjuI+nph6X2nwsSA+uG/K5bZ0kEnGyJJW5mguytucxmq+jJ0TQNkfacdsUEP6X05O6+S uouk/6xYnqujnWqeRSW/RQnbLxrWRCc2BQzfzUuJy/26AC2yfupfWXLLtqoCbNTm7g8h 9Okg== X-Gm-Message-State: AA+aEWZGOX959fPea8lh7arz6YywgdhrumBVak4MZM8axvEqdOn8bfVs wqYo5LRay+BHQ33MXfQUwP1M0fk/ X-Received: by 2002:a1c:c64e:: with SMTP id w75mr8724696wmf.46.1544382106224; Sun, 09 Dec 2018 11:01:46 -0800 (PST) Received: from blackbox.darklights.net (p200300DCD73FBA00428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:dc:d73f:ba00:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id l197sm30560215wma.44.2018.12.09.11.01.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Dec 2018 11:01:45 -0800 (PST) From: Martin Blumenstingl To: linux-usb@vger.kernel.org, hminas@synopsys.com, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, Arthur.Petrosyan@synopsys.com, christianshewitt@gmail.com, Martin Blumenstingl , stable@vger.kernel.org Subject: [PATCH 1/1] usb: dwc2: disable power_down on Amlogic devices Date: Sun, 9 Dec 2018 20:01:29 +0100 Message-Id: <20181209190129.11870-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181209190129.11870-1-martin.blumenstingl@googlemail.com> References: <20181209190129.11870-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Disable power_down by setting the parameter to DWC2_POWER_DOWN_PARAM_NONE. This fixes a problem on various Amlogic Meson SoCs where USB devices are only recognized when plugged in before booting Linux. A hot-plugged USB device was not detected even though the device got power (my USB thumb drive for example has an LED which lit up). A similar fix was implemented for Rockchip SoCs in commit c216765d3a1def ("usb: dwc2: disable power_down on rockchip devices"). That commit suggests that a change in the dwc2 driver is the cause because the default value for the "hibernate" parameter (which then got renamed to "power_down" to support other modes) was changed in the v4.17 merge window with: commit 6d23ee9caa6790 ("Merge tag 'usb-for-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-testing"). Cc: # 4.19 Suggested-by: Christian Hewitt Signed-off-by: Martin Blumenstingl --- drivers/usb/dwc2/params.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 7c1b6938f212..38c813b1d203 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -111,6 +111,7 @@ static void dwc2_set_amlogic_params(struct dwc2_hsotg *hsotg) p->phy_type = DWC2_PHY_TYPE_PARAM_UTMI; p->ahbcfg = GAHBCFG_HBSTLEN_INCR8 << GAHBCFG_HBSTLEN_SHIFT; + p->power_down = DWC2_POWER_DOWN_PARAM_NONE; } static void dwc2_set_amcc_params(struct dwc2_hsotg *hsotg) -- 2.19.2