OpenCloudOS-Kernel/net/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
..
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
addr.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
addr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atm_misc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atm_sysfs.c net: atm: use %*ph to print small buffer 2020-01-25 10:14:40 +01:00
br2684.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
clip.c net: atm: Reduce the severity of logging in unlink_clip_vcc 2019-11-18 17:08:20 -08:00
common.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
common.h net: pass a sockptr_t into ->setsockopt 2020-07-24 15:41:54 -07:00
ioctl.c atm: switch do_atmif_sioc() to direct use of atm_dev_ioctl() 2020-05-20 20:31:36 -04:00
lec.c net: atm: fix update of position index in lec_seq_next 2020-10-31 12:26:30 -07:00
lec.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lec_arpc.h net: atm: lec_arpc.h: delete duplicated word 2020-07-19 18:14:21 -07:00
mpc.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
mpc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mpoa_caches.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
mpoa_caches.h atm: mpoa: remove 32-bit timekeeping 2017-11-30 09:26:32 -05:00
mpoa_proc.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
pppoatm.c treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD() 2020-07-30 11:15:58 -07:00
proc.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
protocols.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pvc.c net: pass a sockptr_t into ->setsockopt 2020-07-24 15:41:54 -07:00
raw.c atm: nicstar: Replace in_interrupt() usage 2020-11-18 16:43:55 -08:00
resources.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
resources.h atm: lift copyin from atm_dev_ioctl() 2020-05-20 20:31:35 -04:00
signaling.c net: atm: delete duplicated words 2020-09-18 14:12:43 -07:00
signaling.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
svc.c net: pass a sockptr_t into ->setsockopt 2020-07-24 15:41:54 -07:00