Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5288588ybl; Tue, 10 Dec 2019 03:40:10 -0800 (PST) X-Google-Smtp-Source: APXvYqwsiBtL6iYMw9rGq9MX+1hKYbYTR1R9Pd3xJvyvyVVgdEvTAA8+7FRuwoOQWGW8DqZH1Ofc X-Received: by 2002:aca:cf50:: with SMTP id f77mr3689896oig.60.1575978010760; Tue, 10 Dec 2019 03:40:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575978010; cv=none; d=google.com; s=arc-20160816; b=SZmyloc/9j4OtDFzHJ6EtZ+Fz9UDE16j4bZCwZVmv8g3Q/u2/nQwxSKCsX+yEQfJN2 abtNd/drT21ljadQv/gIZRh/UmH6Rt4pGHZ00nR6rbrBNqL6flNNxN5Ym/YUl6cj2jI7 /+qNdfpH8V17+1x2+rMSdCV12v0fa2/zh3BGQgrlnjpaRt4uSnFkHycXb5trhkZks0IK ynrXZlLrwBjT+0Kp3gLMOd9rdFh0GcdhHU8Jn14gB1uDJi8oopasK4fnkM6j0UoD/30o e5VeoKvEeDx2+187ARP0BbZOH+P3pt6Ioik7gHOjLlP14P9d6b3AS3jmmYoWYOVmnHMI TDPg== 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:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=paNqhFZXRyT6E8o7LJGyUT8QuWl+b8l39w8bSosKx14=; b=Oz8OovtdzaIrQd5J3QB4KCsrw0yefELIm4AvYnIbJdDUDHtgZj54Yfn87YIyjE66hv 6pD+pytuXBpeky5gzOXiVHnefIlSRi48yCWJgDDrEnjtrxp5/JEgQeMFyAfPH1qc0Nfh 4DLg7/9SFAilSd1jA00z0+VSLySA8MjalBY5YfJ2cNjco9VwchyOyBEmR0Taqq+0va1k Pye9gqDrwsq4l0DJqIg6/wXGR7wdd7xrH2OrQWYUrrG0sl6ObvVRqFWNv2c4BkJubimT sIkdbxS2A109C8acjfBmTxAFj77TaTKif2jLpN+AR5yjNhOj9pgv9Ekw0wNM/xC+M2hs 2FPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="SxP3aG/t"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u125si1723356oif.130.2019.12.10.03.39.57; Tue, 10 Dec 2019 03:40:10 -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=fail header.i=@gmail.com header.s=20161025 header.b="SxP3aG/t"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727494AbfLJLjD (ORCPT + 99 others); Tue, 10 Dec 2019 06:39:03 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45180 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727224AbfLJLjD (ORCPT ); Tue, 10 Dec 2019 06:39:03 -0500 Received: by mail-lf1-f66.google.com with SMTP id 203so13388149lfa.12; Tue, 10 Dec 2019 03:39:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=paNqhFZXRyT6E8o7LJGyUT8QuWl+b8l39w8bSosKx14=; b=SxP3aG/tYco+shyDZW0JDd7hC0NmrwFqKdXDdflrJT0VgS9+2aa9PPcSfkbv6SM1ly S1K9BGc0enhfrnyyXCN7xxa+EH8MWl1Y1yITChe8YrldAgCSfG99FnOQa1u1xP4Vlpw1 Uyg9OElyCQh8tJRVdWbcc+OYPMigbyHjsbX0IYduKgqQdUWSxUX1GCA9XgafG0sWHSDo 12Z+AU4TMbaGLRaUJ/fvH9XB4zSv+bVAloQNJBFxuEnPiHal/pqRsm0nvJ2+lyEMtf5J JgQnJ807b/jVr/8Dz7Nr10tb08FR9W+e20de2TDFLnB0ZSwkxE4TaGkyxjuqQokP8ULR Uwug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :date:message-id:mime-version; bh=paNqhFZXRyT6E8o7LJGyUT8QuWl+b8l39w8bSosKx14=; b=OMI1vaXtHDO8hhBBjPc4nApEc+1Y0WKw3Wg43vcTMhZ7r+KqUTS9yN7kLmtMMBiFSh JU+eNvX345uNznxviw2e7s3lHRQR4USOZZgpACcglqzT0R/KQrzAdtx0xZMNOkoSP9M7 TfVnvPTWqcNzA+xL5tRof0Xl7xm6Phxe4zQjaQaIkkRfbFojlJp2lKR4jBFLN9ZI2uX+ WUAajodwAx30RBLITKdaD2l7/w+ZhUWwHYV7Ag4QHnRfDwZR9NLOXmnvCeDAS8Y5jzLP DH07MjOiKpxfYPIbqBDvjd521YugHdAZDqvWl568gnztTXMv8IEEFd1Q2ikHmpk7y+Y4 xb+g== X-Gm-Message-State: APjAAAWRiK0cjI86CsBu90EQFGhuB41pyp0i8Vo/3aJwHpBveUwHJ5fR se8qWWF1YPyI79GGoBVViLEtIEu7X4g= X-Received: by 2002:a05:6512:21d:: with SMTP id a29mr11710124lfo.186.1575977940594; Tue, 10 Dec 2019 03:39:00 -0800 (PST) Received: from saruman (88-113-215-33.elisa-laajakaista.fi. [88.113.215.33]) by smtp.gmail.com with ESMTPSA id a19sm1929493ljd.90.2019.12.10.03.38.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2019 03:38:59 -0800 (PST) From: Felipe Balbi To: Martin Kepplinger , linux-usb@vger.kernel.org, gregkh@linuxfoundation.org Cc: kernel@puri.sm, linux-kernel@vger.kernel.org, p.zabel@pengutronix.de Subject: Re: suspend problem with dwc3 gadget / g_multi when usb disconnected In-Reply-To: <38edc05e-680b-d881-49fc-e8230a93b2c8@puri.sm> References: <38edc05e-680b-d881-49fc-e8230a93b2c8@puri.sm> Date: Tue, 10 Dec 2019 13:39:47 +0200 Message-ID: <87blsgl88s.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Martin Kepplinger writes: > I'm running today's linux-next with this defconfig on a librem 5 devkit: > > https://source.puri.sm/martin.kepplinger/linux-next/blob/next-20191205/li= brem5/arch/arm64/configs/librem5_defconfig > > So I want to have host and gadget mode (G_MULTI, most importantly a > serial ACM console), and I'm having trouble with S3 suspend: > > * The most interesting case here: When I boot with USB disconnected > (from the battery) I can't suspend or unload dwc3. After "echo mem > > /sys/power/state" I get nothing in the my logs except > > [ 18.107380] PM: suspend entry (deep) > > and the system hangs. similarly, I can't work around this by rmmod -f > dwc3. What can go wrong here? I don't know enough about usb hci and why > this shouldn't work. What can I do to help you here? > > * When I boot with USB connected, then unplug USB, I get: > > [ 19.289602] dwc3 38100000.usb: request 000000006a19695c was not > queued to ep3in please capture ftrace logs from dwc3. We have documentation for this: https://www.kernel.org/doc/html/latest/driver-api/usb/dwc3.html (note to self: update email address :-) > and then try to suspend: > > root@pureos:/home/purism# echo mem > /sys/power/state > [ 37.863066] xhci-hcd xhci-hcd.0.auto: xHCI host controller not > responding, assume dead > [ 37.871345] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up > [ 37.877260] PM: dpm_run_callback(): platform_pm_suspend+0x0/0x78 > returns -22 > [ 37.884626] PM: Device xhci-hcd.0.auto failed to suspend async: error = -22 > [ 37.891728] PM: Some devices failed to suspend, or early wake event > detected > bash: echo: write error: Invalid argument > > > * When I keep USB connected, the behaviour is similar actually, but > rmmod works (but that use-case is not that interesting to me). > > > Since my experience with USB drivers is limited, I'm glad to hear about > any of your experience with dwc3- or more general gadget-problems with > suspend and that or a similar configuration. > > Without G_MULTI and dwc3 host-only, suspend works btw. And all the above > is basically identical on previous stable kernels too. Have you tried any other gadget drivers or just g-multi? Care to try with something simple like g-zero? cheers =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAl3vhAMACgkQzL64meEa mQYPVQ/+KolGBV6DSxWa+ZuofyRKG3rnfK7xflYuCxqLBrMW7gTOyWmm5DnzKVtv f9KusJuNOQbNEDwT0qFhIDYbiBAO3yPHeOqhXwWN9Hmj3SdtEeD0MVXY/PgQLX0Y OBDyNrOUsC4MWf60kaghPJXnUJBTaUTJFVkTWPKJ3b/m+ZrSn7R+L1BJKApTSpZg ByHB+IM04svwQXQst59g3p03rHg01YI9V7lJMPbmHVhykXjY0Hal9u8b7q+EjoCc lH886XMe25FvS6JuZYnns4Cu58LjtVCYEU5XVbE+K8liJLm5JYCtyJTPXeIv7Fzd jROhaDW1LYDjsUpb+9XZS4AW09RaqOK6NkPbxwfq1i0B/8j15ofzTF2mb1buNCw2 tV8guoiXgCsiA6Lwk2PNh69joqMotLLqzjPnmOt/iDtCAR2JNr3ppLHxb1OlUQFo oCMDePQYbZ2gJlHnJADLD3vZjmIeol0fM9d4WQIUURfanrOwan6kuo8c18gZGQYW rdJIWPE/E4PZ1oq4147Hv/Ar8xK0UAeSCmSLG1cm6E+XZfZXqJ0Tuti7ybs8LzDk 5Db9PCKjp15mN+D+EukKCTQXfV2OwQ4EVJN1NkS+BlEz5cYy2JlF+awRYMDDwcOU jvTy3fgS+mOWIglfIuH8YhScSTm+2GpOl8PB0+6ECNpQMEbpmXg= =69+K -----END PGP SIGNATURE----- --=-=-=--