Commit ba9adbe6 authored by Guo-Fu Tseng's avatar Guo-Fu Tseng Committed by David S. Miller

jme: Fix FIFO flush issue

Set the RX FIFO flush watermark lower.
According to Federico and JMicron's reply,
setting it to 16QW would be stable on most platforms.
Otherwise, user might experience packet drop issue.

CC: stable@kernel.org
Reported-by: default avatarFederico Quagliata <federico@quagliata.org>
Fixed-by: default avatarFederico Quagliata <federico@quagliata.org>
Signed-off-by: default avatarGuo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 597cdbc2
...@@ -2328,19 +2328,11 @@ jme_change_mtu(struct net_device *netdev, int new_mtu) ...@@ -2328,19 +2328,11 @@ jme_change_mtu(struct net_device *netdev, int new_mtu)
((new_mtu) < IPV6_MIN_MTU)) ((new_mtu) < IPV6_MIN_MTU))
return -EINVAL; return -EINVAL;
if (new_mtu > 4000) {
jme->reg_rxcs &= ~RXCS_FIFOTHNP;
jme->reg_rxcs |= RXCS_FIFOTHNP_64QW;
jme_restart_rx_engine(jme);
} else {
jme->reg_rxcs &= ~RXCS_FIFOTHNP;
jme->reg_rxcs |= RXCS_FIFOTHNP_128QW;
jme_restart_rx_engine(jme);
}
netdev->mtu = new_mtu; netdev->mtu = new_mtu;
netdev_update_features(netdev); netdev_update_features(netdev);
jme_restart_rx_engine(jme);
jme_reset_link(jme); jme_reset_link(jme);
return 0; return 0;
......
...@@ -730,7 +730,7 @@ enum jme_rxcs_values { ...@@ -730,7 +730,7 @@ enum jme_rxcs_values {
RXCS_RETRYCNT_60 = 0x00000F00, RXCS_RETRYCNT_60 = 0x00000F00,
RXCS_DEFAULT = RXCS_FIFOTHTP_128T | RXCS_DEFAULT = RXCS_FIFOTHTP_128T |
RXCS_FIFOTHNP_128QW | RXCS_FIFOTHNP_16QW |
RXCS_DMAREQSZ_128B | RXCS_DMAREQSZ_128B |
RXCS_RETRYGAP_256ns | RXCS_RETRYGAP_256ns |
RXCS_RETRYCNT_32, RXCS_RETRYCNT_32,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment