1
0
Fork 0
alistair23-linux/drivers/net
Niklas Cassel 1e88f6e01b net: stmmac: make dwmac4_release_tx_desc() clear all descriptor fields
Make dwmac4_release_tx_desc() clear all descriptor fields, not just
TDES2 and TDES3.

I'm suspecting that TDES0 and TDES1 wasn't cleared because the DMA
engine uses them to store the tx hardware timestamp (if PTP is enabled).

However, stmmac_tx_clean() calls stmmac_get_tx_hwtstamp(), which reads
and saves the timestamp, before it calls release_tx_desc(), so this
is not an issue.

stmmac_xmit() and stmmac_tso_xmit() both always overwrite TDES0,
however, stmmac_tso_xmit() sometimes sets TDES1, and since neither
stmmac_xmit() nor stmmac_tso_xmit() explicitly clears TDES1, both
functions might reuse a DMA descriptor with old TDES1 data.

I haven't observed any misbehavior even though TDES1 sometimes
point to an old skb, however, explicitly clearing both TDES0 and TDES1
in dwmac4_release_tx_desc() minimizes the chances of undefined behavior.

Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-27 14:28:10 -05:00
..
appletalk
arcnet
bonding net: Convert bond_net_ops 2018-02-27 11:01:36 -05:00
caif net: caif: remove redundant re-assignment of pointer pfrm 2018-01-22 10:51:56 -05:00
can can: migrate documentation to restructured text 2018-01-26 10:46:44 +01:00
cris
dsa net: dsa: mv88e6xxx: Poll when no interrupt defined 2018-02-26 11:28:10 -05:00
ethernet net: stmmac: make dwmac4_release_tx_desc() clear all descriptor fields 2018-02-27 14:28:10 -05:00
fddi
fjes
hamradio
hippi hippi: Fix a Fix a possible sleep-in-atomic bug in rr_close 2017-12-13 14:52:57 -05:00
hyperv hv_netvsc: Use the num_online_cpus() for channel limit 2018-01-22 16:24:08 -05:00
ieee802154 ieee802154: Add NXP MCR20A IEEE 802.15.4 transceiver driver 2018-02-21 09:08:39 +01:00
ipvlan net: Convert ipvlan_net_ops 2018-02-27 11:01:38 -05:00
netdevsim netdevsim: fix overflow on the error path 2018-02-01 11:22:51 +01:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-02-19 18:46:11 -05:00
plip
ppp net: Convert ppp_net_ops 2018-02-27 11:01:37 -05:00
slip slip: sl_alloc(): remove unused parameter "dev_t line" 2017-12-08 14:41:02 -05:00
team
usb smsc75xx: fix smsc75xx_set_features() 2018-02-22 14:05:15 -05:00
vmxnet3 vmxnet3: remove redundant initialization of pointer 'rq' 2018-02-01 14:54:28 -05:00
wan Merge branch 'misc.poll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-01-30 17:58:07 -08:00
wimax treewide: Use DEVICE_ATTR_WO 2018-01-09 16:34:35 +01:00
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-02-24 00:04:20 -05:00
xen-netback xen-netback: make function xenvif_rx_skb static 2018-02-26 11:36:54 -05:00
Kconfig ipvlan: fix building with modular IPV6 2018-02-27 10:37:14 -05:00
LICENSE.SRC
Makefile netdevsim: add software driver for testing offloads 2017-12-03 00:27:57 +01:00
Space.c net/mac8390: Convert to nubus_driver 2018-02-21 14:14:05 -05:00
dummy.c net: dummy: remove fake SR-IOV functionality 2017-12-03 00:27:58 +01:00
eql.c
geneve.c net: Convert geneve_net_ops 2018-02-27 11:01:36 -05:00
gtp.c net: Convert gtp_net_ops 2018-02-27 11:01:37 -05:00
ifb.c
loopback.c net: Convert loopback_net_ops 2018-02-13 10:36:09 -05:00
macsec.c macsec: restore uAPI after addition of GCM-AES-256 2018-01-22 15:40:16 -05:00
macvlan.c macvlan: fix use-after-free in macvlan_common_newlink() 2018-02-23 10:48:10 -05:00
macvtap.c
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
thunderbolt.c net: thunderbolt: Run disconnect flow asynchronously when logout is received 2018-02-12 12:03:04 -05:00
tun.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-02-19 18:46:11 -05:00
veth.c veth: set peer GSO values 2017-12-08 14:22:59 -05:00
virtio_net.c virtio_net: fix ndo_xdp_xmit crash towards dev not ready for XDP 2018-02-21 15:09:29 -05:00
vrf.c net: Convert simple pernet_operations 2018-02-27 11:01:35 -05:00
vsockmon.c
vxlan.c net: Convert vxlan_net_ops 2018-02-27 11:01:37 -05:00
xen-netfront.c xen-netfront: Fix race between device setup and open 2018-02-06 09:55:40 +01:00