* [PATCH] net: mv88e6xxx: add missing SMI address init
@ 2023-11-22 15:03 Marek Mojík
2023-11-22 15:38 ` Lukasz Majewski
0 siblings, 1 reply; 5+ messages in thread
From: Marek Mojík @ 2023-11-22 15:03 UTC (permalink / raw)
To: u-boot, joe.hershberger, rfried.dev, tharvey, marek.behun
Driver does not currently initialize the smi_addr field, but instead keeps
the default value. This leads to issues on systems with different hardware
configuration. We can fix this problem by reading the SMI address from
device tree.
Signed-off-by: Marek Mojík <marek.mojik@nic.cz>
---
drivers/net/mv88e6xxx.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/mv88e6xxx.c b/drivers/net/mv88e6xxx.c
index c073f81e72..4636dbf156 100644
--- a/drivers/net/mv88e6xxx.c
+++ b/drivers/net/mv88e6xxx.c
@@ -753,6 +753,12 @@ static int mv88e6xxx_probe(struct udevice *dev)
return -ENODEV;
}
+ priv->smi_addr = dev_read_addr(dev);
+ if (priv->smi_addr == FDT_ADDR_T_NONE) {
+ dev_err(dev, "Invalid or missing SMI address\n");
+ return -EINVAL;
+ }
+
/* probe internal mdio bus */
ret = mv88e6xxx_probe_mdio(dev);
if (ret)
--
2.42.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] net: mv88e6xxx: add missing SMI address init
2023-11-22 15:03 [PATCH] net: mv88e6xxx: add missing SMI address init Marek Mojík
@ 2023-11-22 15:38 ` Lukasz Majewski
2023-11-24 13:04 ` YOUR NAME
2023-11-24 13:43 ` Marek Mojík
0 siblings, 2 replies; 5+ messages in thread
From: Lukasz Majewski @ 2023-11-22 15:38 UTC (permalink / raw)
To: Marek Mojík
Cc: u-boot, joe.hershberger, rfried.dev, tharvey, marek.behun
[-- Attachment #1: Type: text/plain, Size: 1466 bytes --]
Hi Marek,
> Driver does not currently initialize the smi_addr field, but instead
> keeps the default value. This leads to issues on systems with
> different hardware configuration. We can fix this problem by reading
> the SMI address from device tree.
>
> Signed-off-by: Marek Mojík <marek.mojik@nic.cz>
> ---
> drivers/net/mv88e6xxx.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/mv88e6xxx.c b/drivers/net/mv88e6xxx.c
> index c073f81e72..4636dbf156 100644
> --- a/drivers/net/mv88e6xxx.c
> +++ b/drivers/net/mv88e6xxx.c
> @@ -753,6 +753,12 @@ static int mv88e6xxx_probe(struct udevice *dev)
> return -ENODEV;
> }
>
> + priv->smi_addr = dev_read_addr(dev);
> + if (priv->smi_addr == FDT_ADDR_T_NONE) {
> + dev_err(dev, "Invalid or missing SMI address\n");
> + return -EINVAL;
> + }
> +
> /* probe internal mdio bus */
> ret = mv88e6xxx_probe_mdio(dev);
> if (ret)
I've posted some time ago patches for this driver:
https://patchwork.ozlabs.org/project/uboot/cover/20230601100005.2216345-1-lukma@denx.de/
Unfortunately, those were not pulled...
Maybe you would find fix for your issue, or prepare new version of it?
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: mv88e6xxx: add missing SMI address init
2023-11-22 15:38 ` Lukasz Majewski
@ 2023-11-24 13:04 ` YOUR NAME
2023-11-24 13:43 ` Marek Mojík
1 sibling, 0 replies; 5+ messages in thread
From: YOUR NAME @ 2023-11-24 13:04 UTC (permalink / raw)
To: Lukasz Majewski; +Cc: u-boot, joe.hershberger, rfried.dev, tharvey, marek.behun
On Wed, Nov 22, 2023 at 04:38:41PM +0100, Lukasz Majewski wrote:
> Hi Marek,
>
> > Driver does not currently initialize the smi_addr field, but instead
> > keeps the default value. This leads to issues on systems with
> > different hardware configuration. We can fix this problem by reading
> > the SMI address from device tree.
> >
> > Signed-off-by: Marek Mojík <marek.mojik@nic.cz>
> > ---
> > drivers/net/mv88e6xxx.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/net/mv88e6xxx.c b/drivers/net/mv88e6xxx.c
> > index c073f81e72..4636dbf156 100644
> > --- a/drivers/net/mv88e6xxx.c
> > +++ b/drivers/net/mv88e6xxx.c
> > @@ -753,6 +753,12 @@ static int mv88e6xxx_probe(struct udevice *dev)
> > return -ENODEV;
> > }
> >
> > + priv->smi_addr = dev_read_addr(dev);
> > + if (priv->smi_addr == FDT_ADDR_T_NONE) {
> > + dev_err(dev, "Invalid or missing SMI address\n");
> > + return -EINVAL;
> > + }
> > +
> > /* probe internal mdio bus */
> > ret = mv88e6xxx_probe_mdio(dev);
> > if (ret)
>
> I've posted some time ago patches for this driver:
>
> https://patchwork.ozlabs.org/project/uboot/cover/20230601100005.2216345-1-lukma@denx.de/
>
> Unfortunately, those were not pulled...
>
> Maybe you would find fix for your issue, or prepare new version of it?
I looked at your patches, but they don't fix the issue with smi_addr
initialization. But i may try preparing a new version for them in the
future.
Regards,
Marek
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: mv88e6xxx: add missing SMI address init
2023-11-22 15:38 ` Lukasz Majewski
2023-11-24 13:04 ` YOUR NAME
@ 2023-11-24 13:43 ` Marek Mojík
2023-11-27 10:00 ` Lukasz Majewski
1 sibling, 1 reply; 5+ messages in thread
From: Marek Mojík @ 2023-11-24 13:43 UTC (permalink / raw)
To: Lukasz Majewski; +Cc: u-boot, joe.hershberger, rfried.dev, tharvey, marek.behun
On Wed, Nov 22, 2023 at 04:38:41PM +0100, Lukasz Majewski wrote:
> Hi Marek,
>
> > Driver does not currently initialize the smi_addr field, but instead
> > keeps the default value. This leads to issues on systems with
> > different hardware configuration. We can fix this problem by reading
> > the SMI address from device tree.
> >
> > Signed-off-by: Marek Mojík <marek.mojik@nic.cz>
> > ---
> > drivers/net/mv88e6xxx.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/net/mv88e6xxx.c b/drivers/net/mv88e6xxx.c
> > index c073f81e72..4636dbf156 100644
> > --- a/drivers/net/mv88e6xxx.c
> > +++ b/drivers/net/mv88e6xxx.c
> > @@ -753,6 +753,12 @@ static int mv88e6xxx_probe(struct udevice *dev)
> > return -ENODEV;
> > }
> >
> > + priv->smi_addr = dev_read_addr(dev);
> > + if (priv->smi_addr == FDT_ADDR_T_NONE) {
> > + dev_err(dev, "Invalid or missing SMI address\n");
> > + return -EINVAL;
> > + }
> > +
> > /* probe internal mdio bus */
> > ret = mv88e6xxx_probe_mdio(dev);
> > if (ret)
>
> I've posted some time ago patches for this driver:
>
> https://patchwork.ozlabs.org/project/uboot/cover/20230601100005.2216345-1-lukma@denx.de/
>
> Unfortunately, those were not pulled...
>
> Maybe you would find fix for your issue, or prepare new version of it?
I looked at your patches, but they don't fix the issue with smi_addr
initialization. But i may try preparing a new version for them in
future.
Regards,
Marek
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: mv88e6xxx: add missing SMI address init
2023-11-24 13:43 ` Marek Mojík
@ 2023-11-27 10:00 ` Lukasz Majewski
0 siblings, 0 replies; 5+ messages in thread
From: Lukasz Majewski @ 2023-11-27 10:00 UTC (permalink / raw)
To: Marek Mojík
Cc: u-boot, joe.hershberger, rfried.dev, tharvey, marek.behun
[-- Attachment #1: Type: text/plain, Size: 2033 bytes --]
Hi Marek,
> On Wed, Nov 22, 2023 at 04:38:41PM +0100, Lukasz Majewski wrote:
> > Hi Marek,
> >
> > > Driver does not currently initialize the smi_addr field, but
> > > instead keeps the default value. This leads to issues on systems
> > > with different hardware configuration. We can fix this problem by
> > > reading the SMI address from device tree.
> > >
> > > Signed-off-by: Marek Mojík <marek.mojik@nic.cz>
> > > ---
> > > drivers/net/mv88e6xxx.c | 6 ++++++
> > > 1 file changed, 6 insertions(+)
> > >
> > > diff --git a/drivers/net/mv88e6xxx.c b/drivers/net/mv88e6xxx.c
> > > index c073f81e72..4636dbf156 100644
> > > --- a/drivers/net/mv88e6xxx.c
> > > +++ b/drivers/net/mv88e6xxx.c
> > > @@ -753,6 +753,12 @@ static int mv88e6xxx_probe(struct udevice
> > > *dev) return -ENODEV;
> > > }
> > >
> > > + priv->smi_addr = dev_read_addr(dev);
> > > + if (priv->smi_addr == FDT_ADDR_T_NONE) {
> > > + dev_err(dev, "Invalid or missing SMI address\n");
> > > + return -EINVAL;
> > > + }
> > > +
> > > /* probe internal mdio bus */
> > > ret = mv88e6xxx_probe_mdio(dev);
> > > if (ret)
> >
> > I've posted some time ago patches for this driver:
> >
> > https://patchwork.ozlabs.org/project/uboot/cover/20230601100005.2216345-1-lukma@denx.de/
> >
> > Unfortunately, those were not pulled...
> >
> > Maybe you would find fix for your issue, or prepare new version of
> > it?
>
> I looked at your patches, but they don't fix the issue with smi_addr
> initialization. But i may try preparing a new version for them in
> future.
>
No problem. I just wanted to share some insights. Moreover, I've also
posted some patches to the Linux kernel driver for this chip family.
> Regards,
> Marek
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-11-27 10:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-22 15:03 [PATCH] net: mv88e6xxx: add missing SMI address init Marek Mojík
2023-11-22 15:38 ` Lukasz Majewski
2023-11-24 13:04 ` YOUR NAME
2023-11-24 13:43 ` Marek Mojík
2023-11-27 10:00 ` Lukasz Majewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox