Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0da8b145 authored by Nishanth Aravamudan's avatar Nishanth Aravamudan Committed by Jeff Garzik
Browse files

[PATCH] net/farsync: add set_current_state() before schedule_timeout()



Insert set_current_state() before schedule_timeout() so the
function delays as expected. Without the addition, schedule_timeout()
will return immediately.

Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarMaximilian Attems <janitor@sternwelten.at>
Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
parent a26c074c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -981,6 +981,7 @@ fst_issue_cmd(struct fst_port_info *port, unsigned short cmd)
	/* Wait for any previous command to complete */
	while (mbval > NAK) {
		spin_unlock_irqrestore(&card->card_lock, flags);
		set_current_state(TASK_UNINTERRUPTIBLE);
		schedule_timeout(1);
		spin_lock_irqsave(&card->card_lock, flags);