diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-06-28 08:24:37 +0800 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-06-28 08:24:37 +0800 | 
| commit | c84afab02c311b08b5cb8ea758cc177f81c95d11 (patch) | |
| tree | 6ef80077188ee8ace092e1f740f4712c5a520484 /drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |
| parent | 249155c20f9b0754bc1b932a33344cfb4e0c2101 (diff) | |
| parent | 89ed5b519004a7706f50b70f611edbd3aaacff2c (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
 1) Fix ppp_mppe crypto soft dependencies, from Takashi Iawi.
 2) Fix TX completion to be finite, from Sergej Benilov.
 3) Use register_pernet_device to avoid a dst leak in tipc, from Xin
    Long.
 4) Double free of TX cleanup in Dirk van der Merwe.
 5) Memory leak in packet_set_ring(), from Eric Dumazet.
 6) Out of bounds read in qmi_wwan, from Bjørn Mork.
 7) Fix iif used in mcast/bcast looped back packets, from Stephen
    Suryaputra.
 8) Fix neighbour resolution on raw ipv6 sockets, from Nicolas Dichtel.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (25 commits)
  af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET
  sctp: change to hold sk after auth shkey is created successfully
  ipv6: fix neighbour resolution with raw socket
  ipv6: constify rt6_nexthop()
  net: dsa: microchip: Use gpiod_set_value_cansleep()
  net: aquantia: fix vlans not working over bridged network
  ipv4: reset rt_iif for recirculated mcast/bcast out pkts
  team: Always enable vlan tx offload
  net/smc: Fix error path in smc_init
  net/smc: hold conns_lock before calling smc_lgr_register_conn()
  bonding: Always enable vlan tx offload
  net/ipv6: Fix misuse of proc_dointvec "skip_notify_on_dev_down"
  ipv4: Use return value of inet_iif() for __raw_v4_lookup in the while loop
  qmi_wwan: Fix out-of-bounds read
  tipc: check msg->req data len in tipc_nl_compat_bearer_disable
  net: macb: do not copy the mac address if NULL
  net/packet: fix memory leak in packet_set_ring()
  net/tls: fix page double free on TX cleanup
  net/sched: cbs: Fix error path of cbs_module_init
  tipc: change to use register_pernet_device
  ...
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c')
| -rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 22 | 
1 files changed, 14 insertions, 8 deletions
| diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 06dd51f47cfd..06358fe5b245 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -2947,12 +2947,15 @@ static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev)  	/* Manage tx mitigation */  	tx_q->tx_count_frames += nfrags + 1; -	if (priv->tx_coal_frames <= tx_q->tx_count_frames) { +	if (likely(priv->tx_coal_frames > tx_q->tx_count_frames) && +	    !(priv->synopsys_id >= DWMAC_CORE_4_00 && +	    (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) && +	    priv->hwts_tx_en)) { +		stmmac_tx_timer_arm(priv, queue); +	} else { +		tx_q->tx_count_frames = 0;  		stmmac_set_tx_ic(priv, desc);  		priv->xstats.tx_set_ic_bit++; -		tx_q->tx_count_frames = 0; -	} else { -		stmmac_tx_timer_arm(priv, queue);  	}  	skb_tx_timestamp(skb); @@ -3166,12 +3169,15 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)  	 * element in case of no SG.  	 */  	tx_q->tx_count_frames += nfrags + 1; -	if (priv->tx_coal_frames <= tx_q->tx_count_frames) { +	if (likely(priv->tx_coal_frames > tx_q->tx_count_frames) && +	    !(priv->synopsys_id >= DWMAC_CORE_4_00 && +	    (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) && +	    priv->hwts_tx_en)) { +		stmmac_tx_timer_arm(priv, queue); +	} else { +		tx_q->tx_count_frames = 0;  		stmmac_set_tx_ic(priv, desc);  		priv->xstats.tx_set_ic_bit++; -		tx_q->tx_count_frames = 0; -	} else { -		stmmac_tx_timer_arm(priv, queue);  	}  	skb_tx_timestamp(skb); | 
