Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754442AbbHJOo0 (ORCPT ); Mon, 10 Aug 2015 10:44:26 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:50699 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753045AbbHJOoY (ORCPT ); Mon, 10 Aug 2015 10:44:24 -0400 Date: Mon, 10 Aug 2015 10:44:23 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Ramneek Mehresh 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 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1181 Lines: 26 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 -- 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/