bianbu-linux-6.6/drivers/net/ethernet/cisco/enic
Govindarajulu Varadarajan 9fe1c98ac9 enic: fix rq disable
When MTU is changed from 9000 to 1500 while there is burst of inbound 9000
bytes packets, adaptor sometimes delivers 9000 bytes packets to 1500 bytes
buffers. This causes memory corruption and sometimes crash.

This is because of a race condition in adaptor between "RQ disable"
clearing descriptor mini-cache and mini-cache valid bit being set by
completion of descriptor fetch. This can result in stale RQ desc being
cached and used when packets arrive. In this case, the stale descriptor
have old MTU value.

Solution is to write RQ->disable twice. The first write will stop any
further desc fetches, allowing the second disable to clear the mini-cache
valid bit without danger of a race.

Also, the check for rq->running becoming 0 after writing rq->enable to 0
is not done properly. When incoming packets are flooding the interface,
rq->running will pulse high for each dropped packet. Since the driver was
waiting for 10us between each poll, it is possible to see rq->running = 1
1000 times in a row, even though it is not actually stuck running.
This results in false failure of vnic_rq_disable(). Fix is to try more
than 1000 time without delay between polls to ensure we do not miss when
running goes low.

In old adaptors rq->enable needs to be re-written to 0 when posted_index
is reset in vnic_rq_clean() in order to keep rq->prefetch_index in sync.

Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-10-29 17:23:39 -04:00
..
cq_desc.h
cq_enet_desc.h enic: Fix endianness bug. 2012-02-24 17:53:03 -05:00
enic.h cisco: enic: Update logging macros and uses 2016-03-11 15:07:48 -05:00
enic_api.c enic: fix lockdep around devcmd_lock 2014-06-23 14:32:19 -07:00
enic_api.h drivers/net: enic: Add an interface for USNIC to interact with firmware 2013-08-20 13:41:01 -07:00
enic_clsf.c flow_dissector: Add flags argument to skb_flow_dissector functions 2015-09-01 15:06:22 -07:00
enic_clsf.h enic: Add ethtool support to show classifier filters added by the driver 2014-07-21 20:22:46 -07:00
enic_dev.c net: ethernet: cisco: enic: enic_dev: Remove some unused functions 2015-01-02 16:36:08 -05:00
enic_dev.h net: ethernet: cisco: enic: enic_dev: Remove some unused functions 2015-01-02 16:36:08 -05:00
enic_ethtool.c net: ethernet: enic: move to new ethtool api {get|set}_link_ksettings 2016-06-14 17:16:14 -04:00
enic_main.c net: enic: use correct type specifier 2016-08-01 13:32:52 -07:00
enic_pp.c net: enic: slight optimization of addr compare 2013-12-31 16:48:31 -05:00
enic_pp.h
enic_res.c enic: Add Accelerated RFS support 2014-06-23 14:32:19 -07:00
enic_res.h drivers/net: enic: Adding support for Cisco Low Latency NIC 2013-08-20 13:41:01 -07:00
Kconfig net: Remove bogus dependencies on INET 2012-11-19 19:13:59 -05:00
Makefile enic: devcmd for adding IP 5 tuple hardware filters 2014-06-23 14:32:19 -07:00
rq_enet_desc.h
vnic_cq.c cisco: enic: Update logging macros and uses 2016-03-11 15:07:48 -05:00
vnic_cq.h enic: Add support for adaptive interrupt coalescing 2014-05-21 17:04:13 -04:00
vnic_dev.c cisco: enic: Update logging macros and uses 2016-03-11 15:07:48 -05:00
vnic_dev.h enic: do hang reset only in case of tx timeout 2015-10-05 03:51:35 -07:00
vnic_devcmd.h enic: add devcmd2 2015-08-17 15:25:29 -07:00
vnic_enet.h enic: Add Accelerated RFS support 2014-06-23 14:32:19 -07:00
vnic_intr.c cisco: enic: Update logging macros and uses 2016-03-11 15:07:48 -05:00
vnic_intr.h
vnic_nic.h
vnic_resource.h enic: add devcmd2 resources 2015-08-17 15:25:29 -07:00
vnic_rq.c enic: fix rq disable 2016-10-29 17:23:39 -04:00
vnic_rq.h enic: use atomic_t instead of spin_lock in busy poll 2015-06-25 05:23:01 -07:00
vnic_rss.h enic: use netdev_rss_key_fill() helper 2014-11-23 21:01:42 -05:00
vnic_stats.h enic: add stats for dma mapping error 2014-12-31 13:08:45 -05:00
vnic_vic.c
vnic_vic.h
vnic_wq.c cisco: enic: Update logging macros and uses 2016-03-11 15:07:48 -05:00
vnic_wq.h enic: reduce ioread in devcmd2 2015-08-25 16:05:48 -07:00
wq_enet_desc.h