aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.c
diff options
context:
space:
mode:
authorBorislav Petkov <petkovbb@gmail.com>2009-05-01 17:27:11 -0400
committerBorislav Petkov <petkovbb@gmail.com>2009-05-15 00:44:06 -0400
commit5a0e43b5e2ee9a295f864c38f0e853b1a4fc3892 (patch)
tree9793191360addddb7d240e34d983817fde3ec621 /drivers/ide/ide-tape.c
parent077e6dba20e74a455a0452379d2a965c7e1b01ad (diff)
ide-atapi: add a len-parameter to ide_queue_pc_tail
This is in preparation for removing ide_atapi_pc. There should be no functional change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r--drivers/ide/ide-tape.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index c93370997972..f09a263b72f2 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -770,7 +770,7 @@ static int idetape_flush_tape_buffers(ide_drive_t *drive)
770 int rc; 770 int rc;
771 771
772 idetape_create_write_filemark_cmd(drive, &pc, 0); 772 idetape_create_write_filemark_cmd(drive, &pc, 0);
773 rc = ide_queue_pc_tail(drive, tape->disk, &pc); 773 rc = ide_queue_pc_tail(drive, tape->disk, &pc, pc.req_xfer);
774 if (rc) 774 if (rc)
775 return rc; 775 return rc;
776 idetape_wait_ready(drive, 60 * 5 * HZ); 776 idetape_wait_ready(drive, 60 * 5 * HZ);
@@ -793,7 +793,7 @@ static int idetape_read_position(ide_drive_t *drive)
793 debug_log(DBG_PROCS, "Enter %s\n", __func__); 793 debug_log(DBG_PROCS, "Enter %s\n", __func__);
794 794
795 idetape_create_read_position_cmd(&pc); 795 idetape_create_read_position_cmd(&pc);
796 if (ide_queue_pc_tail(drive, tape->disk, &pc)) 796 if (ide_queue_pc_tail(drive, tape->disk, &pc, pc.req_xfer))
797 return -1; 797 return -1;
798 position = tape->first_frame; 798 position = tape->first_frame;
799 return position; 799 return position;
@@ -846,12 +846,12 @@ static int idetape_position_tape(ide_drive_t *drive, unsigned int block,
846 __ide_tape_discard_merge_buffer(drive); 846 __ide_tape_discard_merge_buffer(drive);
847 idetape_wait_ready(drive, 60 * 5 * HZ); 847 idetape_wait_ready(drive, 60 * 5 * HZ);
848 idetape_create_locate_cmd(drive, &pc, block, partition, skip); 848 idetape_create_locate_cmd(drive, &pc, block, partition, skip);
849 retval = ide_queue_pc_tail(drive, disk, &pc); 849 retval = ide_queue_pc_tail(drive, disk, &pc, pc.req_xfer);
850 if (retval) 850 if (retval)
851 return (retval); 851 return (retval);
852 852
853 idetape_create_read_position_cmd(&pc); 853 idetape_create_read_position_cmd(&pc);
854 return ide_queue_pc_tail(drive, disk, &pc); 854 return ide_queue_pc_tail(drive, disk, &pc, pc.req_xfer);
855} 855}
856 856
857static void ide_tape_discard_merge_buffer(ide_drive_t *drive, 857static void ide_tape_discard_merge_buffer(ide_drive_t *drive,
@@ -1047,12 +1047,12 @@ static int idetape_rewind_tape(ide_drive_t *drive)
1047 debug_log(DBG_SENSE, "Enter %s\n", __func__); 1047 debug_log(DBG_SENSE, "Enter %s\n", __func__);
1048 1048
1049 idetape_create_rewind_cmd(drive, &pc); 1049 idetape_create_rewind_cmd(drive, &pc);
1050 retval = ide_queue_pc_tail(drive, disk, &pc); 1050 retval = ide_queue_pc_tail(drive, disk, &pc, pc.req_xfer);
1051 if (retval) 1051 if (retval)
1052 return retval; 1052 return retval;
1053 1053
1054 idetape_create_read_position_cmd(&pc); 1054 idetape_create_read_position_cmd(&pc);
1055 retval = ide_queue_pc_tail(drive, disk, &pc); 1055 retval = ide_queue_pc_tail(drive, disk, &pc, pc.req_xfer);
1056 if (retval) 1056 if (retval)
1057 return retval; 1057 return retval;
1058 return 0; 1058 return 0;
@@ -1120,7 +1120,7 @@ static int idetape_space_over_filemarks(ide_drive_t *drive, short mt_op,
1120 case MTBSF: 1120 case MTBSF:
1121 idetape_create_space_cmd(&pc, mt_count - count, 1121 idetape_create_space_cmd(&pc, mt_count - count,
1122 IDETAPE_SPACE_OVER_FILEMARK); 1122 IDETAPE_SPACE_OVER_FILEMARK);
1123 return ide_queue_pc_tail(drive, disk, &pc); 1123 return ide_queue_pc_tail(drive, disk, &pc, pc.req_xfer);
1124 case MTFSFM: 1124 case MTFSFM:
1125 case MTBSFM: 1125 case MTBSFM:
1126 if (!sprev) 1126 if (!sprev)
@@ -1259,7 +1259,7 @@ static int idetape_write_filemark(ide_drive_t *drive)
1259 1259
1260 /* Write a filemark */ 1260 /* Write a filemark */
1261 idetape_create_write_filemark_cmd(drive, &pc, 1); 1261 idetape_create_write_filemark_cmd(drive, &pc, 1);
1262 if (ide_queue_pc_tail(drive, tape->disk, &pc)) { 1262 if (ide_queue_pc_tail(drive, tape->disk, &pc, pc.req_xfer)) {
1263 printk(KERN_ERR "ide-tape: Couldn't write a filemark\n"); 1263 printk(KERN_ERR "ide-tape: Couldn't write a filemark\n");
1264 return -EIO; 1264 return -EIO;
1265 } 1265 }
@@ -1344,11 +1344,11 @@ static int idetape_mtioctop(ide_drive_t *drive, short mt_op, int mt_count)
1344 IDETAPE_LU_RETENSION_MASK | IDETAPE_LU_LOAD_MASK); 1344 IDETAPE_LU_RETENSION_MASK | IDETAPE_LU_LOAD_MASK);
1345 case MTEOM: 1345 case MTEOM:
1346 idetape_create_space_cmd(&pc, 0, IDETAPE_SPACE_TO_EOD); 1346 idetape_create_space_cmd(&pc, 0, IDETAPE_SPACE_TO_EOD);
1347 return ide_queue_pc_tail(drive, disk, &pc); 1347 return ide_queue_pc_tail(drive, disk, &pc, pc.req_xfer);
1348 case MTERASE: 1348 case MTERASE:
1349 (void)idetape_rewind_tape(drive); 1349 (void)idetape_rewind_tape(drive);
1350 idetape_create_erase_cmd(&pc); 1350 idetape_create_erase_cmd(&pc);
1351 return ide_queue_pc_tail(drive, disk, &pc); 1351 return ide_queue_pc_tail(drive, disk, &pc, pc.req_xfer);
1352 case MTSETBLK: 1352 case MTSETBLK:
1353 if (mt_count) { 1353 if (mt_count) {
1354 if (mt_count < tape->blk_size || 1354 if (mt_count < tape->blk_size ||
@@ -1457,7 +1457,7 @@ static void ide_tape_get_bsize_from_bdesc(ide_drive_t *drive)
1457 struct ide_atapi_pc pc; 1457 struct ide_atapi_pc pc;
1458 1458
1459 idetape_create_mode_sense_cmd(&pc, IDETAPE_BLOCK_DESCRIPTOR); 1459 idetape_create_mode_sense_cmd(&pc, IDETAPE_BLOCK_DESCRIPTOR);
1460 if (ide_queue_pc_tail(drive, tape->disk, &pc)) { 1460 if (ide_queue_pc_tail(drive, tape->disk, &pc, pc.req_xfer)) {
1461 printk(KERN_ERR "ide-tape: Can't get block descriptor\n"); 1461 printk(KERN_ERR "ide-tape: Can't get block descriptor\n");
1462 if (tape->blk_size == 0) { 1462 if (tape->blk_size == 0) {
1463 printk(KERN_WARNING "ide-tape: Cannot deal with zero " 1463 printk(KERN_WARNING "ide-tape: Cannot deal with zero "
@@ -1613,7 +1613,7 @@ static void idetape_get_inquiry_results(ide_drive_t *drive)
1613 pc.buf = &pc_buf[0]; 1613 pc.buf = &pc_buf[0];
1614 pc.buf_size = sizeof(pc_buf); 1614 pc.buf_size = sizeof(pc_buf);
1615 1615
1616 if (ide_queue_pc_tail(drive, tape->disk, &pc)) { 1616 if (ide_queue_pc_tail(drive, tape->disk, &pc, pc.req_xfer)) {
1617 printk(KERN_ERR "ide-tape: %s: can't get INQUIRY results\n", 1617 printk(KERN_ERR "ide-tape: %s: can't get INQUIRY results\n",
1618 tape->name); 1618 tape->name);
1619 return; 1619 return;
@@ -1642,7 +1642,7 @@ static void idetape_get_mode_sense_results(ide_drive_t *drive)
1642 u8 speed, max_speed; 1642 u8 speed, max_speed;
1643 1643
1644 idetape_create_mode_sense_cmd(&pc, IDETAPE_CAPABILITIES_PAGE); 1644 idetape_create_mode_sense_cmd(&pc, IDETAPE_CAPABILITIES_PAGE);
1645 if (ide_queue_pc_tail(drive, tape->disk, &pc)) { 1645 if (ide_queue_pc_tail(drive, tape->disk, &pc, pc.req_xfer)) {
1646 printk(KERN_ERR "ide-tape: Can't get tape parameters - assuming" 1646 printk(KERN_ERR "ide-tape: Can't get tape parameters - assuming"
1647 " some default values\n"); 1647 " some default values\n");
1648 tape->blk_size = 512; 1648 tape->blk_size = 512;