diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-15 14:15:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-15 14:15:36 -0400 |
commit | 98339cbd360b77c3167db287fd611468c2c44559 (patch) | |
tree | 06779e040c18aa40fc5a6e15b132fa1f70ec45f6 /drivers/block/paride | |
parent | e4e0fadcd929138aa82130a1c5f22206d86d7bb2 (diff) | |
parent | cbbc4e818de4451cdef75a112b7fc8a523d5d2a0 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (80 commits)
ide-floppy: fix unfortunate function naming
ide-tape: unify idetape_create_read/write_cmd
ide: add ide_pc_intr() helper
ide-{floppy,scsi}: read Status Register before stopping DMA engine
ide-scsi: add more debugging to idescsi_pc_intr()
ide-scsi: use pc->callback
ide-floppy: add more debugging to idefloppy_pc_intr()
ide-tape: always log debug info in idetape_pc_intr() if debugging is enabled
ide-tape: add ide_tape_io_buffers() helper
ide-tape: factor out DSC handling from idetape_pc_intr()
ide-{floppy,tape}: move checking of ->failed_pc to ->callback
ide: add ide_issue_pc() helper
ide: add PC_FLAG_DRQ_INTERRUPT pc flag
ide-scsi: move idescsi_map_sg() call out from idescsi_issue_pc()
ide: add ide_transfer_pc() helper
ide-scsi: set drive->scsi flag for devices handled by the driver
ide-{cd,floppy,tape}: remove checking for drive->scsi
ide: add PC_FLAG_ZIP_DRIVE pc flag
ide-tape: factor out waiting for good ireason from idetape_transfer_pc()
ide-tape: set PC_FLAG_DMA_IN_PROGRESS flag in idetape_transfer_pc()
...
Diffstat (limited to 'drivers/block/paride')
-rw-r--r-- | drivers/block/paride/pd.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index 570f3b70dce..5fdfa7c888c 100644 --- a/drivers/block/paride/pd.c +++ b/drivers/block/paride/pd.c | |||
@@ -712,19 +712,17 @@ static void do_pd_request(struct request_queue * q) | |||
712 | static int pd_special_command(struct pd_unit *disk, | 712 | static int pd_special_command(struct pd_unit *disk, |
713 | enum action (*func)(struct pd_unit *disk)) | 713 | enum action (*func)(struct pd_unit *disk)) |
714 | { | 714 | { |
715 | DECLARE_COMPLETION_ONSTACK(wait); | 715 | struct request *rq; |
716 | struct request rq; | ||
717 | int err = 0; | 716 | int err = 0; |
718 | 717 | ||
719 | blk_rq_init(NULL, &rq); | 718 | rq = blk_get_request(disk->gd->queue, READ, __GFP_WAIT); |
720 | rq.rq_disk = disk->gd; | 719 | |
721 | rq.end_io_data = &wait; | 720 | rq->cmd_type = REQ_TYPE_SPECIAL; |
722 | rq.end_io = blk_end_sync_rq; | 721 | rq->special = func; |
723 | blk_insert_request(disk->gd->queue, &rq, 0, func); | 722 | |
724 | wait_for_completion(&wait); | 723 | err = blk_execute_rq(disk->gd->queue, disk->gd, rq, 0); |
725 | if (rq.errors) | 724 | |
726 | err = -EIO; | 725 | blk_put_request(rq); |
727 | blk_put_request(&rq); | ||
728 | return err; | 726 | return err; |
729 | } | 727 | } |
730 | 728 | ||