diff options
author | Borislav Petkov <petkovbb@gmail.com> | 2009-04-02 22:21:31 +0200 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2009-04-27 10:36:54 -0700 |
commit | 717ff472176c54e90a4074898a59037f9a4791f5 (patch) | |
tree | 73615ab826f63d1cb255cc96030457275f051319 /drivers | |
parent | d7715a3e33ca1f6698ac9bec7d767a55f07fd65a (diff) |
ide-atapi: start DMA after issuing a packet command
upstream commit: 2eba08270990b99fb5429b76ee97184ddd272f7f
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>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/ide-atapi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index 47497f8b4251..53a9e8dd4e07 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c @@ -568,6 +568,10 @@ static ide_startstop_t ide_transfer_pc(ide_drive_t *drive) : ide_pc_intr), timeout, expiry); + /* 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) @@ -579,10 +583,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; } |