aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ide-scsi.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 21:22:03 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 21:22:03 +0200
commit55d82bfa6763d6761670d740ab3bac2f1c042d87 (patch)
treedd5e13c6c4801a4853ee0ce5f11469ab05ba6c31 /drivers/scsi/ide-scsi.c
parentcdca5c1f3b769eb2cdfc9cadc254cb74ba73c7d6 (diff)
downloadkernel_samsung_espresso10-55d82bfa6763d6761670d740ab3bac2f1c042d87.zip
kernel_samsung_espresso10-55d82bfa6763d6761670d740ab3bac2f1c042d87.tar.gz
kernel_samsung_espresso10-55d82bfa6763d6761670d740ab3bac2f1c042d87.tar.bz2
ide-{floppy,scsi}: read Status Register before stopping DMA engine
Read Status Register before stopping DMA engine to match ide-tape device driver - it should be safe and shouldn't affect anything. This is a preparation for adding generic ide_pc_intr() helper. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r--drivers/scsi/ide-scsi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index ec9a5de..ada733c 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -370,6 +370,10 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
pc->callback(drive);
return ide_stopped;
}
+
+ /* Clear the interrupt */
+ stat = ide_read_status(drive);
+
if (pc->flags & PC_FLAG_DMA_IN_PROGRESS) {
if (hwif->dma_ops->dma_end(drive))
pc->flags |= PC_FLAG_DMA_ERROR;
@@ -378,9 +382,6 @@ static ide_startstop_t idescsi_pc_intr (ide_drive_t *drive)
debug_log("%s: DMA finished\n", drive->name);
}
- /* Clear the interrupt */
- stat = ide_read_status(drive);
-
if ((stat & DRQ_STAT) == 0) {
/* No more interrupts */
debug_log("Packet command completed, %d bytes transferred\n",