OpenNuvoton / NUC970_Linux_Kernel

Linux Kernel Source Code for NUC970 Series Microprocessor
Other
68 stars 69 forks source link

NUC972 network issue #37

Closed qianfan-Zhao closed 5 years ago

qianfan-Zhao commented 5 years ago

My device can't connnect the host by using tcp protocol sometimes after reboot. I don't know the reason now.

The device has a static ip address after power on: 193.168.18.20/24, there has another win10 computer(193.168.18.3/24) connected it.

Nexit is the network informations:

eth0      Link encap:Ethernet  HWaddr 00:DF:C1:A8:12:14
          inet addr:193.168.18.20  Bcast:193.168.18.255  Mask:255.255.255.0
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:54 errors:0 dropped:0 overruns:0 frame:0
          TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5164 (5.0 KiB)  TX bytes:5164 (5.0 KiB)

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         193.168.18.1    0.0.0.0         UG    0      0        0 eth0
193.168.18.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0

I can't ping any other ip address other than localhost.

# tcpdump -i lo & 
# ping 193.168.18.3
PING 193.168.18.3 (193.168.18.3): 56 data bytes
^C
--- 193.168.18.3 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss
# 17:47:39.360000 IP 193.168.18.20 > 193.168.18.20: ICMP host 193.168.18.3 unreachable, length 92
17:47:39.360000 IP 193.168.18.20 > 193.168.18.20: ICMP host 193.168.18.3 unreachable, length 92
17:47:39.360000 IP 193.168.18.20 > 193.168.18.20: ICMP host 193.168.18.3 unreachable, length 92

#
# ping 193.168.18.20
PING 193.168.18.20 (193.168.18.20): 56 data bytes
17:47:56.200000 IP 193.168.18.20 > 193.168.18.20: ICMP echo request, id 11778, seq 0, length 64
17:47:56.200000 IP 193.168.18.20 > 193.168.18.20: ICMP echo reply, id 11778, seq 0, length 64
64 bytes from 193.168.18.20: seq=0 ttl=64 time=0.000 ms
17:47:57.210000 IP 193.168.18.20 > 193.168.18.20: ICMP echo request, id 11778, seq 1, length 64
17:47:57.210000 IP 193.168.18.20 > 193.168.18.20: ICMP echo reply, id 11778, seq 1, length 64
64 bytes from 193.168.18.20: seq=1 ttl=64 time=0.000 ms
17:47:58.220000 IP 193.168.18.20 > 193.168.18.20: ICMP echo request, id 11778, seq 2, length 64
17:47:58.220000 IP 193.168.18.20 > 193.168.18.20: ICMP echo reply, id 11778, seq 2, length 64
64 bytes from 193.168.18.20: seq=2 ttl=64 time=0.000 ms
17:47:59.230000 IP 193.168.18.20 > 193.168.18.20: ICMP echo request, id 11778, seq 3, length 64
17:47:59.230000 IP 193.168.18.20 > 193.168.18.20: ICMP echo reply, id 11778, seq 3, length 64
64 bytes from 193.168.18.20: seq=3 ttl=64 time=0.000 ms
^C
--- 193.168.18.20 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.000/0.000/0.000 ms
#

I don't know why all the packets can't send from eth0, and who cause this problem, emac driver or tcp stack or another?

yachen commented 5 years ago

Tx/Rx packet counts are both 0. What hardware are you testing with? Which PHY chip are you using? Can you check "cat /proc/interrupts" and see if there's any EMAC interrupt? Also please check if there's anything abnormal about the REFCLK signal.

Sincerely,

Yi-An Chen

qianfan-Zhao commented 5 years ago

The problem doesn't come up every time, about 10 percent of the time. I think it is ok with our board or PHY chip.

I added printk information to the nuc970_ether_start_xmit function. When the problem occurs, you can see that the Linux network protocol stack does call the nuc970_ether_start_xmit function, but no packets are sent from the hardware interface.

Here is the interrupt message:

# cat /proc/interrupts
           CPU0
 16:     384842         -  nuc970-timer0
 18:         28         -  nuc970adc
 19:          0         -  b0002000.emac0
 21:          0         -  b0002000.emac0
 23:          0         -  ehci_hcd:usb1
 24:          0         -  ohci_hcd:usb2
 36:        438         -  ttyS0
 38:         12         -
 45:        152         -
 52:       4110         -  b8006300.spi1
Err:          0
qianfan-Zhao commented 5 years ago

nuc970_reset_mac(dev, 0); can't resume if this problem happens.

# ifconfig eth0 down; ifconfig eth0 up
nuc970_ether_stats
nuc970-emac0 b0002000.emac0: eth0 is OPENED
nuc970_ether_stats
# nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit
nuc970_ether_start_xmit 2

# cat /proc/interrupts
           CPU0
 16:      42545         -  nuc970-timer0
 18:        413         -  nuc970adc
 19:          0         -  b0002000.emac0
 21:          0         -  b0002000.emac0
 23:          0         -  ehci_hcd:usb1
 24:          0         -  ohci_hcd:usb2
 36:        505         -  ttyS0
 37:          0         -  ttyS1
 38:         48         -  ttyS2
 39:          0         -  ttyS4
 41:          0         -  ttyS8
 45:       1219         -  ttyS7
 52:      55973         -  b8006300.spi1
Err:          0
#
diff --git a/drivers/net/ethernet/nuvoton/nuc970_ether0.c b/drivers/net/ethernet/nuvoton/nuc970_ether0.c
index d53f04bb7b7..e2f4267db7d 100755
--- a/drivers/net/ethernet/nuvoton/nuc970_ether0.c
+++ b/drivers/net/ethernet/nuvoton/nuc970_ether0.c
@@ -633,6 +633,7 @@ static int nuc970_ether_close(struct net_device *dev)
 static struct net_device_stats *nuc970_ether_stats(struct net_device *dev)
 {
        struct nuc970_ether *ether;
+       printk("%s\n", __func__);

        ether = netdev_priv(dev);

@@ -644,9 +645,11 @@ static int nuc970_ether_start_xmit(struct sk_buff *skb, struct net_device *dev)
 {
        struct nuc970_ether *ether = netdev_priv(dev);
        struct nuc970_txbd *txbd;
+       printk("%s\n", __func__);

        txbd = ether->tdesc + ether->cur_tx;
        if(txbd->mode & TX_OWEN_DMA) {
+               printk("%s 1\n", __func__);
                netif_stop_queue(dev);
                return NETDEV_TX_BUSY;
        }
@@ -667,6 +670,7 @@ static int nuc970_ether_start_xmit(struct sk_buff *skb, struct net_device *dev)
        txbd = ether->tdesc + ether->cur_tx;
        if(txbd->mode & TX_OWEN_DMA) {
                netif_stop_queue(dev);
+               printk("%s 2\n", __func__);
                //return NETDEV_TX_BUSY;
:
qianfan-Zhao commented 5 years ago

Seems this can solve this problem, I will do more test about this issue.

diff --git a/drivers/net/ethernet/nuvoton/nuc970_ether0.c b/drivers/net/ethernet/nuvoton/nuc970_ether0.c
index d53f04bb7b7..cc8df9e9a04 100755
--- a/drivers/net/ethernet/nuvoton/nuc970_ether0.c
+++ b/drivers/net/ethernet/nuvoton/nuc970_ether0.c
@@ -456,6 +456,9 @@ static void nuc970_return_default_idle(struct net_device *dev)
        val = __raw_readl( REG_MCMDR);
        val |= SWR;
        __raw_writel(val,  REG_MCMDR);
+
+       while (__raw_readl(REG_MCMDR) & SWR)
+               cpu_relax();
 }
yachen commented 5 years ago

Hi,

Clear SW should take effect immediately. This is working on HCLK domain.

Sincerely,

Yi-An Chen

From: qianfan notifications@github.com Sent: Wednesday, April 24, 2019 9:55 PM To: OpenNuvoton/NUC970_Linux_Kernel NUC970_Linux_Kernel@noreply.github.com Cc: MS10 YAChen YAChen@nuvoton.com; Comment comment@noreply.github.com Subject: Re: [OpenNuvoton/NUC970_Linux_Kernel] NUC972 network issue (#37)

Seems this can solve this problem, I will do more test about this issue.

diff --git a/drivers/net/ethernet/nuvoton/nuc970_ether0.c b/drivers/net/ethernet/nuvoton/nuc970_ether0.c

index d53f04bb7b7..cc8df9e9a04 100755

--- a/drivers/net/ethernet/nuvoton/nuc970_ether0.c

+++ b/drivers/net/ethernet/nuvoton/nuc970_ether0.c

@@ -456,6 +456,9 @@ static void nuc970_return_default_idle(struct net_device *dev)

    val = __raw_readl( REG_MCMDR);

    val |= SWR;

    __raw_writel(val,  REG_MCMDR);

+

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenNuvoton_NUC970-5FLinux-5FKernel_issues_37-23issuecomment-2D486242966&d=DwMFaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=-xqZIuygKTnCpc5sQxU42yn-qNCVVLtI_B-qpw_qGk8&s=xFiOg5eGGf--ekAhLS-VcMzEODSyMJUfWHD9KBc9mrQ&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAKCP4QUZ5IRJ5DKG544WD3PSBRCTANCNFSM4HICEOIA&d=DwMFaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=-xqZIuygKTnCpc5sQxU42yn-qNCVVLtI_B-qpw_qGk8&s=9c09jWwEJfRWvbGeJ5xLED1a3pM-L8YA063IQ_ZMoi0&e=.

=========================================================================================== The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

qianfan-Zhao commented 5 years ago

Hi can you reproduce this problem?

qianfan-Zhao commented 5 years ago

@yachen this patch can't solve the problem. what's your opinion about this, software or hardware issue?

yachen commented 5 years ago

Hi,

We’ve seen similar issue before, could be software or hardware issue. By software: Enable LCD in U-Boot but disable LCD in Linux kernel. By hardware: Some PHY is unstable, and can only bring back to normal by power off/on the PHY, a reset cannot bring the PHY back to normal.

Sincerely,

Yi-An Chen From: qianfan notifications@github.com Sent: Thursday, April 25, 2019 9:45 AM To: OpenNuvoton/NUC970_Linux_Kernel NUC970_Linux_Kernel@noreply.github.com Cc: MS10 YAChen YAChen@nuvoton.com; Mention mention@noreply.github.com Subject: Re: [OpenNuvoton/NUC970_Linux_Kernel] NUC972 network issue (#37)

@yachenhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_yachen&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=6Trz_hqx1kLFZ7sSTmqGvw8_QYfJTOk-A2TheYgKzGY&s=9dKy-B3zCiU_lDEmuIR593k6ksiBkG7xf3i2KLkiMpY&e= this patch can't solve the problem. what's your opinion about this, software or hardware issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenNuvoton_NUC970-5FLinux-5FKernel_issues_37-23issuecomment-2D486488083&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=6Trz_hqx1kLFZ7sSTmqGvw8_QYfJTOk-A2TheYgKzGY&s=0yPJrWSdQKUuniAHpTQXcQjCUckTdFURpyxYJFamVQI&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAKCP4RFLHDWNANWMWOLH2LPSEEH7ANCNFSM4HICEOIA&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=6Trz_hqx1kLFZ7sSTmqGvw8_QYfJTOk-A2TheYgKzGY&s=0ktfSEhijjIf4dI8r5kG1umrYRk40zJ44uFkxWgf62Q&e=.

=========================================================================================== The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

qianfan-Zhao commented 5 years ago

My board has a ti dp83822 phy and the linux kernel can detect cable inserted and plugged when this issue happens. So i don't think this is a bug of PHY.

yachen commented 5 years ago

Hi,

Please check the REFCLK (50MHz) signal and U-Boot LCD configuration. Both could cause Tx/Rx interrupt count stays at 0.

Sincerely,

Yi-An Chen

From: qianfan notifications@github.com Sent: Thursday, April 25, 2019 11:12 AM To: OpenNuvoton/NUC970_Linux_Kernel NUC970_Linux_Kernel@noreply.github.com Cc: MS10 YAChen YAChen@nuvoton.com; Mention mention@noreply.github.com Subject: Re: [OpenNuvoton/NUC970_Linux_Kernel] NUC972 network issue (#37)

My board has a ti dp83822 phy and the linux kernel can detect cable plugin and plugged when this issue happens. So i don't think this is a bug of PHY.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenNuvoton_NUC970-5FLinux-5FKernel_issues_37-23issuecomment-2D486504008&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=sDq54BjB19xjiNgSHJXPJz4wHQ35o2yAkH8R542pPUg&s=A4ixBvaKxoxfS9aH21PsqG8HKfCN1AdgQno_ocVsCjA&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAKCP4UKS67MSN3UQFN2GNTPSEOPLANCNFSM4HICEOIA&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=sDq54BjB19xjiNgSHJXPJz4wHQ35o2yAkH8R542pPUg&s=Q7BBDx7HQexpKeLy0tGKquJp3muDyAgEg2LbcLPDqZE&e=.

=========================================================================================== The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

qianfan-Zhao commented 5 years ago

thanks for yours guide and i will do a test

qianfan-Zhao commented 5 years ago

@yachen Hi I had checked the hardware and the 50M refclock is OK, reset PHY doesn't make the network work again.

I will check the LCD configuration in uboot.

qianfan-Zhao commented 5 years ago

@yachen do you have any idea about why enable LCD in uboot could cause network failed?

yachen commented 5 years ago

Yes we know the reason. LCD and EMAC0 are connect to the same AHB bus. And LCD can only be disabled in certain time window otherwise it can lock itself and every peripheral on this AHB bus.

Sincerely,

Yi-An Chen From: qianfan notifications@github.com Sent: Thursday, April 25, 2019 3:33 PM To: OpenNuvoton/NUC970_Linux_Kernel NUC970_Linux_Kernel@noreply.github.com Cc: MS10 YAChen YAChen@nuvoton.com; Mention mention@noreply.github.com Subject: Re: [OpenNuvoton/NUC970_Linux_Kernel] NUC972 network issue (#37)

@yachenhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_yachen&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=AMFy4A0UrKoZv744XVPJY1A_hMtz2VQbpZ_DKxGhhQQ&s=TDAeDWv3qW6kpr17LyDcSy5FZdj7_PJslnQjHHWsGeQ&e= do you have any idea about why enable LCD in uboot could cause network failed?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenNuvoton_NUC970-5FLinux-5FKernel_issues_37-23issuecomment-2D486553557&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=AMFy4A0UrKoZv744XVPJY1A_hMtz2VQbpZ_DKxGhhQQ&s=2mgbFWrrG7R4bJOgvK2LMapB_rYEgGhIpGN3XQes8jE&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAKCP4UCFMESSEYEBOOOYA3PSFNEDANCNFSM4HICEOIA&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=AMFy4A0UrKoZv744XVPJY1A_hMtz2VQbpZ_DKxGhhQQ&s=Bhyfkmsq7xVlK4MCcfNsEUSQV-z13TEn_xUp5B2w9ng&e=.

=========================================================================================== The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

qianfan-Zhao commented 5 years ago

@yachen What's the correct time window for disable the LCD? Is there has other documents for this?

yachen commented 5 years ago

When LCD is not fetching data from DDR. For example right after VSYNC(DCCS[28]) set 1.

Sincerely,

Yi-An Chen From: qianfan notifications@github.com Sent: Thursday, April 25, 2019 4:31 PM To: OpenNuvoton/NUC970_Linux_Kernel NUC970_Linux_Kernel@noreply.github.com Cc: MS10 YAChen YAChen@nuvoton.com; Mention mention@noreply.github.com Subject: Re: [OpenNuvoton/NUC970_Linux_Kernel] NUC972 network issue (#37)

@yachenhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_yachen&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=u94deyhaCn5ox3Ct4POiVaLpuEtR2bSndZMANNp8-6Q&s=Wc7qVhfGvz3QjlvH5ejnT8NRE2bCVwVl5nnwejzqmtY&e= What's the correct time window for disable the LCD? Is there has other documents for this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenNuvoton_NUC970-5FLinux-5FKernel_issues_37-23issuecomment-2D486571898&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=u94deyhaCn5ox3Ct4POiVaLpuEtR2bSndZMANNp8-6Q&s=KJp0H_GyiBEdg49YRGvOQxbIq9VtQj8-aUC0rUDga6A&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAKCP4UOPFVQ4EGVO4WA4YTPSFT5JANCNFSM4HICEOIA&d=DwMCaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=u94deyhaCn5ox3Ct4POiVaLpuEtR2bSndZMANNp8-6Q&s=2B9CehIJ_s8r6p2Hd2PbDCtCETTn6AFHqH94jOHPob4&e=.

=========================================================================================== The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

qianfan-Zhao commented 5 years ago

@yachen

When LCD is not fetching data from DDR. For example right after VSYNC(DCCS[28]) set 1.

If so, means if I enabled LCD in uboot but disabled in linux, this will reproduce this issue 100% ?

I tested this PR (waiting reset done) on multiple boards, but the result is strange. 2 boards seems got fixed and the other two still have this problem.

yachen commented 5 years ago

Hi,

No. Not 100%, LCD is not always fetching data from DDR out of VSYNC period. Is there a panel on your system?

Sincerely,

Yi-An Chen

From: qianfan notifications@github.com Sent: Thursday, April 25, 2019 7:14 PM To: OpenNuvoton/NUC970_Linux_Kernel NUC970_Linux_Kernel@noreply.github.com Cc: MS10 YAChen YAChen@nuvoton.com; Mention mention@noreply.github.com Subject: Re: [OpenNuvoton/NUC970_Linux_Kernel] NUC972 network issue (#37)

@yachenhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_yachen&d=DwMFaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=JrKproOTDsRvkSUXd63tR2GSP0-zWUKNyDFhWxcTIuk&s=iqTZG5Ju49psUOn0vN_L_Xej562L4gGZw3dteGBDWQg&e=

When LCD is not fetching data from DDR. For example right after VSYNC(DCCS[28]) set 1.

If so, means if I enabled LCD in uboot but disabled in linux, this will reproduce this issue 100% ?

I tested this PR (waiting reset done) on multiple boards, but the result is strange. 2 boards seems got fixed and the other two still have this problem.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_OpenNuvoton_NUC970-5FLinux-5FKernel_issues_37-23issuecomment-2D486630142&d=DwMFaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=JrKproOTDsRvkSUXd63tR2GSP0-zWUKNyDFhWxcTIuk&s=lI5Ix3DPnelP-IfCK6CAImF5NsgYLnydjuv0bQ9kXKQ&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AAKCP4RQIJGZPSNWIL6DK33PSGG6XANCNFSM4HICEOIA&d=DwMFaQ&c=ue8mO8zgC4VZ4q_aNVKt8G9MC01UFDmisvMR1k-EoDM&r=yA-2gk543Dr0X9PvbYhMvIWU6V8uKB-QK7a4h58mCfM&m=JrKproOTDsRvkSUXd63tR2GSP0-zWUKNyDFhWxcTIuk&s=kqDfZS5b63s-TExMdhjpPSCwN6Nd_rJDtBK3Gj2L6Ls&e=.

=========================================================================================== The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

qianfan-Zhao commented 5 years ago

No, we don't have a LCD on board. I use the default u-boot configuration and with LCD enabaled(nuc972_defconfig enabled lcd by default).

I am testing u-boot with LCD disabled.

yachen commented 5 years ago

So you're still seeing EMAC not functioning after disable LCD driver in U-Boot? Can you dump register at 0xF0002200, 0xF0002204, 0xF0002208, and 0xF000220C when the problem occurs? Thanks. (Note: These are virtual address in kernel space)

Sincerely,

Yi-An Chen

qianfan-Zhao commented 5 years ago

I am testing now, seems it is fixed on my board.

I will tested this on the others boards and see if this issue is really fixed.

qianfan-Zhao commented 5 years ago

the issue doesn't happen again when i remove CONFIG_LCD in uboot.

@yachen thanks

yachen commented 5 years ago

No problem. I'll close this issue since it's solved.