[PATCH v2 2/2] net: xilinx_axi: check PCS/PMA PHY status in setup_phy

2022-11-01 Thread Andy Chiu
Both PCS/PMA PHY and the external PHY need to have a valid link status in order to have Ethernet traffic. Check and wait this status at setup_phy() so that we could diagnose if there is a PHY issue. Signed-off-by: Andy Chiu Reviewed-by: Greentime Hu --- drivers/net/xilinx_axi_emac.c | 44

[PATCH v2 1/2] net: xilinx_axi: add PCS/PMA PHY

2022-11-01 Thread Andy Chiu
nd we may skip passing link information out. Signed-off-by: Andy Chiu Reviewed-by: Greentime Hu --- drivers/net/xilinx_axi_emac.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c

[PATCH v2 0/2] Manage PCS/PMA PHY if pressent

2022-11-01 Thread Andy Chiu
instead of pcs-phy in DT 2. Move printing of status waiting of pcs phy to debug and refactor code. Andy Chiu (2): net: xilinx_axi: add PCS/PMA PHY net: xilinx_axi: check PCS/PMA PHY status in setup_phy drivers/net/xilinx_axi_emac.c | 70 ++- 1 file changed, 68

[PATCH 2/2] net:xilinx_axi: check PCS/PMA PHY status in setup_phy

2022-10-17 Thread Andy Chiu
Both PCS/PMA PHY and the external PHY need to have a valid link status in order to have Ethernet traffic. Check and wait this status at setup_phy() so that we could diagnose if there is a PHY issue. Signed-off-by: Andy Chiu Reviewed-by: Greentime Hu --- drivers/net/xilinx_axi_emac.c | 43

[PATCH 1/2] net:xilinx_axi: add PCS/PMA PHY

2022-10-17 Thread Andy Chiu
nd we may skip passing link information out. Signed-off-by: Andy Chiu Reviewed-by: Greentime Hu --- drivers/net/xilinx_axi_emac.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c index 04277

[PATCH 0/2] Manage PCS/PMA PHY if pressent

2022-10-17 Thread Andy Chiu
If both PCS/PMA PHY and an external PHY are pressent on the Ethernet, then the real link status should point to the external facing PHY. At the same time, we must ensure the link status of the PCS/PMA PHY is good before transmitting packets. Andy Chiu (2): net:xilinx_axi: add PCS/PMA PHY

Re: [PATCH 3/3] net: xilinx: Force a probe failure if it cannot setup phy

2022-02-09 Thread Andy Chiu
Dear Maintainers, I am sending this email to check if this patch was missed. I would be really appreciated if I get any suggestion from you, thanks! Best regards Andy On Thu, Jan 20, 2022 at 3:35 PM Andy Chiu wrote: > > Or we may get load access faults afterward. > > The `phydev`

[PATCH] net: xilinx: fix the wrong dma base address issue

2022-01-20 Thread Andy Chiu
use fdtdec_get_addr_size_auto_parent() to get correct base address. After applying this patch, we can get the correct base address of dma by replacing fdtdec_get_addr_size_fixed() with fdtdec_get_addr_size_auto_parent(). fdtdec_get_addr_size_auto_parent: na=1, ns=1, fdtdec_get_addr_size_fixed:

[PATCH 3/3] net: xilinx: Force a probe failure if it cannot setup phy

2022-01-20 Thread Andy Chiu
rest (e.g. probe the driver again if needed), rather than having access faults. Signed-off-by: Andy Chiu Reviewed-by: Greentime Hu --- drivers/net/xilinx_axi_emac.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/ne

[PATCH 2/3] net: xilinx: Move setup of 1G MAC to a function

2022-01-20 Thread Andy Chiu
Separate the flow out so that it would be easiler to implement error handling logic. Signed-off-by: Andy Chiu --- drivers/net/xilinx_axi_emac.c | 50 +-- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net

[PATCH 1/3] net: xilinx: fix load access fault

2022-01-20 Thread Andy Chiu
From: Greentime Hu phy_connect() may fail by returning a NULL pointer. Thus, axiemac_phy_init() should handle the case or we may get an access fault when it tries to dereference it. Signed-off-by: Greentime Hu Reviewed-by: Andy Chiu Signed-off-by: Andy Chiu --- drivers/net