All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: host: ehci-vf: Fix portnr initialization
@ 2021-02-04 11:33 Dominik Wild
  2021-03-04  3:46 ` Simon Glass
  0 siblings, 1 reply; 3+ messages in thread
From: Dominik Wild @ 2021-02-04 11:33 UTC (permalink / raw)
  To: u-boot

As of 29f7d05a347ab7a42577c67fdfb787ef91537302 dev->seq will be set
after device_ofdata_to_platdata(), therefore dev->seq must be read
later during probe

Signed-off-by: Dominik Wild <dominik.wild@gmail.com>
---
 drivers/usb/host/ehci-vf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c
index 25f76c9fa9..4dac940d08 100644
--- a/drivers/usb/host/ehci-vf.c
+++ b/drivers/usb/host/ehci-vf.c
@@ -222,8 +222,6 @@ static int vf_usb_of_to_plat(struct udevice *dev)
 	int node = dev_of_offset(dev);
 	const char *mode;
 
-	priv->portnr = dev_seq(dev);
-
 	priv->ehci = dev_read_addr_ptr(dev);
 	mode = fdt_getprop(dt_blob, node, "dr_mode", NULL);
 	if (mode) {
@@ -317,6 +315,8 @@ static int ehci_usb_probe(struct udevice *dev)
 	struct ehci_hcor *hcor;
 	int ret;
 
+	priv->portnr = dev_seq(dev);
+
 	ret = ehci_vf_common_init(ehci, priv->portnr);
 	if (ret)
 		return ret;
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] usb: host: ehci-vf: Fix portnr initialization
  2021-02-04 11:33 [PATCH] usb: host: ehci-vf: Fix portnr initialization Dominik Wild
@ 2021-03-04  3:46 ` Simon Glass
       [not found]   ` <CALSffXSB+9ZbkEdM-8e6RCOhggezBJE4DoG7S8Ar5aXLgrE+Ww@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Glass @ 2021-03-04  3:46 UTC (permalink / raw)
  To: u-boot

Hi Dominik,

On Thu, 4 Feb 2021 at 06:01, Dominik Wild <dominik.wild@gmail.com> wrote:
>
> As of 29f7d05a347ab7a42577c67fdfb787ef91537302 dev->seq will be set
> after device_ofdata_to_platdata(), therefore dev->seq must be read
> later during probe
>
> Signed-off-by: Dominik Wild <dominik.wild@gmail.com>
> ---
>  drivers/usb/host/ehci-vf.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c
> index 25f76c9fa9..4dac940d08 100644
> --- a/drivers/usb/host/ehci-vf.c
> +++ b/drivers/usb/host/ehci-vf.c
> @@ -222,8 +222,6 @@ static int vf_usb_of_to_plat(struct udevice *dev)
>         int node = dev_of_offset(dev);
>         const char *mode;
>
> -       priv->portnr = dev_seq(dev);
> -
>         priv->ehci = dev_read_addr_ptr(dev);
>         mode = fdt_getprop(dt_blob, node, "dr_mode", NULL);
>         if (mode) {
> @@ -317,6 +315,8 @@ static int ehci_usb_probe(struct udevice *dev)
>         struct ehci_hcor *hcor;
>         int ret;
>
> +       priv->portnr = dev_seq(dev);
> +
>         ret = ehci_vf_common_init(ehci, priv->portnr);
>         if (ret)
>                 return ret;
> --
> 2.25.1
>

I am a bit surprised at this...the sequence number should normally be
set during the bind step. Is this missing from USB binding? I can't
recall how it works right now.

Regards,
Simon

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] usb: host: ehci-vf: Fix portnr initialization
       [not found]   ` <CALSffXSB+9ZbkEdM-8e6RCOhggezBJE4DoG7S8Ar5aXLgrE+Ww@mail.gmail.com>
@ 2021-03-04 13:20     ` Simon Glass
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Glass @ 2021-03-04 13:20 UTC (permalink / raw)
  To: u-boot

+U-Boot Mailing List

On Thu, 4 Mar 2021 at 03:50, Dominik Wild <dominik.wild@gmail.com> wrote:
>
> Hi Simon
>
> Okay, I had another look and figured that you worked on sequence numbers in December. The thing is that I started the bisect from v2021.01 and up to this version the sequence number was always -1. But I can now confirm that the ehci-vf driver is working again from v2021.4-rc1.

OK thanks for checking this. So it means that it is broken in
v2021.01. Now I am wondering what actually fixed it?

Regards,
Simon

> Am Do., 4. M?rz 2021 um 04:47 Uhr schrieb Simon Glass <sjg@chromium.org>:
>>
>> Hi Dominik,
>>
>> On Thu, 4 Feb 2021 at 06:01, Dominik Wild <dominik.wild@gmail.com> wrote:
>> >
>> > As of 29f7d05a347ab7a42577c67fdfb787ef91537302 dev->seq will be set
>> > after device_ofdata_to_platdata(), therefore dev->seq must be read
>> > later during probe
>> >
>> > Signed-off-by: Dominik Wild <dominik.wild@gmail.com>
>> > ---
>> >  drivers/usb/host/ehci-vf.c | 4 ++--
>> >  1 file changed, 2 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c
>> > index 25f76c9fa9..4dac940d08 100644
>> > --- a/drivers/usb/host/ehci-vf.c
>> > +++ b/drivers/usb/host/ehci-vf.c
>> > @@ -222,8 +222,6 @@ static int vf_usb_of_to_plat(struct udevice *dev)
>> >         int node = dev_of_offset(dev);
>> >         const char *mode;
>> >
>> > -       priv->portnr = dev_seq(dev);
>> > -
>> >         priv->ehci = dev_read_addr_ptr(dev);
>> >         mode = fdt_getprop(dt_blob, node, "dr_mode", NULL);
>> >         if (mode) {
>> > @@ -317,6 +315,8 @@ static int ehci_usb_probe(struct udevice *dev)
>> >         struct ehci_hcor *hcor;
>> >         int ret;
>> >
>> > +       priv->portnr = dev_seq(dev);
>> > +
>> >         ret = ehci_vf_common_init(ehci, priv->portnr);
>> >         if (ret)
>> >                 return ret;
>> > --
>> > 2.25.1
>> >
>>
>> I am a bit surprised at this...the sequence number should normally be
>> set during the bind step. Is this missing from USB binding? I can't
>> recall how it works right now.
>>
>> Regards,
>> Simon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-04 13:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 11:33 [PATCH] usb: host: ehci-vf: Fix portnr initialization Dominik Wild
2021-03-04  3:46 ` Simon Glass
     [not found]   ` <CALSffXSB+9ZbkEdM-8e6RCOhggezBJE4DoG7S8Ar5aXLgrE+Ww@mail.gmail.com>
2021-03-04 13:20     ` Simon Glass

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.