提交 2eba0827 编写于 作者: B Borislav Petkov 提交者: Bartlomiej Zolnierkiewicz

ide-atapi: start DMA after issuing a packet command

Apparently¹, some ATAPI devices want to see the packet command first
before enabling DMA otherwise they simply hang indefinitely. Reorder the
two steps and start DMA only after having issued the command first.

[1] http://marc.info/?l=linux-kernel&m=123835520317235&w=2Signed-off-by: NBorislav Petkov <petkovbb@gmail.com>
Reported-by: NMichael Roth <mroth@nessie.de>
Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
上级 da19620d
......@@ -613,6 +613,10 @@ static ide_startstop_t ide_transfer_pc(ide_drive_t *drive)
: ide_pc_intr),
timeout);
/* Send the actual packet */
if ((drive->atapi_flags & IDE_AFLAG_ZIP_DRIVE) == 0)
hwif->tp_ops->output_data(drive, NULL, rq->cmd, cmd_len);
/* Begin DMA, if necessary */
if (dev_is_idecd(drive)) {
if (drive->dma)
......@@ -624,10 +628,6 @@ static ide_startstop_t ide_transfer_pc(ide_drive_t *drive)
}
}
/* Send the actual packet */
if ((drive->atapi_flags & IDE_AFLAG_ZIP_DRIVE) == 0)
hwif->tp_ops->output_data(drive, NULL, rq->cmd, cmd_len);
return ide_started;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册