OpenCloudOS-Kernel/drivers/net
Florian Fainelli 484d802d0f net: systemport: Rewrite __bcm_sysport_tx_reclaim()
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>
2018-03-16 11:16:55 -04:00
..
appletalk
arcnet
bonding net: bonding: Replace mac address parsing 2017-12-20 12:47:29 -05:00
caif net: caif: remove redundant re-assignment of pointer pfrm 2018-01-22 10:51:56 -05:00
can can: cc770: Fix queue stall & dropped RTR reply 2018-03-14 13:01:22 +01:00
cris
dsa net: dsa: b53: Use strlcpy() for ethtool::get_strings 2018-03-06 11:12:39 -05:00
ethernet net: systemport: Rewrite __bcm_sysport_tx_reclaim() 2018-03-16 11:16:55 -04: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: fix locking during VF setup 2018-03-08 12:48:57 -05:00
ieee802154 vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
ipvlan ipvlan: remove excessive packet scrubbing 2017-12-15 11:36:53 -05:00
netdevsim netdevsim: fix overflow on the error path 2018-02-01 11:22:51 +01:00
phy net: phy: Tell caller result of phy_change() 2018-03-12 10:33:07 -04:00
plip
ppp ppp: prevent unregistered channels from connecting to PPP units 2018-03-04 18:43:44 -05:00
slip slip: sl_alloc(): remove unused parameter "dev_t line" 2017-12-08 14:41:02 -05:00
team team: Fix double free in error path 2018-03-08 11:19:52 -05:00
usb net: usbnet: fix potential deadlock on 32bit hosts 2018-03-07 11:46:39 -05:00
vmxnet3 vmxnet3: remove redundant initialization of pointer 'rq' 2018-02-01 14:54:28 -05:00
wan hdlc_ppp: carrier detect ok, don't turn off negotiation 2018-02-26 14:38:12 -05:00
wimax treewide: Use DEVICE_ATTR_WO 2018-01-09 16:34:35 +01:00
wireless wireless-drivers fixes for 4.16 2018-03-08 11:44:04 -05:00
xen-netback xen-netback: Fix logging message with spurious period after newline 2017-12-06 15:10:32 -05:00
Kconfig netdevsim: add software driver for testing offloads 2017-12-03 00:27:57 +01:00
LICENSE.SRC
Makefile netdevsim: add software driver for testing offloads 2017-12-03 00:27:57 +01:00
Space.c
dummy.c net: dummy: remove fake SR-IOV functionality 2017-12-03 00:27:58 +01:00
eql.c
geneve.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-01-29 10:15:51 -05:00
gtp.c
ifb.c
loopback.c
macsec.c macsec: restore uAPI after addition of GCM-AES-256 2018-01-22 15:40:16 -05:00
macvlan.c macvlan: filter out unsupported feature flags 2018-03-11 22:46:16 -04: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 vhost_net: examine pointer types during un-producing 2018-03-09 12:02:59 -05:00
veth.c veth: set peer GSO values 2017-12-08 14:22:59 -05:00
virtio_net.c virtio-net: re enable XDP_REDIRECT for mergeable buffer 2018-03-04 22:16:36 -05:00
vrf.c net: vrf: Add support for sends to local broadcast address 2018-01-25 21:51:03 -05:00
vsockmon.c
vxlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-01-29 10:15:51 -05:00
xen-netfront.c xen-netfront: Fix hang on device removal 2018-02-28 20:20:08 +01:00