Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755224AbbLAKxg (ORCPT ); Tue, 1 Dec 2015 05:53:36 -0500 Received: from mail-bl2on0123.outbound.protection.outlook.com ([65.55.169.123]:54791 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750760AbbLAKxe (ORCPT ); Tue, 1 Dec 2015 05:53:34 -0500 Authentication-Results: spf=permerror (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=freescale.com; Date: Tue, 1 Dec 2015 18:50:06 +0800 From: Li Jun To: Felipe Balbi CC: Peter Chen , Nathan Sullivan , , , Subject: Re: [PATCH V4] usb: remove unnecessary CONFIG_PM dependency from USB_OTG Message-ID: <20151201104932.GA23133@shlinux2> References: <1446126743-31892-1-git-send-email-nathan.sullivan@ni.com> <8737wnnq3c.fsf@saruman.tx.rr.com> <20151104030056.GA20460@shlinux2> <87r3k6mngw.fsf@saruman.tx.rr.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <87r3k6mngw.fsf@saruman.tx.rr.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11OLC011;1:edCJ8bp8QbiQD58PcxLZs9u5U8IOZsOumIWMnO4S9Qk+E+XL/qdKHDQ+KdssacuZ1mZ/ifvcZ3e7o+ntGGYqkliA3tio9s0gQHRmrbNIvX8npSZIYixzYiSxQk0AzxPeNA+pYfOuqXcS40iSEmhb6IbKbLlPa8mGtzNlu3/5uAmFHJYdIFiQSXCgwKQv1LcjGqyn9nHi6qVr1jS+/Ihmt+GUDPmDzHIe5W6ZJk3OF2rfCLDjYehNEmEFY0MV/l785P+/LfcMugWTyWxjRJ3hNMNFWqIOYH8MrQmwOwLtyAjemDX5VC6Hq+TPjZPd9jMnLBNRq76gLBwk9LqFNuR/Z4oW7ELPRv7P9XATPCNcoeVfriqqK3ky8hS+Yirmj47uyBlhRBhg7jAg88hi/MnYf4O+WnL4Ppbs2P47kDha1UM= X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(448002)(24454002)(189002)(199003)(97736004)(47776003)(104016004)(5008740100001)(1220700001)(1096002)(50466002)(11100500001)(19580405001)(69596002)(6806005)(50986999)(19580395003)(1076002)(5001960100002)(23726003)(189998001)(46406003)(110136002)(97756001)(77096005)(586003)(87936001)(93886004)(54356999)(2950100001)(92566002)(76176999)(33716001)(33656002)(85326001)(83506001)(106466001)(4001350100001)(81156007);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0301MB0857;H:az84smr01.freescale.net;FPR:;SPF:PermError;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB0857;2:Ahmu4XZCoXMOHRVlh0LevBXdwLFBeHV7aL+Cs8gcfs4XCM1v9ighG48FgjsaQ5QA+A0pVYJdaiqhMTbBEojwestQjSp+JR/y6g9iISWeoMz9bHFihMANPsSUBq9v2sBOsAC54Me67n7w/MKdQl+Unw==;3:Y0Msiyx+icKF67kPyu1Tbal9a7MsRtPvxPSPyusJcNx8gKl9E5+f245uAjeI8TqfZXb3iMhzMUb7jA89/U3O7JejZ3Sp9GYlMoLMNn1g81FqOU51MbUzeeKglKBv6XGd8Pn2LmXbqHfu5vJARc07SW2IYpSNIP45COAnvYP7fWOtorhYs8CdDjbUFcPJTl2YRCrETGG+F+V8A9Gv0h5CjOkH+4+MIxZSX2wd2QpgQGM=;25:X8Ixsk/BmxVy6ud4en8oH4UbuBW2Z5QGGXiTbxh1+HhAcstH1HxeetC+7BEdeO5jQlckhncZstgAuyKoiiy5co5KAcC8OraDZREh8VLtj8PcZ5FLkn2KF90vVMtAiDJ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-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(101931422205132); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(10201501046)(3002001);SRVR:CY1PR0301MB0857;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB0857; X-Forefront-PRVS: 07778E4001 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR0301MB0857;23:G3+ChFxGfvFLW4sIB+dUo22h32tQkED0pZfr0j7?= =?us-ascii?Q?hw/y8uZUjWHSKbMNfSXi1FkTPEk8Wdd4MCEnQapjT5CX6J4ADI6Wqty20Kmx?= =?us-ascii?Q?RTWIhc3m/fVs2ZKJEO2MBvTxjgtO8IFpHl8W8cAGIe9elGOvL/bTxfHE9e/U?= =?us-ascii?Q?JBK8o5YjoO5e4trC1SYlWgcVFaWKK/YU9Rk7QB0eedhzOzW5JvAIUpIRW1js?= =?us-ascii?Q?Wj7d23t5d72viskuKyW/XuBSmwuz3eU7jgqV+WhDbo2Pa/Zp2uQAJ6QJWlHD?= =?us-ascii?Q?BCkWukQEQJ7cAm+wlx8ld+q6h3szWmoPR3Qsk11E77x25rwhcvBRpgxeweF7?= =?us-ascii?Q?7NL+mlZtBjeIMNykHNLcn15WEMKU9H0PS6++/Z5D9trHTCaliQh1NKJ0PkZT?= =?us-ascii?Q?resC1oU8PhYm79z6d+xQ/3j4Zf2a05IsAo5R+ub2WTo8XP+pI1SHeVmh8Aqw?= =?us-ascii?Q?opSqa702neoIonq81sQ+dA8Ve1rx+ycoY6rzd87vHijLGfdPthCXAR2jfEpV?= =?us-ascii?Q?UgpDRot862AU2nWqVlAywjF4tGDp4S9ZyoelIRKUHpD8T2nqNdzvdEoNOP77?= =?us-ascii?Q?st1hgw3Rqa+Fdcolfp/siUChXXxugoRjFi6KdNe+I9XSzLNEdQdMoHc6fbqT?= =?us-ascii?Q?tvKXq6gAn37S5U8aMaGFZoLk8FFVq14pdfKXqmXtTAHWa3vZRp31QCW/kE98?= =?us-ascii?Q?K1XdY+sZrgwd6WOjlNmaFP9oL+KEMqgUZJHZCBxzrE6/+nF1BsE0iEF2GwxL?= =?us-ascii?Q?CubdG1tsLbIGwMleiw6gNqjv/zXL6MkIdAJHRmQeOAjxqu1+aVakAvO8+9R4?= =?us-ascii?Q?0AL6kN0IfvkhKH7kZvVaqIvJqQz2QqUvFpMvISz7iyWTj1m0GAkYJuJLNoJg?= =?us-ascii?Q?Tldju7FzUQOV6tzy3Gpdwm9YxVc3iTdBlC3jmi/Ohexx6940LadV6ydFsRsM?= =?us-ascii?Q?REv+CcCvQBdjy+zufDyveAAcmNoQUYENYUFWYnrZni2b9qup4fzIMj/B8oJG?= =?us-ascii?Q?4cgIInSVJTTWNLkjafQHyJe/GKL/MUSLbQKoN/TOk8LS4DDXwgMXgdpuoDrY?= =?us-ascii?Q?aGvqz37hwxDok6RfndKMgdANwXaUY?= X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB0857;5:alt5BfVSy0mUzhUK2TiikfNG0iUjktXVvJkC5blzOZw3+jus6RChgNt6mANm1k46iD7mHLRQMavjedEKyRzTtgEkeEixJrMNKmLc+mqEYNYId4gwVcCpdmbam1OS33iwhpsAd+If1QV7J2MC4L48HA==;24:44Dkf3/N3ide0mNASLEhuesK6eU38SFvkQZit+pkFTWKiKtvJl8T+7xB/fPG5lNUlrvyVz2hVO4k49C+ctFqbHXjl41Urgdngfc/2xLga18= X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2015 10:53:31.4723 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB0857 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2897 Lines: 81 On Tue, Nov 03, 2015 at 09:51:11PM -0600, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > > On Tue, Nov 03, 2015 at 07:56:55AM -0600, Felipe Balbi wrote: > >> > >> Hi, > >> > >> 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 > >> > > >> > config USB_OTG > >> > bool "OTG support" > >> > - depends on PM > >> > >> 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 ? > >> > > > > 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 > > 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. > Hi Felipe I am going to fix this as you suggested, for those interface drivers which do not support autosuspend, should we - Fix its driver by enable autosuspend and adding suspend()&resume()? or - Unbind its interface before autosuspend the usb device? thanks Li Jun > cheers > > -- > balbi -- 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/