Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754151AbbHJPgD (ORCPT ); Mon, 10 Aug 2015 11:36:03 -0400 Received: from mail-by2on0107.outbound.protection.outlook.com ([207.46.100.107]:33792 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751846AbbHJPf6 convert rfc822-to-8bit (ORCPT ); Mon, 10 Aug 2015 11:35:58 -0400 X-Greylist: delayed 22365 seconds by postgrey-1.27 at vger.kernel.org; Mon, 10 Aug 2015 11:35:57 EDT From: Ramneek Mehresh To: Alan Stern CC: "linux-kernel@vger.kernel.org" , "balbi@ti.com" , "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , Li Leo Subject: RE: [PATCH 3/8][v2]usb:fsl:otg: Add support to add/remove usb host driver Thread-Topic: [PATCH 3/8][v2]usb:fsl:otg: Add support to add/remove usb host driver Thread-Index: AQHQvvR6ysWYVpVYJU+lfkTENAcEOp4BIr6AgAO57aCAAJuEgIAADjNg Date: Mon, 10 Aug 2015 15:35:54 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=ramneek.mehresh@freescale.com; x-originating-ip: [192.88.169.1] x-microsoft-exchange-diagnostics: 1;DM2PR0301MB0736;5:ZHVhSudqz1x5pnrs3TQiyEx3qJ2wScjrrllgjsCfsg/x8pT4XJzcmwPi1yHm2Z9aB5Pu5+i53fY1EQfbRoLn745TdynsGnsR0QtTiU9fQTvodlMjCr2ESXvTbpxpKt9bnhkJSl9cX0YNG6EhlSHzuA==;24:9euky65fcVOyR1ek/1BVaP5GpzRPGVDTfyrzJY4Qsneifl09CXWCnlZ8HANQTPXA4RUF00VcKyNONa0/ai8V3yXDWVm61Ex3uqX5DMdp0j8=;20:aKo7ukpn1UykN+ukvt4EB4stI9KBrUUve8vIpcC9Au/uwRYFshTqkazDzPW1taahBjB+p8fgIm9gH/bEzU3J7g== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0736; dm2pr0301mb0736: X-MS-Exchange-Organization-RulesExecuted x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:DM2PR0301MB0736;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0736; x-forefront-prvs: 06640999CA x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(13464003)(24454002)(189002)(377454003)(199003)(87936001)(86362001)(102836002)(76176999)(5001860100001)(54356999)(76576001)(189998001)(64706001)(2900100001)(10400500002)(77156002)(74316001)(99286002)(105586002)(2950100001)(5003600100002)(122556002)(62966003)(106356001)(40100003)(106116001)(5002640100001)(5001960100002)(4001540100001)(2171001)(46102003)(50986999)(33656002)(81156007)(110136002)(92566002)(68736005)(5001830100001)(2656002)(97736004)(101416001)(19580405001)(19580395003)(107886002)(77096005)(66066001)(4001430100001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0301MB0736;H:SN1PR0301MB1583.namprd03.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Aug 2015 15:35:54.8569 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0736 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1644 Lines: 42 > -----Original Message----- > From: Alan Stern [mailto:stern@rowland.harvard.edu] > Sent: Monday, August 10, 2015 8:14 PM > To: Mehresh Ramneek-B31383 > Cc: linux-kernel@vger.kernel.org; balbi@ti.com; > gregkh@linuxfoundation.org; linux-usb@vger.kernel.org; Li Yang-Leo-R58472 > Subject: RE: [PATCH 3/8][v2]usb:fsl:otg: Add support to add/remove usb > host driver > > On Mon, 10 Aug 2015, Ramneek Mehresh wrote: > > > > Also, what is the reason for calling usb_hcd_resume_root_hub()? It > won't > > > do anything, because it will run before the scheduled work, so there > won't > > > be a root hub for it to resume. > > > > > Well, you're right...it's not a surety that usb_hcd_resume_root_hub() will > run after > > scheduled work...i'll move it inside do_change_hcd() after usb_add_hcd(). > Thanks. > > You're missing the point. There's no reason ever to call > usb_hcd_resume_root_hub() immediately after usb_add_hcd(). The hub > driver does everything necessary when the root hub is registered. > Resuming it (if it is suspended at that point) won't accomplish > anything because all the important work has just been done. > > Now, if you _weren't_ calling usb_add_hcd() (for example if host.is_otg > were 0) then it might make sense to call usb_hcd_resume_root_hub() -- > although I don't see why you would need to. > > Alan Stern Understood...let me check this once again. Thanks. -- 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/