Add PC_FLAG_ZIP_DRIVE pc flag, set it in idefloppy_do_request()
and check for it (instead of checking for IDEFLOPPY_FLAG_ZIP_DRIVE)
in idefloppy_transfer_pc(). This is a preparation for adding
generic ide_transfer_pc() helper.
There should be no functional changes caused by this patch.
Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* 40 and 50msec work well. idefloppy_pc_intr will not be actually
* used until after the packet is moved in about 50 msec.
*/
* 40 and 50msec work well. idefloppy_pc_intr will not be actually
* used until after the packet is moved in about 50 msec.
*/
- if (floppy->flags & IDEFLOPPY_FLAG_ZIP_DRIVE) {
+ if (pc->flags & PC_FLAG_ZIP_DRIVE) {
timeout = floppy->ticks;
expiry = &idefloppy_transfer_pc2;
} else {
timeout = floppy->ticks;
expiry = &idefloppy_transfer_pc2;
} else {
hwif->dma_ops->dma_start(drive);
}
hwif->dma_ops->dma_start(drive);
}
- if ((floppy->flags & IDEFLOPPY_FLAG_ZIP_DRIVE) == 0)
+ if ((pc->flags & PC_FLAG_ZIP_DRIVE) == 0)
/* Send the actual packet */
hwif->output_data(drive, NULL, floppy->pc->c, 12);
/* Send the actual packet */
hwif->output_data(drive, NULL, floppy->pc->c, 12);
+ if (floppy->flags & IDEFLOPPY_FLAG_ZIP_DRIVE)
+ pc->flags |= PC_FLAG_ZIP_DRIVE;
+
return idefloppy_issue_pc(drive, pc);
}
return idefloppy_issue_pc(drive, pc);
}
PC_FLAG_WRITING = (1 << 6),
/* command timed out */
PC_FLAG_TIMEDOUT = (1 << 7),
PC_FLAG_WRITING = (1 << 6),
/* command timed out */
PC_FLAG_TIMEDOUT = (1 << 7),
+ PC_FLAG_ZIP_DRIVE = (1 << 8),