diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-15 15:21:59 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-15 15:21:59 -0400 |
commit | 28c7214bd8c2bbd4873b8f1e7f58d86d3731124f (patch) | |
tree | 224d9b798a73a3b5d0d8de204a6e9465a37c4104 /drivers | |
parent | 4cc196897de9e6c02cf86debc5b9f7cf1b69a214 (diff) |
ide: add PC_FLAG_DRQ_INTERRUPT pc flag
Add PC_FLAG_DRQ_INTERRUPT pc flag, set it in ide*_do_request()
and check for it (instead of checking for IDE*_FLAG_DRQ_INTERRUPT)
in ide*_issue_pc(). This is a preparation for adding generic
ide_issue_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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/ide-floppy.c | 5 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 11 | ||||
-rw-r--r-- | drivers/scsi/ide-scsi.c | 6 |
3 files changed, 17 insertions, 5 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index e7a1025c03c4..13f650fa2125 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -619,7 +619,7 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive, | |||
619 | 619 | ||
620 | ide_pktcmd_tf_load(drive, IDE_TFLAG_OUT_DEVICE, bcount, dma); | 620 | ide_pktcmd_tf_load(drive, IDE_TFLAG_OUT_DEVICE, bcount, dma); |
621 | 621 | ||
622 | if (floppy->flags & IDEFLOPPY_FLAG_DRQ_INTERRUPT) { | 622 | if (pc->flags & PC_FLAG_DRQ_INTERRUPT) { |
623 | /* Issue the packet command */ | 623 | /* Issue the packet command */ |
624 | ide_execute_command(drive, WIN_PACKETCMD, | 624 | ide_execute_command(drive, WIN_PACKETCMD, |
625 | &idefloppy_transfer_pc1, | 625 | &idefloppy_transfer_pc1, |
@@ -800,6 +800,9 @@ static ide_startstop_t idefloppy_do_request(ide_drive_t *drive, | |||
800 | return ide_stopped; | 800 | return ide_stopped; |
801 | } | 801 | } |
802 | 802 | ||
803 | if (floppy->flags & IDEFLOPPY_FLAG_DRQ_INTERRUPT) | ||
804 | pc->flags |= PC_FLAG_DRQ_INTERRUPT; | ||
805 | |||
803 | if (floppy->flags & IDEFLOPPY_FLAG_ZIP_DRIVE) | 806 | if (floppy->flags & IDEFLOPPY_FLAG_ZIP_DRIVE) |
804 | pc->flags |= PC_FLAG_ZIP_DRIVE; | 807 | pc->flags |= PC_FLAG_ZIP_DRIVE; |
805 | 808 | ||
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 5adc2c9ae418..cba18a675506 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -1020,7 +1020,7 @@ static ide_startstop_t idetape_issue_pc(ide_drive_t *drive, | |||
1020 | 1020 | ||
1021 | ide_pktcmd_tf_load(drive, IDE_TFLAG_OUT_DEVICE, bcount, dma_ok); | 1021 | ide_pktcmd_tf_load(drive, IDE_TFLAG_OUT_DEVICE, bcount, dma_ok); |
1022 | 1022 | ||
1023 | if (test_bit(IDETAPE_FLAG_DRQ_INTERRUPT, &tape->flags)) { | 1023 | if (pc->flags & PC_FLAG_DRQ_INTERRUPT) { |
1024 | ide_execute_command(drive, WIN_PACKETCMD, &idetape_transfer_pc, | 1024 | ide_execute_command(drive, WIN_PACKETCMD, &idetape_transfer_pc, |
1025 | IDETAPE_WAIT_CMD, NULL); | 1025 | IDETAPE_WAIT_CMD, NULL); |
1026 | return ide_started; | 1026 | return ide_started; |
@@ -1143,8 +1143,10 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive, | |||
1143 | } | 1143 | } |
1144 | 1144 | ||
1145 | /* Retry a failed packet command */ | 1145 | /* Retry a failed packet command */ |
1146 | if (tape->failed_pc && tape->pc->c[0] == REQUEST_SENSE) | 1146 | if (tape->failed_pc && tape->pc->c[0] == REQUEST_SENSE) { |
1147 | return idetape_issue_pc(drive, tape->failed_pc); | 1147 | pc = tape->failed_pc; |
1148 | goto out; | ||
1149 | } | ||
1148 | 1150 | ||
1149 | if (postponed_rq != NULL) | 1151 | if (postponed_rq != NULL) |
1150 | if (rq != postponed_rq) { | 1152 | if (rq != postponed_rq) { |
@@ -1216,6 +1218,9 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive, | |||
1216 | } | 1218 | } |
1217 | BUG(); | 1219 | BUG(); |
1218 | out: | 1220 | out: |
1221 | if (test_bit(IDETAPE_FLAG_DRQ_INTERRUPT, &tape->flags)) | ||
1222 | pc->flags |= PC_FLAG_DRQ_INTERRUPT; | ||
1223 | |||
1219 | return idetape_issue_pc(drive, pc); | 1224 | return idetape_issue_pc(drive, pc); |
1220 | } | 1225 | } |
1221 | 1226 | ||
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 1d261298d61a..b7c5e8391575 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
@@ -525,7 +525,7 @@ static ide_startstop_t idescsi_issue_pc(ide_drive_t *drive, | |||
525 | 525 | ||
526 | ide_pktcmd_tf_load(drive, 0, bcount, dma); | 526 | ide_pktcmd_tf_load(drive, 0, bcount, dma); |
527 | 527 | ||
528 | if (test_bit(IDESCSI_DRQ_INTERRUPT, &scsi->flags)) { | 528 | if (pc->flags & PC_FLAG_DRQ_INTERRUPT) { |
529 | ide_execute_command(drive, WIN_PACKETCMD, &idescsi_transfer_pc, | 529 | ide_execute_command(drive, WIN_PACKETCMD, &idescsi_transfer_pc, |
530 | get_timeout(pc), idescsi_expiry); | 530 | get_timeout(pc), idescsi_expiry); |
531 | return ide_started; | 531 | return ide_started; |
@@ -548,6 +548,10 @@ static ide_startstop_t idescsi_do_request (ide_drive_t *drive, struct request *r | |||
548 | 548 | ||
549 | if (blk_sense_request(rq) || blk_special_request(rq)) { | 549 | if (blk_sense_request(rq) || blk_special_request(rq)) { |
550 | struct ide_atapi_pc *pc = (struct ide_atapi_pc *)rq->special; | 550 | struct ide_atapi_pc *pc = (struct ide_atapi_pc *)rq->special; |
551 | idescsi_scsi_t *scsi = drive_to_idescsi(drive); | ||
552 | |||
553 | if (test_bit(IDESCSI_DRQ_INTERRUPT, &scsi->flags)) | ||
554 | pc->flags |= PC_FLAG_DRQ_INTERRUPT; | ||
551 | 555 | ||
552 | if (drive->using_dma && !idescsi_map_sg(drive, pc)) | 556 | if (drive->using_dma && !idescsi_map_sg(drive, pc)) |
553 | pc->flags |= PC_FLAG_DMA_OK; | 557 | pc->flags |= PC_FLAG_DMA_OK; |