diff options
| author | Mark Brown <broonie@kernel.org> | 2023-12-04 12:31:42 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2023-12-04 12:31:42 +0000 |
| commit | 06891af2709b5dfa4081ff1f07b9f4c2743834b7 (patch) | |
| tree | 672f337b94d3af79268a54b5307af1392f708a1a /include/net/netkit.h | |
| parent | 7a030abc0185b30a3fd19a7431347c6f5a82c588 (diff) | |
| parent | 9b2ef250b31d46f7ef522bd1bd84942f998bb3f9 (diff) | |
spi: spl022: fix sleeping in interrupt context
Merge series from Nam Cao <namcao@linutronix.de>:
While running the spl022, I got the following warning:
BUG: sleeping function called from invalid context at drivers/spi/spi.c:1428
This is because between spi transfers, spi_transfer_delay_exec() (who
may sleep if the delay is >10us) is called in interrupt context. This is
a problem for anyone who runs this driver and need more than 10us delay.
Patch 1 adds an error reporting mechanism, needed by patch 2 who switch
to use the default spi_transfer_one_message(), which fix the problem.
The series is tested with polling transfer mode and interrupt transfer
mode. I can't test the DMA mode, so some help testing here is very
appreciated.
Diffstat (limited to 'include/net/netkit.h')
| -rw-r--r-- | include/net/netkit.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/netkit.h b/include/net/netkit.h index 0ba2e6b847ca..9ec0163739f4 100644 --- a/include/net/netkit.h +++ b/include/net/netkit.h @@ -10,6 +10,7 @@ int netkit_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog); int netkit_link_attach(const union bpf_attr *attr, struct bpf_prog *prog); int netkit_prog_detach(const union bpf_attr *attr, struct bpf_prog *prog); int netkit_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr); +INDIRECT_CALLABLE_DECLARE(struct net_device *netkit_peer_dev(struct net_device *dev)); #else static inline int netkit_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog) @@ -34,5 +35,10 @@ static inline int netkit_prog_query(const union bpf_attr *attr, { return -EINVAL; } + +static inline struct net_device *netkit_peer_dev(struct net_device *dev) +{ + return NULL; +} #endif /* CONFIG_NETKIT */ #endif /* __NET_NETKIT_H */ |
