Loading drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +10 −4 Original line number Diff line number Diff line Loading @@ -721,8 +721,11 @@ static u32 stmmac_usec2riwt(u32 usec, struct stmmac_priv *priv) { unsigned long clk = clk_get_rate(priv->plat->stmmac_clk); if (!clk) { clk = priv->plat->clk_ref_rate; if (!clk) return 0; } return (usec * (clk / 1000000)) / 256; } Loading @@ -731,8 +734,11 @@ static u32 stmmac_riwt2usec(u32 riwt, struct stmmac_priv *priv) { unsigned long clk = clk_get_rate(priv->plat->stmmac_clk); if (!clk) { clk = priv->plat->clk_ref_rate; if (!clk) return 0; } return (riwt * 256) / (clk / 1000000); } Loading drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +13 −4 Original line number Diff line number Diff line Loading @@ -3023,11 +3023,23 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev) tx_q = &priv->tx_queue[queue]; if (priv->tx_path_in_lpi_mode) stmmac_disable_eee_mode(priv); /* Manage oversized TCP frames for GMAC4 device */ if (skb_is_gso(skb) && priv->tso) { if (skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)) if (skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)) { /* * There is no way to determine the number of TSO * capable Queues. Let's use always the Queue 0 * because if TSO is supported then at least this * one will be capable. */ skb_set_queue_mapping(skb, 0); return stmmac_tso_xmit(skb, dev); } } if (unlikely(stmmac_tx_avail(priv, queue) < nfrags + 1)) { if (!netif_tx_queue_stopped(netdev_get_tx_queue(dev, queue))) { Loading @@ -3041,9 +3053,6 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev) return NETDEV_TX_BUSY; } if (priv->tx_path_in_lpi_mode) stmmac_disable_eee_mode(priv); entry = tx_q->cur_tx; first_entry = entry; WARN_ON(tx_q->tx_skbuff[first_entry]); Loading include/linux/stmmac.h +1 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,7 @@ struct plat_stmmacenet_data { struct clk *pclk; struct clk *clk_ptp_ref; unsigned int clk_ptp_rate; unsigned int clk_ref_rate; struct reset_control *stmmac_rst; struct stmmac_axi *axi; int has_gmac4; Loading Loading
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +10 −4 Original line number Diff line number Diff line Loading @@ -721,8 +721,11 @@ static u32 stmmac_usec2riwt(u32 usec, struct stmmac_priv *priv) { unsigned long clk = clk_get_rate(priv->plat->stmmac_clk); if (!clk) { clk = priv->plat->clk_ref_rate; if (!clk) return 0; } return (usec * (clk / 1000000)) / 256; } Loading @@ -731,8 +734,11 @@ static u32 stmmac_riwt2usec(u32 riwt, struct stmmac_priv *priv) { unsigned long clk = clk_get_rate(priv->plat->stmmac_clk); if (!clk) { clk = priv->plat->clk_ref_rate; if (!clk) return 0; } return (riwt * 256) / (clk / 1000000); } Loading
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +13 −4 Original line number Diff line number Diff line Loading @@ -3023,11 +3023,23 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev) tx_q = &priv->tx_queue[queue]; if (priv->tx_path_in_lpi_mode) stmmac_disable_eee_mode(priv); /* Manage oversized TCP frames for GMAC4 device */ if (skb_is_gso(skb) && priv->tso) { if (skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)) if (skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)) { /* * There is no way to determine the number of TSO * capable Queues. Let's use always the Queue 0 * because if TSO is supported then at least this * one will be capable. */ skb_set_queue_mapping(skb, 0); return stmmac_tso_xmit(skb, dev); } } if (unlikely(stmmac_tx_avail(priv, queue) < nfrags + 1)) { if (!netif_tx_queue_stopped(netdev_get_tx_queue(dev, queue))) { Loading @@ -3041,9 +3053,6 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev) return NETDEV_TX_BUSY; } if (priv->tx_path_in_lpi_mode) stmmac_disable_eee_mode(priv); entry = tx_q->cur_tx; first_entry = entry; WARN_ON(tx_q->tx_skbuff[first_entry]); Loading
include/linux/stmmac.h +1 −0 Original line number Diff line number Diff line Loading @@ -184,6 +184,7 @@ struct plat_stmmacenet_data { struct clk *pclk; struct clk *clk_ptp_ref; unsigned int clk_ptp_rate; unsigned int clk_ref_rate; struct reset_control *stmmac_rst; struct stmmac_axi *axi; int has_gmac4; Loading