* ide: Fix code dealing with sleeping devices in do_ide_request()
@ 2009-03-25 19:39 Elias Oltmanns
2009-03-26 20:18 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 2+ messages in thread
From: Elias Oltmanns @ 2009-03-25 19:39 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide
Unfortunately, I missed a catch when reviewing the patch committed as
201bffa4. Here is the fix to the currently broken handling of sleeping
devices. In particular, this is required to get the disk shock
protection code working again.
Reported-by: Christian Thaeter <ct@pipapo.org>
Cc: stable@kernel.org
Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
---
Applies to v2.6.29.
drivers/ide/ide-io.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index a9a6c20..af70777 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -736,11 +736,10 @@ repeat:
prev_port = hwif->host->cur_port;
hwif->rq = NULL;
- if (drive->dev_flags & IDE_DFLAG_SLEEPING) {
- if (time_before(drive->sleep, jiffies)) {
- ide_unlock_port(hwif);
- goto plug_device;
- }
+ if (drive->dev_flags & IDE_DFLAG_SLEEPING &&
+ time_after(drive->sleep, jiffies)) {
+ ide_unlock_port(hwif);
+ goto plug_device;
}
if ((hwif->host->host_flags & IDE_HFLAG_SERIALIZE) &&
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: ide: Fix code dealing with sleeping devices in do_ide_request()
2009-03-25 19:39 ide: Fix code dealing with sleeping devices in do_ide_request() Elias Oltmanns
@ 2009-03-26 20:18 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-03-26 20:18 UTC (permalink / raw)
To: Elias Oltmanns; +Cc: linux-ide
On Wednesday 25 March 2009, Elias Oltmanns wrote:
> Unfortunately, I missed a catch when reviewing the patch committed as
> 201bffa4. Here is the fix to the currently broken handling of sleeping
> devices. In particular, this is required to get the disk shock
> protection code working again.
>
> Reported-by: Christian Thaeter <ct@pipapo.org>
> Cc: stable@kernel.org
> Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
applied, thanks for fixing it!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-26 21:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-25 19:39 ide: Fix code dealing with sleeping devices in do_ide_request() Elias Oltmanns
2009-03-26 20:18 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).