[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141030140705.GG6482@saruman>
Date: Thu, 30 Oct 2014 09:07:05 -0500
From: Felipe Balbi <balbi@...com>
To: Dinh Nguyen <dinguyen@...nsource.altera.com>
CC: Paul Zimmerman <Paul.Zimmerman@...opsys.com>,
"balbi@...com" <balbi@...com>,
"dinh.linux@...il.com" <dinh.linux@...il.com>,
"swarren@...dotorg.org" <swarren@...dotorg.org>,
"b.zolnierkie@...sung.com" <b.zolnierkie@...sung.com>,
"matthijs@...in.nl" <matthijs@...in.nl>,
"r.baldyga@...sung.com" <r.baldyga@...sung.com>,
"jg1.han@...sung.com" <jg1.han@...sung.com>,
"sachin.kamat@...aro.org" <sachin.kamat@...aro.org>,
"ben-linux@...ff.org" <ben-linux@...ff.org>,
"dianders@...omium.org" <dianders@...omium.org>,
"kever.yang@...k-chips.com" <kever.yang@...k-chips.com>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCHv6 8/8] usb: dwc2: move usb_disabled() call to host driver
only
On Wed, Oct 29, 2014 at 08:35:24AM -0500, Dinh Nguyen wrote:
>
>
> On 10/28/14, 8:26 PM, Paul Zimmerman wrote:
> >> From: dinguyen@...nsource.altera.com [mailto:dinguyen@...nsource.altera.com]
> >> Sent: Tuesday, October 28, 2014 4:26 PM
> >>
> >> Now that platform.c will get built for both Host and Gadget, if we leave the
> >> usb_disabled() call in platform.c, it results in the following build error
> >> when (!USB && USB_GADGET) condition is met.
> >>
> >> ERROR: "usb_disabled" [drivers/usb/dwc2/dwc2_platform.ko] undefined!
> >>
> >> Since usb_disabled() is mostly used to disable USB host functionality, move
> >> the call the host portion for the DWC2 driver.
> >>
> >> Signed-off-by: Dinh Nguyen <dinguyen@...nsource.altera.com>
> >> ---
> >> drivers/usb/dwc2/hcd.c | 3 +++
> >> drivers/usb/dwc2/platform.c | 3 ---
> >> 2 files changed, 3 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
> >> index fa49c72..b741997 100644
> >> --- a/drivers/usb/dwc2/hcd.c
> >> +++ b/drivers/usb/dwc2/hcd.c
> >> @@ -2780,6 +2780,9 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int irq,
> >> int i, num_channels;
> >> int retval;
> >>
> >> + if (usb_disabled())
> >> + return -ENODEV;
> >> +
> >> dev_dbg(hsotg->dev, "DWC OTG HCD INIT\n");
> >>
> >> /* Detect config values from hardware */
> >> diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
> >> index 77c8417..123cf54 100644
> >> --- a/drivers/usb/dwc2/platform.c
> >> +++ b/drivers/usb/dwc2/platform.c
> >> @@ -157,9 +157,6 @@ static int dwc2_driver_probe(struct platform_device *dev)
> >> int retval;
> >> int irq;
> >>
> >> - if (usb_disabled())
> >> - return -ENODEV;
> >> -
> >> match = of_match_device(dwc2_of_match_table, &dev->dev);
> >> if (match && match->data) {
> >> params = match->data;
> >
> > I'm confused. You are saying the build is broken until patch 8/8 is
> > applied? As always, that is not acceptable. You need to fix the
> > breakage at the point where it was introduced, not leave it broken
> > until the last patch in the series.
> >
>
> The build gets broken when patch 7/8 of is applied. That is the patch
> that finally allows platform.c to get built for host and gadget. I can
> fold this patch into patch 7/8.
then you invert things, make $subject patch 7 (or even patch 1) and
patch 7 becomes patch 8.
--
balbi
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists