From: jiri.prchal@aksignal.cz (Jiří Prchal)
To: linux-arm-kernel@lists.infradead.org
Subject: [BUG] usb/at91: usb hub does not work
Date: Tue, 16 Jun 2015 10:51:55 +0200 [thread overview]
Message-ID: <557FE3AB.2060006@aksignal.cz> (raw)
In-Reply-To: <20150613131300.18e6247a@bbrezillon>
On 13.6.2015 13:13, Boris Brezillon wrote:
> On Sat, 13 Jun 2015 13:09:56 +0200
> Boris Brezillon <boris.brezillon@free-electrons.com> wrote:
>
>> Hi Jiri,
>>
>> On Fri, 12 Jun 2015 11:30:20 +0200
>> Ji?? Prchal <jiri.prchal@aksignal.cz> wrote:
>>
>>>
>>>
>>> On 11.6.2015 15:53, Alan Stern wrote:
>>>> On Thu, 11 Jun 2015, Ji?? Prchal wrote:
>>>>
>>>>> Hi all,
>>>>> I discovered some bug when I change kernel from 3.18.13 to 3.18.14. I have board with usb hub CY7C65632 on it.
>>>>> In .13 it works fine but in .14 it repeats this message:
>>>>> [ 19.170000] usb 2-3: new full-speed USB device number 56 using at91_ohci
>>>>> and devices connected to usb through hub doesn't appear at all.
>>>>
>>>>> Any idea?
>>>>
>>>> Try using git bisect to find the commit which caused this problem to
>>>> start.
>>>
>>> This is result:
>>> Bisecting: 0 revisions left to test after this (roughly 0 steps)
>>> [ae74ea64ccdb8b99ee2618b58020263d5b1d9b22] clk: at91: usb: propagate rate modification to the parent clk
>>
>>
>> Actually when bisecting you found a bug that has been fixed before
>> 3.18.14 was released (see this commit [1]).
>> This being said, the prototype mismatch fix does not seem to fix all
>> the mismatches (seems the ->determine_rate() has been changed in 3.19
>> too, and the prototype mismatch patch was a backport of a 3.19 fix).
>>
>> Anyway, you'll find below a patch supposed to fix the remaining bug.
>
> I forgot to disable the line wrapper in my email client, here is the
> same patch without the wrapped lines:
Aplied to 3.18.14 and it helped!
Thanks
Jiri
>
> -- >8 --
>
> From 7392429d074f43ef61d41e33db63f0f5d804bdd4 Mon Sep 17 00:00:00 2001
> Subject: [PATCH] clk: at91: fix determine_rate prototype (again)
>
> Commit ae74ea64ccdb8b99ee2618b58020263d5b1d9b22 was a backport of a bug
> fix applied in 4.0, but in the meantime the ->determine_rate() prototype
> has changed, thus introduction a prototype mismatch bug in pre-4.0
> kernels. This prototype mismatch was supposed to be fixed by commit
> 76723e7ed589998384a080e29204df4659c67cf2, which fix the bug on 3.19 kernels,
> but the ->determine_rate() has also changed between 3.18 and 3.19.
> Hopefully this patch will definitely fix the prototype mismatch for 3.18.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
> drivers/clk/at91/clk-usb.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clk/at91/clk-usb.c b/drivers/clk/at91/clk-usb.c
> index 0283a57..d0d335d 100644
> --- a/drivers/clk/at91/clk-usb.c
> +++ b/drivers/clk/at91/clk-usb.c
> @@ -59,7 +59,7 @@ static unsigned long at91sam9x5_clk_usb_recalc_rate(struct clk_hw *hw,
> static long at91sam9x5_clk_usb_determine_rate(struct clk_hw *hw,
> unsigned long rate,
> unsigned long *best_parent_rate,
> - struct clk_hw **best_parent_hw)
> + struct clk **best_parent_clk)
> {
> struct clk *parent = NULL;
> long best_rate = -EINVAL;
> @@ -91,7 +91,7 @@ static long at91sam9x5_clk_usb_determine_rate(struct clk_hw *hw,
> best_rate = tmp_rate;
> best_diff = tmp_diff;
> *best_parent_rate = tmp_parent_rate;
> - *best_parent_hw = __clk_get_hw(parent);
> + *best_parent_clk = parent;
> }
>
> if (!best_diff || tmp_rate < rate)
>
next prev parent reply other threads:[~2015-06-16 8:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-11 9:42 [BUG] usb/at91: usb hub does not work Jiří Prchal
2015-06-11 13:53 ` Alan Stern
2015-06-12 9:30 ` Jiří Prchal
2015-06-13 11:09 ` Boris Brezillon
2015-06-13 11:13 ` Boris Brezillon
2015-06-16 8:51 ` Jiří Prchal [this message]
2015-06-16 9:07 ` Boris Brezillon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=557FE3AB.2060006@aksignal.cz \
--to=jiri.prchal@aksignal.cz \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.