aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 15:21:57 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 15:21:57 -0400
commit5d41893c0f9caf94b449eada0279a08c86f0212e (patch)
tree37dbcbb686f506c0f275c127b74f8f8ac349e0ee
parent5a7b75ab429e9ed568be50cfbf7091f097457cb8 (diff)
ide: add PC_FLAG_ZIP_DRIVE pc flag
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>
-rw-r--r--drivers/ide/ide-floppy.c8
-rw-r--r--include/linux/ide.h1
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 1df6a3143596..cff90c4b217e 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -559,7 +559,7 @@ static ide_startstop_t idefloppy_transfer_pc1(ide_drive_t *drive)
559 * 40 and 50msec work well. idefloppy_pc_intr will not be actually 559 * 40 and 50msec work well. idefloppy_pc_intr will not be actually
560 * used until after the packet is moved in about 50 msec. 560 * used until after the packet is moved in about 50 msec.
561 */ 561 */
562 if (floppy->flags & IDEFLOPPY_FLAG_ZIP_DRIVE) { 562 if (pc->flags & PC_FLAG_ZIP_DRIVE) {
563 timeout = floppy->ticks; 563 timeout = floppy->ticks;
564 expiry = &idefloppy_transfer_pc2; 564 expiry = &idefloppy_transfer_pc2;
565 } else { 565 } else {
@@ -575,7 +575,7 @@ static ide_startstop_t idefloppy_transfer_pc1(ide_drive_t *drive)
575 hwif->dma_ops->dma_start(drive); 575 hwif->dma_ops->dma_start(drive);
576 } 576 }
577 577
578 if ((floppy->flags & IDEFLOPPY_FLAG_ZIP_DRIVE) == 0) 578 if ((pc->flags & PC_FLAG_ZIP_DRIVE) == 0)
579 /* Send the actual packet */ 579 /* Send the actual packet */
580 hwif->output_data(drive, NULL, floppy->pc->c, 12); 580 hwif->output_data(drive, NULL, floppy->pc->c, 12);
581 581
@@ -826,7 +826,11 @@ static ide_startstop_t idefloppy_do_request(ide_drive_t *drive,
826 return ide_stopped; 826 return ide_stopped;
827 } 827 }
828 828
829 if (floppy->flags & IDEFLOPPY_FLAG_ZIP_DRIVE)
830 pc->flags |= PC_FLAG_ZIP_DRIVE;
831
829 pc->rq = rq; 832 pc->rq = rq;
833
830 return idefloppy_issue_pc(drive, pc); 834 return idefloppy_issue_pc(drive, pc);
831} 835}
832 836
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 63cee2947f60..89feaea9e20b 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -607,6 +607,7 @@ enum {
607 PC_FLAG_WRITING = (1 << 6), 607 PC_FLAG_WRITING = (1 << 6),
608 /* command timed out */ 608 /* command timed out */
609 PC_FLAG_TIMEDOUT = (1 << 7), 609 PC_FLAG_TIMEDOUT = (1 << 7),
610 PC_FLAG_ZIP_DRIVE = (1 << 8),
610}; 611};
611 612
612struct ide_atapi_pc { 613struct ide_atapi_pc {