WSL2-Linux-Kernel/drivers/net/arcnet
Ahmed S. Darwish 01365633bd net: arcnet: Fix RESET flag handling
The main arcnet interrupt handler calls arcnet_close() then
arcnet_open(), if the RESET status flag is encountered.

This is invalid:

  1) In general, interrupt handlers should never call ->ndo_stop() and
     ->ndo_open() functions. They are usually full of blocking calls and
     other methods that are expected to be called only from drivers
     init and exit code paths.

  2) arcnet_close() contains a del_timer_sync(). If the irq handler
     interrupts the to-be-deleted timer, del_timer_sync() will just loop
     forever.

  3) arcnet_close() also calls tasklet_kill(), which has a warning if
     called from irq context.

  4) For device reset, the sequence "arcnet_close(); arcnet_open();" is
     not complete.  Some children arcnet drivers have special init/exit
     code sequences, which then embed a call to arcnet_open() and
     arcnet_close() accordingly. Check drivers/net/arcnet/com20020.c.

Run the device RESET sequence from a scheduled workqueue instead.

Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20210128194802.727770-1-a.darwish@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-29 20:54:06 -08:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
arc-rawmode.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
arc-rimi.c net: arcnet: Fix RESET flag handling 2021-01-29 20:54:06 -08:00
arcdevice.h net: arcnet: Fix RESET flag handling 2021-01-29 20:54:06 -08:00
arcnet.c net: arcnet: Fix RESET flag handling 2021-01-29 20:54:06 -08:00
capmode.c arcnet: capmode: remove redundant assignment to pointer pkt 2019-08-30 14:14:46 -07:00
com90io.c net: arcnet: Fix RESET flag handling 2021-01-29 20:54:06 -08:00
com90xx.c net: arcnet: Fix RESET flag handling 2021-01-29 20:54:06 -08:00
com9026.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
com20020-isa.c net: arcnet: Fix RESET flag handling 2021-01-29 20:54:06 -08:00
com20020-pci.c net: arcnet: Fix RESET flag handling 2021-01-29 20:54:06 -08:00
com20020.c arcnet: com20020: remove needless base_addr assignment 2017-06-29 15:18:36 -04:00
com20020.h arcnet: com20020-pci: add led trigger support 2015-10-26 09:10:56 +01:00
com20020_cs.c net: arcnet: Fix RESET flag handling 2021-01-29 20:54:06 -08:00
rfc1051.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
rfc1201.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00