提交 fd5d7819 编写于 作者: K Kai-Heng Feng 提交者: Kalle Valo

rtw88: Use udelay instead of usleep in atomic context

It's incorrect to use usleep in atomic context.

Switch to a macro which uses udelay instead of usleep to prevent the issue.

Fixes: 6343a6d4 ("rtw88: Add delay on polling h2c command status bit")
Signed-off-by: NKai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200423073007.3566-1-kai.heng.feng@canonical.com
上级 57a29df3
......@@ -228,9 +228,9 @@ static void rtw_fw_send_h2c_command(struct rtw_dev *rtwdev,
goto out;
}
ret = read_poll_timeout(rtw_read8, box_state,
!((box_state >> box) & 0x1), 100, 3000, false,
rtwdev, REG_HMETFR);
ret = read_poll_timeout_atomic(rtw_read8, box_state,
!((box_state >> box) & 0x1), 100, 3000,
false, rtwdev, REG_HMETFR);
if (ret) {
rtw_err(rtwdev, "failed to send h2c command\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册