[edk2-devel] [edk2-platforms: PATCH] Marvell/Drivers: MvPhyDxe: Fill MdioIndex field in PhyDev

Patryk Duda posted 1 patch 4 years, 7 months ago
Failed in applying to current master (apply log)
Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
[edk2-devel] [edk2-platforms: PATCH] Marvell/Drivers: MvPhyDxe: Fill MdioIndex field in PhyDev
Posted by Patryk Duda 4 years, 7 months ago
This patch fixes missing MdioIndex copying during initialization.
This bug appeared as inability to communicate with PHY connected
to MDIO other than first.

Signed-off-by: Patryk Duda <pdk@semihalf.com>
---
 Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c b/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c
index 6cdef42391..2d2aad7e38 100644
--- a/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c
+++ b/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c
@@ -419,8 +419,12 @@ MvPhyInit (
   PhyDev = AllocateZeroPool (sizeof (PHY_DEVICE));
   PhyDev->Addr = PhySmiAddresses[PhyIndex];
   PhyDev->Connection = PhyConnection;
-  DEBUG((DEBUG_INFO, "MvPhyDxe: PhyAddr is %d, connection %d\n",
-        PhyDev->Addr, PhyConnection));
+  PhyDev->MdioIndex = MdioIndex;
+  DEBUG ((DEBUG_INFO,
+    "MvPhyDxe: MdioIndex is %d, PhyAddr is %d, connection %d\n",
+    PhyDev->MdioIndex,
+    PhyDev->Addr,
+    PhyConnection));
   *OutPhyDev = PhyDev;
 
   DeviceIds = PcdGetPtr (PcdPhyDeviceIds);
-- 
2.16.4


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47051): https://edk2.groups.io/g/devel/message/47051
Mute This Topic: https://groups.io/mt/34085586/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-platforms: PATCH] Marvell/Drivers: MvPhyDxe: Fill MdioIndex field in PhyDev
Posted by Marcin Wojtas 4 years, 7 months ago
pon., 9 wrz 2019 o 17:53 Patryk Duda <pdk@semihalf.com> napisał(a):
>
> This patch fixes missing MdioIndex copying during initialization.
> This bug appeared as inability to communicate with PHY connected
> to MDIO other than first.
>
> Signed-off-by: Patryk Duda <pdk@semihalf.com>
> ---
>  Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c b/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c
> index 6cdef42391..2d2aad7e38 100644
> --- a/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c
> +++ b/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c
> @@ -419,8 +419,12 @@ MvPhyInit (
>    PhyDev = AllocateZeroPool (sizeof (PHY_DEVICE));
>    PhyDev->Addr = PhySmiAddresses[PhyIndex];
>    PhyDev->Connection = PhyConnection;
> -  DEBUG((DEBUG_INFO, "MvPhyDxe: PhyAddr is %d, connection %d\n",
> -        PhyDev->Addr, PhyConnection));
> +  PhyDev->MdioIndex = MdioIndex;
> +  DEBUG ((DEBUG_INFO,
> +    "MvPhyDxe: MdioIndex is %d, PhyAddr is %d, connection %d\n",
> +    PhyDev->MdioIndex,
> +    PhyDev->Addr,
> +    PhyConnection));
>    *OutPhyDev = PhyDev;
>
>    DeviceIds = PcdGetPtr (PcdPhyDeviceIds);
> --

Tested-by: Marcin Wojtas <mw@semihalf.com>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47066): https://edk2.groups.io/g/devel/message/47066
Mute This Topic: https://groups.io/mt/34085586/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-platforms: PATCH] Marvell/Drivers: MvPhyDxe: Fill MdioIndex field in PhyDev
Posted by Patryk Duda 4 years, 6 months ago
Hi,

Do you have any remarks to this patch?

Best Regards,
Patryk

wt., 10 wrz 2019 o 08:24 Marcin Wojtas <mw@semihalf.com> napisał(a):

> pon., 9 wrz 2019 o 17:53 Patryk Duda <pdk@semihalf.com> napisał(a):
> >
> > This patch fixes missing MdioIndex copying during initialization.
> > This bug appeared as inability to communicate with PHY connected
> > to MDIO other than first.
> >
> > Signed-off-by: Patryk Duda <pdk@semihalf.com>
> > ---
> >  Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c | 8 ++++++--
> >  1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c
> b/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c
> > index 6cdef42391..2d2aad7e38 100644
> > --- a/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c
> > +++ b/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c
> > @@ -419,8 +419,12 @@ MvPhyInit (
> >    PhyDev = AllocateZeroPool (sizeof (PHY_DEVICE));
> >    PhyDev->Addr = PhySmiAddresses[PhyIndex];
> >    PhyDev->Connection = PhyConnection;
> > -  DEBUG((DEBUG_INFO, "MvPhyDxe: PhyAddr is %d, connection %d\n",
> > -        PhyDev->Addr, PhyConnection));
> > +  PhyDev->MdioIndex = MdioIndex;
> > +  DEBUG ((DEBUG_INFO,
> > +    "MvPhyDxe: MdioIndex is %d, PhyAddr is %d, connection %d\n",
> > +    PhyDev->MdioIndex,
> > +    PhyDev->Addr,
> > +    PhyConnection));
> >    *OutPhyDev = PhyDev;
> >
> >    DeviceIds = PcdGetPtr (PcdPhyDeviceIds);
> > --
>
> Tested-by: Marcin Wojtas <mw@semihalf.com>
>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48226): https://edk2.groups.io/g/devel/message/48226
Mute This Topic: https://groups.io/mt/34085586/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-platforms: PATCH] Marvell/Drivers: MvPhyDxe: Fill MdioIndex field in PhyDev
Posted by Leif Lindholm 4 years, 6 months ago
On Mon, Sep 09, 2019 at 05:53:10PM +0200, Patryk Duda wrote:
> This patch fixes missing MdioIndex copying during initialization.
> This bug appeared as inability to communicate with PHY connected
> to MDIO other than first.
> 
> Signed-off-by: Patryk Duda <pdk@semihalf.com>

Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Pushed as e4d3ddd7a51b.

Thanks!

> ---
>  Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c b/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c
> index 6cdef42391..2d2aad7e38 100644
> --- a/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c
> +++ b/Silicon/Marvell/Drivers/Net/MvPhyDxe/MvPhyDxe.c
> @@ -419,8 +419,12 @@ MvPhyInit (
>    PhyDev = AllocateZeroPool (sizeof (PHY_DEVICE));
>    PhyDev->Addr = PhySmiAddresses[PhyIndex];
>    PhyDev->Connection = PhyConnection;
> -  DEBUG((DEBUG_INFO, "MvPhyDxe: PhyAddr is %d, connection %d\n",
> -        PhyDev->Addr, PhyConnection));
> +  PhyDev->MdioIndex = MdioIndex;
> +  DEBUG ((DEBUG_INFO,
> +    "MvPhyDxe: MdioIndex is %d, PhyAddr is %d, connection %d\n",
> +    PhyDev->MdioIndex,
> +    PhyDev->Addr,
> +    PhyConnection));
>    *OutPhyDev = PhyDev;
>  
>    DeviceIds = PcdGetPtr (PcdPhyDeviceIds);
> -- 
> 2.16.4
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48248): https://edk2.groups.io/g/devel/message/48248
Mute This Topic: https://groups.io/mt/34085586/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-