提交 9010941c 编写于 作者: E Elias Oltmanns 提交者: Bartlomiej Zolnierkiewicz

ide: Fix code dealing with sleeping devices in do_ide_request()

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: NChristian Thaeter <ct@pipapo.org>
Cc: stable@kernel.org
Signed-off-by: NElias Oltmanns <eo@nebensachen.de>
Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
上级 e1c50248
...@@ -481,11 +481,10 @@ void do_ide_request(struct request_queue *q) ...@@ -481,11 +481,10 @@ void do_ide_request(struct request_queue *q)
prev_port = hwif->host->cur_port; prev_port = hwif->host->cur_port;
hwif->rq = NULL; hwif->rq = NULL;
if (drive->dev_flags & IDE_DFLAG_SLEEPING) { if (drive->dev_flags & IDE_DFLAG_SLEEPING &&
if (time_before(drive->sleep, jiffies)) { time_after(drive->sleep, jiffies)) {
ide_unlock_port(hwif); ide_unlock_port(hwif);
goto plug_device; goto plug_device;
}
} }
if ((hwif->host->host_flags & IDE_HFLAG_SERIALIZE) && if ((hwif->host->host_flags & IDE_HFLAG_SERIALIZE) &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册