kernel-hacking-2024-linux-s.../drivers/atm
Sebastian Andrzej Siewior f2bcc2fa27 atm: nicstar: Replace in_interrupt() usage
push_scqe() uses in_interrupt() to figure out if it is allowed to sleep.

The usage of in_interrupt() in drivers is phased out and Linus clearly
requested that code which changes behaviour depending on context should
either be separated or the context be conveyed in an argument passed by the
caller, which usually knows the context.

Aside of that in_interrupt() is not correct as it does not catch preempt
disabled regions which neither can sleep.

ns_send() (the only caller of push_scqe()) has the following callers:

- vcc_sendmsg() used as proto_ops::sendmsg is expected to be invoked in
  preemtible context.
  -> vcc->dev->ops->send() (ns_send())

- atm_vcc::send via atmdev_ops::send either directly (pointer copied by
  atm_init_aal34() or atm_init_aal5()) or via atm_send_aal0().
  This is invoked by drivers (like br2684, clip, pppoatm, ...) which are
  called from net_device_ops::ndo_start_xmit with BH disabled.

Add atmdev_ops::send_bh which is used by callers from BH context
(atm_send_aal*()) and if this callback missing then ::send is used
instead.
Implement this callback in nicstar and use it to replace in_interrupt().

Cc: Chas Williams <3chas3@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-11-18 16:43:55 -08:00
..
.gitignore
adummy.c
ambassador.c
ambassador.h
atmtcp.c atm: atmtcp: Constify atmtcp_v_dev_ops 2020-09-28 16:03:30 -07:00
eni.c atm: eni: fix the missed pci_disable_device() for eni_init_one() 2020-09-04 21:42:57 -07:00
eni.h
firestream.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-03 18:50:48 -07:00
firestream.h
fore200e.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
fore200e.h
he.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
he.h
horizon.c net/atm: remove the atmdev_ops {get, set}sockopt methods 2020-07-19 18:16:40 -07:00
horizon.h
idt77105.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
idt77105.h
idt77252.c atm: idt77252: avoid accessing the data mapped to streaming DMA 2020-08-03 15:51:25 -07:00
idt77252.h
idt77252_tables.h
iphase.c net/atm: remove the atmdev_ops {get, set}sockopt methods 2020-07-19 18:16:40 -07:00
iphase.h
Kconfig docs: networking: move ATM drivers to the hw driver section 2020-06-26 16:08:45 -07:00
lanai.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
Makefile
midway.h
nicstar.c atm: nicstar: Replace in_interrupt() usage 2020-11-18 16:43:55 -08:00
nicstar.h
nicstarmac.c
nicstarmac.copyright
solos-attrlist.c
solos-pci.c net/atm: remove the atmdev_ops {get, set}sockopt methods 2020-07-19 18:16:40 -07:00
suni.c
suni.h
tonga.h
uPD98401.h
uPD98402.c
uPD98402.h
zatm.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
zatm.h
zeprom.h