Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752669AbcDROLd (ORCPT ); Mon, 18 Apr 2016 10:11:33 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:32886 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751669AbcDROLb (ORCPT ); Mon, 18 Apr 2016 10:11:31 -0400 Date: Mon, 18 Apr 2016 10:11:29 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Peter Chen cc: Roger Quadros , Felipe Balbi , , , , , , , , , , , Subject: Re: [PATCH v6 01/12] usb: hcd: Initialize hcd->flags to 0 In-Reply-To: <20160418022956.GB32090@shlinux2.ap.freescale.net> 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: 1206 Lines: 36 On Mon, 18 Apr 2016, Peter Chen wrote: > On Wed, Apr 06, 2016 at 09:32:22AM +0300, Roger Quadros wrote: > > On 06/04/16 09:09, Felipe Balbi wrote: > > > > > > Hi, > > > > > > Roger Quadros writes: > > >> diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c > > >> index 2ca2cef..6b1930d 100644 > > >> --- a/drivers/usb/core/hcd.c > > >> +++ b/drivers/usb/core/hcd.c > > >> @@ -2706,6 +2706,7 @@ int usb_add_hcd(struct usb_hcd *hcd, > > >> int retval; > > >> struct usb_device *rhdev; > > >> > > >> + hcd->flags = 0; > > > > > > seems like this would make more sense in usb_del_hcd() instead. > > > > > > > OK, I'll move it there. > > > > It depends on Alan's comments, whether only usb_add_hcd/usb_del_hcd > pair can be called repeat. If Alan acks it, I have no idea for it. Most of the host controller drivers were not written with this in mind, but I think it would be a good thing to allow. It would speed up the host/device role switches. This might mean we need to fix up several drivers to make them work correctly in an OTG environment. It should be possible to do this. Is there any particular reason why it would be difficult for Chipidea? Alan Stern