Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755394AbbDTN4o (ORCPT ); Mon, 20 Apr 2015 09:56:44 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:50361 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755162AbbDTN4l (ORCPT ); Mon, 20 Apr 2015 09:56:41 -0400 Date: Mon, 20 Apr 2015 09:56:40 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Roger Quadros cc: Peter Chen , , , , , , , , , Subject: Re: [RFC][PATCH v2 06/13] usb: hcd: Add hcd add/remove functions for OTG use In-Reply-To: <5534A414.4070401@ti.com> 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: 904 Lines: 22 On Mon, 20 Apr 2015, Roger Quadros wrote: > > I don't understand this. Why do you want to defer the add/remove if > > the device is OTG? Don't host controller drivers expect these things > > to execute synchronously? > > Sorry for the wrong information. We actually defer only the add as the > OTG state machine might not yet be in Host ready mode. > The remove is always synchronous and we ensure that the HCD is removed > when usb_otg_unregister_hcd() returns. That's okay then, but it does leave one potential hole. What happens if usb_add_hcd() is deferred for so long that usb_remove_hcd() gets called before the add can complete? 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/