aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-floppy.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r--drivers/ide/ide-floppy.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index dbefe35c1396..1df6a3143596 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -534,6 +534,7 @@ static ide_startstop_t idefloppy_transfer_pc1(ide_drive_t *drive)
534{ 534{
535 ide_hwif_t *hwif = drive->hwif; 535 ide_hwif_t *hwif = drive->hwif;
536 idefloppy_floppy_t *floppy = drive->driver_data; 536 idefloppy_floppy_t *floppy = drive->driver_data;
537 struct ide_atapi_pc *pc = floppy->pc;
537 ide_expiry_t *expiry; 538 ide_expiry_t *expiry;
538 unsigned int timeout; 539 unsigned int timeout;
539 ide_startstop_t startstop; 540 ide_startstop_t startstop;
@@ -568,6 +569,12 @@ static ide_startstop_t idefloppy_transfer_pc1(ide_drive_t *drive)
568 569
569 ide_set_handler(drive, &idefloppy_pc_intr, timeout, expiry); 570 ide_set_handler(drive, &idefloppy_pc_intr, timeout, expiry);
570 571
572 /* Begin DMA, if necessary */
573 if (pc->flags & PC_FLAG_DMA_OK) {
574 pc->flags |= PC_FLAG_DMA_IN_PROGRESS;
575 hwif->dma_ops->dma_start(drive);
576 }
577
571 if ((floppy->flags & IDEFLOPPY_FLAG_ZIP_DRIVE) == 0) 578 if ((floppy->flags & IDEFLOPPY_FLAG_ZIP_DRIVE) == 0)
572 /* Send the actual packet */ 579 /* Send the actual packet */
573 hwif->output_data(drive, NULL, floppy->pc->c, 12); 580 hwif->output_data(drive, NULL, floppy->pc->c, 12);
@@ -633,13 +640,10 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive,
633 if ((pc->flags & PC_FLAG_DMA_OK) && drive->using_dma) 640 if ((pc->flags & PC_FLAG_DMA_OK) && drive->using_dma)
634 dma = !hwif->dma_ops->dma_setup(drive); 641 dma = !hwif->dma_ops->dma_setup(drive);
635 642
636 ide_pktcmd_tf_load(drive, IDE_TFLAG_OUT_DEVICE, bcount, dma); 643 if (!dma)
644 pc->flags &= ~PC_FLAG_DMA_OK;
637 645
638 if (dma) { 646 ide_pktcmd_tf_load(drive, IDE_TFLAG_OUT_DEVICE, bcount, dma);
639 /* Begin DMA, if necessary */
640 pc->flags |= PC_FLAG_DMA_IN_PROGRESS;
641 hwif->dma_ops->dma_start(drive);
642 }
643 647
644 if (floppy->flags & IDEFLOPPY_FLAG_DRQ_INTERRUPT) { 648 if (floppy->flags & IDEFLOPPY_FLAG_DRQ_INTERRUPT) {
645 /* Issue the packet command */ 649 /* Issue the packet command */