linux-stable/drivers/char/pcmcia
Duoming Zhou 4143de03d3 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:39:38 +01:00
..
cm4000_cs.c
cm4040_cs.c
cm4040_cs.h
Kconfig
Makefile
scr24x_cs.c
synclink_cs.c