[PATCH 1/3] m68k/atari - atari_scsi: fix wait_event completion conditions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix patch by ArndB changing falcon_get_lock to use wait_event.
Some of the completion conditions had been missed when converting
from while() {} to do {} until() logic.

Signed-off-by: Michael Schmitz <schmitz@xxxxxxxxxx>
---
 drivers/scsi/atari_scsi.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c
index 1986ecb..cc1b013 100644
--- a/drivers/scsi/atari_scsi.c
+++ b/drivers/scsi/atari_scsi.c
@@ -550,10 +550,10 @@ static void falcon_get_lock(void)
 
 	local_irq_save(flags);
 
-       wait_event_cmd(falcon_fairness_wait,
-                      !in_irq() && falcon_got_lock && stdma_others_waiting(),
-                      local_irq_restore(flags),
-                      local_irq_save(flags));
+	wait_event_cmd(falcon_fairness_wait,
+		in_irq() || !falcon_got_lock || !stdma_others_waiting(),
+		local_irq_restore(flags),
+		local_irq_save(flags));
 
 	while (!falcon_got_lock) {
 		if (in_irq())
@@ -566,9 +566,9 @@ static void falcon_get_lock(void)
 			wake_up(&falcon_try_wait);
 		} else {
                        wait_event_cmd(falcon_try_wait,
-                                      !falcon_got_lock && !falcon_trying_lock,
-                                      local_irq_restore(flags),
-                                      local_irq_save(flags));
+				falcon_got_lock && !falcon_trying_lock,
+				local_irq_restore(flags),
+				local_irq_save(flags));
 		}
 	}
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux