Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754601Ab3CRSrU (ORCPT ); Mon, 18 Mar 2013 14:47:20 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:56250 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753542Ab3CRSrS (ORCPT ); Mon, 18 Mar 2013 14:47:18 -0400 Date: Mon, 18 Mar 2013 14:47:17 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Felipe Balbi cc: Yuan-Hsin Chen , , , , , , Yuan-Hsin Chen , Subject: Re: [PATCH] usb host: Faraday FUSBH200 HCD driver. In-Reply-To: <20130318182316.GA13371@arwen.pp.htv.fi> 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: 1713 Lines: 39 On Mon, 18 Mar 2013, Felipe Balbi wrote: > Hi, > > On Mon, Mar 18, 2013 at 10:16:56AM -0400, Alan Stern wrote: > > > > it would cause copious modification and duplication of ehci hcd > > > > driver. For example, there is no "configured_flag" register in > > > > fusbh200 controller, yet, ehci hcd driver accesses "configured_flag" > > > > in function ehci_run which would cause compile errors. Therefore, > > > > maybe my first patch which refers to oxu210hp-hcd is a better > > > > solution? > > > > > > why don't you just add a quirk flag to ehci struct so that it knows it > > > shouldn't access CONFIGFLAG register when that's non-existent ? > > > > > > There are only 5 uses of configured_flag in ehci-hcd.c, so it should be > > > easy to wrap that around a flag check. > > > > Two of those uses turn configured_flag on and two of them turn it off. > > However, one of the uses tests its value (the first one in > > ehci_resume). How would that be handled if configured_flag doesn't > > exist? > > perhaps they don't use it because they have a root-hub TT ? In that case > you assume EHCI *always* owns the port. Would that work ? The usage in ehci_resume is meant for checking whether power was lost while the controller was suspended. This probably isn't an issue during runtime suspend; it's likely to come up only during system suspend. If Yuan-Hsin's platform doesn't support system suspend then we don't have to worry about it. 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/