Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754994AbbKDDvT (ORCPT ); Tue, 3 Nov 2015 22:51:19 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:49834 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754792AbbKDDvS (ORCPT ); Tue, 3 Nov 2015 22:51:18 -0500 From: Felipe Balbi To: Peter Chen CC: Nathan Sullivan , , , Subject: Re: [PATCH V4] usb: remove unnecessary CONFIG_PM dependency from USB_OTG In-Reply-To: <20151104030056.GA20460@shlinux2> References: <1446126743-31892-1-git-send-email-nathan.sullivan@ni.com> <8737wnnq3c.fsf@saruman.tx.rr.com> <20151104030056.GA20460@shlinux2> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Tue, 3 Nov 2015 21:51:11 -0600 Message-ID: <87r3k6mngw.fsf@saruman.tx.rr.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3432 Lines: 93 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Peter Chen writes: > On Tue, Nov 03, 2015 at 07:56:55AM -0600, Felipe Balbi wrote: >>=20 >> Hi, >>=20 >> Nathan Sullivan writes: >> > The USB OTG support currently depends on power management >> > (CONFIG_PM) being enabled, but does not actually need it enabled. >> > Remove this dependency. >> > >> > Tested on Bay Trail hardware with dwc3 USB. >> > >> > Signed-off-by: Nathan Sullivan >> > --- >> > drivers/usb/core/Kconfig | 1 - >> > 1 file changed, 1 deletion(-) >> > >> > diff --git a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig >> > index a99c89e..9c5cdf3 100644 >> > --- a/drivers/usb/core/Kconfig >> > +++ b/drivers/usb/core/Kconfig >> > @@ -43,7 +43,6 @@ config USB_DYNAMIC_MINORS >> >=20=20 >> > config USB_OTG >> > bool "OTG support" >> > - depends on PM >>=20 >> I don't think this is correct. OTG depends on USB bus suspend, which is >> only available on PM builds. Care to further detail why you think PM is >> not needed on OTG ? >>=20 > > OTG depends on USB bus suspend is not a must, the hardware controlled OTG > design do HNP when the bus goes to suspend; but if the software > implements OTG FSM, it is the user option whether do HNP, and bus > suspend is controlled by OTG FSM software (stop SOF), but not by host=20 > stack (eg, ehci). > > I am sorry I did not consider the legacy OTG design, this patch should > be dropped. there is no "legacy" OTG design. OTG requires a bus suspend to enter HNP, and that's achieved by stopping all transfers and avoid new URB submission so usbcore can put the bus in suspend (by means of USB autosuspend). If you're bypassing that in the OTG FSM thing, that needs to be fixed ASAP as that makes it a lot harder for any generic changes in usbcore to be validated. Specially when you consider not many will have whatever special HW which, likely, doesn't even work with mainline to validate a change. Please, make sure to fix that design so that HNP *always* goes through the proper code path. If you have devices which would prevent HNP because their class driver (host side driver) would never autosuspend, fix that as well. cheers =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWOYCwAAoJEIaOsuA1yqREQVoP/RwOMPmv67X+X8/L/QpwCHKi Hu8Z/nSnOrmWNhEXUS9c46FtK5EWVgIrH4anxjgrxp7yjsc0FHvi9C90H5A3HN9W Cioajy/XEGXZUGMyYMbt20QehejXfoeVNpvoBC76ZlRKOMmzw4F+MQ1FyDW8BeMB ZRNt6BmTOV0TF/wOBXjVfq1AJEoc8254kcjb25A2fVhI2esSOoL1qUV3+miJquwC AVCElxiujZqAzMbZPOtemycNY+4iMa/PfzTcRIEIzT38EaSh6WgklzukASn3N38r ghLTY+bQrJ2imMoEtNXBSJCk6b192tgenmXMTM1T+MunYPSOXU1U8nzoGfiXwh7p mS9Oh5eTJ7z7NsHwc1I6XDtE4WxXyNJAgqhDJRUmjoANsbM8ufnnXXLZ/FFVDt48 zFRXYbtl8F6qYm3VSuf5EOd4KPmLVrj7o8ZBvlfMMeKT77KBs+QLUaAaJpOJsDWx 1y2dGGhziG5FApQ7KHVEMPiQf1DILpesw7PscKA1vLDwehIKtfhbBjdeYW6ZWt2F qLZb2jZhEyISiBgBQnDpVr9BwIyVyxTsetmEqHBQBS/Ev0Y+qR3USEsTNDE8G/YZ 5AuqhBN+e+z5Uojvks+1ifB94YpRXvlpXD1tcJ0vQr1cZfznLjTzDQoMdRIbLlED sUYy+Nmr41szTfNwVXy0 =5JZx -----END PGP SIGNATURE----- --=-=-=-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/