[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-driver-devel
Subject: Re: [PATCHv2] staging: dwc2: Fix code that gets the nummber of host channels
From: Dinh Nguyen <dinguyen () altera ! com>
Date: 2013-09-30 22:32:44
Message-ID: 1380580364.31565.5.camel () linux-builds1
[Download RAW message or body]
On Tue, 2013-10-01 at 01:25 +0300, Dan Carpenter wrote:
> On Mon, Sep 30, 2013 at 05:05:23PM -0500, dinguyen@altera.com wrote:
> > From: Dinh Nguyen <dinguyen@altera.com>
> >
> > The variable host_channels of dwc2_hw_params struct is only 4-bits. Adding
> > a 1 to a 0xf results in a 0 for host_channels. Thus, the driver was always
> > thinking it had 0 host channels.
> >
> > Represent the correct number of host channels by using the host_channels
> > variable of dwc2_core_params struct. We should do the +1 in
> > dwc2_set_param_host_channels();
> >
> > Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
>
> Ah. Good. You've fixed the compile problem, but I still don't think
> you have tested it; there just wasn't enough time.
So in dwc2_get_hwparams(), it was getting the host_channels from
hwcfg2, then it +1 to hw->host_channels.
hw->host_channels is declared:
struct dwc2_hw_params {
...
unsigned host_channels:4;
}
Thus +1 will make host_channels = 0.
Dinh
>
> regards,
> dan carpenter
>
>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic