summaryrefslogtreecommitdiff
path: root/drivers/ide
diff options
context:
space:
mode:
authorBorislav Petkov <petkovbb@gmail.com>2009-03-31 20:14:58 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 20:14:58 +0200
commit2eba08270990b99fb5429b76ee97184ddd272f7f (patch)
treeed34e557681f7cf6c78144703eb84931377adcc3 /drivers/ide
parentda19620d99377a52b953245089f831a9c3f049c2 (diff)
downloadlinux-3.10-2eba08270990b99fb5429b76ee97184ddd272f7f.tar.gz
linux-3.10-2eba08270990b99fb5429b76ee97184ddd272f7f.tar.bz2
linux-3.10-2eba08270990b99fb5429b76ee97184ddd272f7f.zip
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=2 Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Reported-by: Michael Roth <mroth@nessie.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-atapi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index d937e45a677..f591166d2c9 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -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;
}