linux-stable/drivers/char/pcmcia
Duoming Zhou 1b00494c8f Revert "char: pcmcia: cm4000_cs: Replace mdelay with usleep_range in set_protocol"
[ Upstream commit 70fae37a09 ]

This reverts commit be826ada52.

The function monitor_card() is a timer handler that runs in an
atomic context, but it calls usleep_range() that can sleep.
As a result, the sleep-in-atomic-context bugs will happen.
The process is shown below:

    (atomic context)
monitor_card()
  set_protocol()
    usleep_range() //sleep

The origin commit c1986ee9be ("[PATCH] New Omnikey Cardman
4000 driver") works fine.

Fixes: be826ada52 ("char: pcmcia: cm4000_cs: Replace mdelay with usleep_range in set_protocol")
Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
Link: https://lore.kernel.org/r/20230118141000.5580-1-duoming@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-10 09:33:32 +01:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
cm4000_cs.c Revert "char: pcmcia: cm4000_cs: Replace mdelay with usleep_range in set_protocol" 2023-03-10 09:33:32 +01:00
cm4040_cs.c char: pcmcia: cm4040_cs: Remove unused variable 'uc' 2021-05-21 10:09:28 +02:00
cm4040_cs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scr24x_cs.c char: pcmcia: scr24x_cs: Fix redundant fops 2021-05-27 14:46:13 +02:00
synclink_cs.c tty: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00