linux-uconsole/drivers/net
Florian Fainelli cff88ba2a0 net: systemport: Rewrite __bcm_sysport_tx_reclaim()
[ Upstream commit 484d802d0f ]

There is no need for complex checking between the last consumed index
and current consumed index, a simple subtraction will do.

This also eliminates the possibility of a permanent transmit queue stall
under the following conditions:

- one CPU bursts ring->size worth of traffic (up to 256 buffers), to the
  point where we run out of free descriptors, so we stop the transmit
  queue at the end of bcm_sysport_xmit()

- because of our locking, we have the transmit process disable
  interrupts which means we can be blocking the TX reclamation process

- when TX reclamation finally runs, we will be computing the difference
  between ring->c_index (last consumed index by SW) and what the HW
  reports through its register

- this register is masked with (ring->size - 1) = 0xff, which will lead
  to stripping the upper bits of the index (register is 16-bits wide)

- we will be computing last_tx_cn as 0, which means there is no work to
  be done, and we never wake-up the transmit queue, leaving it
  permanently disabled

A practical example is e.g: ring->c_index aka last_c_index = 12, we
pushed 256 entries, HW consumer index = 268, we mask it with 0xff = 12,
so last_tx_cn == 0, nothing happens.

Fixes: 80105befdb ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-31 18:12:34 +02:00
..
appletalk net/appletalk: Fix kernel memory disclosure 2017-12-09 18:42:42 +01:00
arcnet
bonding bonding: refine bond_fold_stats() wrap detection 2018-03-22 09:23:22 +01:00
caif net: caif: check return value of alloc_netdev 2015-11-09 11:31:13 -05:00
can can: cc770: Fix use after free in cc770_tx_interrupt() 2018-03-28 18:40:16 +02:00
cris
dsa net: dsa: bcm_sf2: Ensure we re-negotiate EEE during after link change 2016-12-10 19:07:23 +01:00
ethernet net: systemport: Rewrite __bcm_sysport_tx_reclaim() 2018-03-31 18:12:34 +02:00
fddi
fjes fjes: Fix wrong netdevice feature flags 2017-12-20 10:04:55 +01:00
hamradio NET: mkiss: Fix panic 2017-06-17 06:39:35 +02:00
hippi hippi: Fix a Fix a possible sleep-in-atomic bug in rr_close 2018-02-25 11:03:42 +01:00
hyperv hv_netvsc: use skb_get_hash() instead of a homegrown implementation 2017-03-26 12:13:18 +02:00
ieee802154 fakelb: fix schedule while atomic 2017-03-15 09:57:15 +08:00
ipvlan ipvlan: add L2 check for packets arriving via virtual devices 2018-03-22 09:23:30 +01:00
irda irda: vlsi_ir: fix check for DMA mapping errors 2017-12-25 14:22:12 +01:00
phy mdio-sun4i: Fix a memory leak 2018-03-03 10:19:45 +01:00
plip
ppp ppp: prevent unregistered channels from connecting to PPP units 2018-03-11 16:19:46 +01:00
slip
team team: Fix double free in error path 2018-03-31 18:12:34 +02:00
usb USB: cdc_subset: only build when one driver is enabled 2018-02-25 11:03:47 +01:00
vmxnet3 vmxnet3: repair memory leak 2018-01-31 12:06:13 +01:00
wan wan: pc300too: abort path on failure 2018-03-24 10:58:43 +01:00
wimax net: wimax/i2400m: fix NULL-deref at probe 2017-12-20 10:04:54 +01:00
wireless rtlwifi: rtl8723be: Fix loss of signal 2018-03-28 18:40:15 +02:00
xen-netback xen/netback: set default upper limit of tx/rx queues to 8 2017-11-15 17:13:09 +01:00
dummy.c
eql.c
geneve.c geneve: avoid use-after-free of skb->data 2016-12-10 19:07:24 +01:00
ifb.c
Kconfig vmxnet3: prevent building with 64K pages 2018-02-25 11:03:42 +01:00
LICENSE.SRC
loopback.c net: introduce device min_header_len 2017-02-18 16:39:27 +01:00
macvlan.c macvlan: Only deliver one copy of the frame to the macvlan interface 2017-12-20 10:05:01 +01:00
macvtap.c tun/tap: sanitize TUNSETSNDBUF input 2017-11-18 11:11:05 +01:00
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c rapidio/rionet: fix deadlock on SMP 2016-04-12 09:08:58 -07:00
sb1000.c
Space.c
sungem_phy.c
tun.c tun: allow positive return values on dev_get_valid_name() call 2017-11-18 11:11:06 +01:00
veth.c veth: set peer GSO values 2018-03-22 09:23:29 +01:00
virtio_net.c virtio_net: fix PAGE_SIZE > 64k 2017-07-05 14:37:19 +02:00
vrf.c vrf: fix bug_on triggered by rx when destroying a vrf 2017-07-21 07:44:55 +02:00
vxlan.c vxlan: vxlan dev should inherit lowerdev's gso_max_size 2018-03-22 09:23:23 +01:00
xen-netfront.c xen-netfront: enable device after manual module load 2018-03-03 10:19:45 +01:00