aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-tape.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r--drivers/ide/ide-tape.c124
1 files changed, 50 insertions, 74 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 1495792d7917..3cbca3f4628a 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -615,16 +615,6 @@ typedef struct os_dat_s {
615/*************************** End of tunable parameters ***********************/ 615/*************************** End of tunable parameters ***********************/
616 616
617/* 617/*
618 * Debugging/Performance analysis
619 *
620 * I/O trace support
621 */
622#define USE_IOTRACE 0
623#if USE_IOTRACE
624#define IO_IDETAPE_FIFO 500
625#endif
626
627/*
628 * Read/Write error simulation 618 * Read/Write error simulation
629 */ 619 */
630#define SIMULATE_ERRORS 0 620#define SIMULATE_ERRORS 0
@@ -1818,9 +1808,8 @@ static ide_startstop_t idetape_retry_pc (ide_drive_t *drive)
1818 idetape_tape_t *tape = drive->driver_data; 1808 idetape_tape_t *tape = drive->driver_data;
1819 idetape_pc_t *pc; 1809 idetape_pc_t *pc;
1820 struct request *rq; 1810 struct request *rq;
1821 atapi_error_t error;
1822 1811
1823 error.all = HWIF(drive)->INB(IDE_ERROR_REG); 1812 (void)drive->hwif->INB(IDE_ERROR_REG);
1824 pc = idetape_next_pc_storage(drive); 1813 pc = idetape_next_pc_storage(drive);
1825 rq = idetape_next_rq_storage(drive); 1814 rq = idetape_next_rq_storage(drive);
1826 idetape_create_request_sense_cmd(pc); 1815 idetape_create_request_sense_cmd(pc);
@@ -1858,15 +1847,13 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive)
1858{ 1847{
1859 ide_hwif_t *hwif = drive->hwif; 1848 ide_hwif_t *hwif = drive->hwif;
1860 idetape_tape_t *tape = drive->driver_data; 1849 idetape_tape_t *tape = drive->driver_data;
1861 atapi_status_t status;
1862 atapi_bcount_t bcount;
1863 atapi_ireason_t ireason;
1864 idetape_pc_t *pc = tape->pc; 1850 idetape_pc_t *pc = tape->pc;
1865
1866 unsigned int temp; 1851 unsigned int temp;
1867#if SIMULATE_ERRORS 1852#if SIMULATE_ERRORS
1868 static int error_sim_count = 0; 1853 static int error_sim_count = 0;
1869#endif 1854#endif
1855 u16 bcount;
1856 u8 stat, ireason;
1870 1857
1871#if IDETAPE_DEBUG_LOG 1858#if IDETAPE_DEBUG_LOG
1872 if (tape->debug_level >= 4) 1859 if (tape->debug_level >= 4)
@@ -1875,10 +1862,10 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive)
1875#endif /* IDETAPE_DEBUG_LOG */ 1862#endif /* IDETAPE_DEBUG_LOG */
1876 1863
1877 /* Clear the interrupt */ 1864 /* Clear the interrupt */
1878 status.all = HWIF(drive)->INB(IDE_STATUS_REG); 1865 stat = hwif->INB(IDE_STATUS_REG);
1879 1866
1880 if (test_bit(PC_DMA_IN_PROGRESS, &pc->flags)) { 1867 if (test_bit(PC_DMA_IN_PROGRESS, &pc->flags)) {
1881 if (HWIF(drive)->ide_dma_end(drive) || status.b.check) { 1868 if (hwif->ide_dma_end(drive) || (stat & ERR_STAT)) {
1882 /* 1869 /*
1883 * A DMA error is sometimes expected. For example, 1870 * A DMA error is sometimes expected. For example,
1884 * if the tape is crossing a filemark during a 1871 * if the tape is crossing a filemark during a
@@ -1912,7 +1899,7 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive)
1912 } 1899 }
1913 1900
1914 /* No more interrupts */ 1901 /* No more interrupts */
1915 if (!status.b.drq) { 1902 if ((stat & DRQ_STAT) == 0) {
1916#if IDETAPE_DEBUG_LOG 1903#if IDETAPE_DEBUG_LOG
1917 if (tape->debug_level >= 2) 1904 if (tape->debug_level >= 2)
1918 printk(KERN_INFO "ide-tape: Packet command completed, %d bytes transferred\n", pc->actually_transferred); 1905 printk(KERN_INFO "ide-tape: Packet command completed, %d bytes transferred\n", pc->actually_transferred);
@@ -1927,12 +1914,13 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive)
1927 (++error_sim_count % 100) == 0) { 1914 (++error_sim_count % 100) == 0) {
1928 printk(KERN_INFO "ide-tape: %s: simulating error\n", 1915 printk(KERN_INFO "ide-tape: %s: simulating error\n",
1929 tape->name); 1916 tape->name);
1930 status.b.check = 1; 1917 stat |= ERR_STAT;
1931 } 1918 }
1932#endif 1919#endif
1933 if (status.b.check && pc->c[0] == IDETAPE_REQUEST_SENSE_CMD) 1920 if ((stat & ERR_STAT) && pc->c[0] == IDETAPE_REQUEST_SENSE_CMD)
1934 status.b.check = 0; 1921 stat &= ~ERR_STAT;
1935 if (status.b.check || test_bit(PC_DMA_ERROR, &pc->flags)) { /* Error detected */ 1922 if ((stat & ERR_STAT) || test_bit(PC_DMA_ERROR, &pc->flags)) {
1923 /* Error detected */
1936#if IDETAPE_DEBUG_LOG 1924#if IDETAPE_DEBUG_LOG
1937 if (tape->debug_level >= 1) 1925 if (tape->debug_level >= 1)
1938 printk(KERN_INFO "ide-tape: %s: I/O error\n", 1926 printk(KERN_INFO "ide-tape: %s: I/O error\n",
@@ -1951,7 +1939,7 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive)
1951 } 1939 }
1952 pc->error = 0; 1940 pc->error = 0;
1953 if (test_bit(PC_WAIT_FOR_DSC, &pc->flags) && 1941 if (test_bit(PC_WAIT_FOR_DSC, &pc->flags) &&
1954 !status.b.dsc) { 1942 (stat & SEEK_STAT) == 0) {
1955 /* Media access command */ 1943 /* Media access command */
1956 tape->dsc_polling_start = jiffies; 1944 tape->dsc_polling_start = jiffies;
1957 tape->dsc_polling_frequency = IDETAPE_DSC_MA_FAST; 1945 tape->dsc_polling_frequency = IDETAPE_DSC_MA_FAST;
@@ -1973,30 +1961,30 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive)
1973 return ide_do_reset(drive); 1961 return ide_do_reset(drive);
1974 } 1962 }
1975 /* Get the number of bytes to transfer on this interrupt. */ 1963 /* Get the number of bytes to transfer on this interrupt. */
1976 bcount.b.high = hwif->INB(IDE_BCOUNTH_REG); 1964 bcount = (hwif->INB(IDE_BCOUNTH_REG) << 8) |
1977 bcount.b.low = hwif->INB(IDE_BCOUNTL_REG); 1965 hwif->INB(IDE_BCOUNTL_REG);
1978 1966
1979 ireason.all = hwif->INB(IDE_IREASON_REG); 1967 ireason = hwif->INB(IDE_IREASON_REG);
1980 1968
1981 if (ireason.b.cod) { 1969 if (ireason & CD) {
1982 printk(KERN_ERR "ide-tape: CoD != 0 in idetape_pc_intr\n"); 1970 printk(KERN_ERR "ide-tape: CoD != 0 in idetape_pc_intr\n");
1983 return ide_do_reset(drive); 1971 return ide_do_reset(drive);
1984 } 1972 }
1985 if (ireason.b.io == test_bit(PC_WRITING, &pc->flags)) { 1973 if (((ireason & IO) == IO) == test_bit(PC_WRITING, &pc->flags)) {
1986 /* Hopefully, we will never get here */ 1974 /* Hopefully, we will never get here */
1987 printk(KERN_ERR "ide-tape: We wanted to %s, ", 1975 printk(KERN_ERR "ide-tape: We wanted to %s, ",
1988 ireason.b.io ? "Write":"Read"); 1976 (ireason & IO) ? "Write" : "Read");
1989 printk(KERN_ERR "ide-tape: but the tape wants us to %s !\n", 1977 printk(KERN_ERR "ide-tape: but the tape wants us to %s !\n",
1990 ireason.b.io ? "Read":"Write"); 1978 (ireason & IO) ? "Read" : "Write");
1991 return ide_do_reset(drive); 1979 return ide_do_reset(drive);
1992 } 1980 }
1993 if (!test_bit(PC_WRITING, &pc->flags)) { 1981 if (!test_bit(PC_WRITING, &pc->flags)) {
1994 /* Reading - Check that we have enough space */ 1982 /* Reading - Check that we have enough space */
1995 temp = pc->actually_transferred + bcount.all; 1983 temp = pc->actually_transferred + bcount;
1996 if (temp > pc->request_transfer) { 1984 if (temp > pc->request_transfer) {
1997 if (temp > pc->buffer_size) { 1985 if (temp > pc->buffer_size) {
1998 printk(KERN_ERR "ide-tape: The tape wants to send us more data than expected - discarding data\n"); 1986 printk(KERN_ERR "ide-tape: The tape wants to send us more data than expected - discarding data\n");
1999 idetape_discard_data(drive, bcount.all); 1987 idetape_discard_data(drive, bcount);
2000 ide_set_handler(drive, &idetape_pc_intr, IDETAPE_WAIT_CMD, NULL); 1988 ide_set_handler(drive, &idetape_pc_intr, IDETAPE_WAIT_CMD, NULL);
2001 return ide_started; 1989 return ide_started;
2002 } 1990 }
@@ -2008,23 +1996,26 @@ static ide_startstop_t idetape_pc_intr (ide_drive_t *drive)
2008 } 1996 }
2009 if (test_bit(PC_WRITING, &pc->flags)) { 1997 if (test_bit(PC_WRITING, &pc->flags)) {
2010 if (pc->bh != NULL) 1998 if (pc->bh != NULL)
2011 idetape_output_buffers(drive, pc, bcount.all); 1999 idetape_output_buffers(drive, pc, bcount);
2012 else 2000 else
2013 /* Write the current buffer */ 2001 /* Write the current buffer */
2014 HWIF(drive)->atapi_output_bytes(drive, pc->current_position, bcount.all); 2002 hwif->atapi_output_bytes(drive, pc->current_position,
2003 bcount);
2015 } else { 2004 } else {
2016 if (pc->bh != NULL) 2005 if (pc->bh != NULL)
2017 idetape_input_buffers(drive, pc, bcount.all); 2006 idetape_input_buffers(drive, pc, bcount);
2018 else 2007 else
2019 /* Read the current buffer */ 2008 /* Read the current buffer */
2020 HWIF(drive)->atapi_input_bytes(drive, pc->current_position, bcount.all); 2009 hwif->atapi_input_bytes(drive, pc->current_position,
2010 bcount);
2021 } 2011 }
2022 /* Update the current position */ 2012 /* Update the current position */
2023 pc->actually_transferred += bcount.all; 2013 pc->actually_transferred += bcount;
2024 pc->current_position += bcount.all; 2014 pc->current_position += bcount;
2025#if IDETAPE_DEBUG_LOG 2015#if IDETAPE_DEBUG_LOG
2026 if (tape->debug_level >= 2) 2016 if (tape->debug_level >= 2)
2027 printk(KERN_INFO "ide-tape: [cmd %x] transferred %d bytes on that interrupt\n", pc->c[0], bcount.all); 2017 printk(KERN_INFO "ide-tape: [cmd %x] transferred %d bytes "
2018 "on that interrupt\n", pc->c[0], bcount);
2028#endif 2019#endif
2029 /* And set the interrupt handler again */ 2020 /* And set the interrupt handler again */
2030 ide_set_handler(drive, &idetape_pc_intr, IDETAPE_WAIT_CMD, NULL); 2021 ide_set_handler(drive, &idetape_pc_intr, IDETAPE_WAIT_CMD, NULL);
@@ -2078,28 +2069,28 @@ static ide_startstop_t idetape_transfer_pc(ide_drive_t *drive)
2078 ide_hwif_t *hwif = drive->hwif; 2069 ide_hwif_t *hwif = drive->hwif;
2079 idetape_tape_t *tape = drive->driver_data; 2070 idetape_tape_t *tape = drive->driver_data;
2080 idetape_pc_t *pc = tape->pc; 2071 idetape_pc_t *pc = tape->pc;
2081 atapi_ireason_t ireason;
2082 int retries = 100; 2072 int retries = 100;
2083 ide_startstop_t startstop; 2073 ide_startstop_t startstop;
2074 u8 ireason;
2084 2075
2085 if (ide_wait_stat(&startstop,drive,DRQ_STAT,BUSY_STAT,WAIT_READY)) { 2076 if (ide_wait_stat(&startstop,drive,DRQ_STAT,BUSY_STAT,WAIT_READY)) {
2086 printk(KERN_ERR "ide-tape: Strange, packet command initiated yet DRQ isn't asserted\n"); 2077 printk(KERN_ERR "ide-tape: Strange, packet command initiated yet DRQ isn't asserted\n");
2087 return startstop; 2078 return startstop;
2088 } 2079 }
2089 ireason.all = hwif->INB(IDE_IREASON_REG); 2080 ireason = hwif->INB(IDE_IREASON_REG);
2090 while (retries-- && (!ireason.b.cod || ireason.b.io)) { 2081 while (retries-- && ((ireason & CD) == 0 || (ireason & IO))) {
2091 printk(KERN_ERR "ide-tape: (IO,CoD != (0,1) while issuing " 2082 printk(KERN_ERR "ide-tape: (IO,CoD != (0,1) while issuing "
2092 "a packet command, retrying\n"); 2083 "a packet command, retrying\n");
2093 udelay(100); 2084 udelay(100);
2094 ireason.all = hwif->INB(IDE_IREASON_REG); 2085 ireason = hwif->INB(IDE_IREASON_REG);
2095 if (retries == 0) { 2086 if (retries == 0) {
2096 printk(KERN_ERR "ide-tape: (IO,CoD != (0,1) while " 2087 printk(KERN_ERR "ide-tape: (IO,CoD != (0,1) while "
2097 "issuing a packet command, ignoring\n"); 2088 "issuing a packet command, ignoring\n");
2098 ireason.b.cod = 1; 2089 ireason |= CD;
2099 ireason.b.io = 0; 2090 ireason &= ~IO;
2100 } 2091 }
2101 } 2092 }
2102 if (!ireason.b.cod || ireason.b.io) { 2093 if ((ireason & CD) == 0 || (ireason & IO)) {
2103 printk(KERN_ERR "ide-tape: (IO,CoD) != (0,1) while issuing " 2094 printk(KERN_ERR "ide-tape: (IO,CoD) != (0,1) while issuing "
2104 "a packet command\n"); 2095 "a packet command\n");
2105 return ide_do_reset(drive); 2096 return ide_do_reset(drive);
@@ -2120,8 +2111,8 @@ static ide_startstop_t idetape_issue_packet_command (ide_drive_t *drive, idetape
2120{ 2111{
2121 ide_hwif_t *hwif = drive->hwif; 2112 ide_hwif_t *hwif = drive->hwif;
2122 idetape_tape_t *tape = drive->driver_data; 2113 idetape_tape_t *tape = drive->driver_data;
2123 atapi_bcount_t bcount;
2124 int dma_ok = 0; 2114 int dma_ok = 0;
2115 u16 bcount;
2125 2116
2126#if IDETAPE_DEBUG_BUGS 2117#if IDETAPE_DEBUG_BUGS
2127 if (tape->pc->c[0] == IDETAPE_REQUEST_SENSE_CMD && 2118 if (tape->pc->c[0] == IDETAPE_REQUEST_SENSE_CMD &&
@@ -2170,7 +2161,7 @@ static ide_startstop_t idetape_issue_packet_command (ide_drive_t *drive, idetape
2170 pc->actually_transferred = 0; 2161 pc->actually_transferred = 0;
2171 pc->current_position = pc->buffer; 2162 pc->current_position = pc->buffer;
2172 /* Request to transfer the entire buffer at once */ 2163 /* Request to transfer the entire buffer at once */
2173 bcount.all = pc->request_transfer; 2164 bcount = pc->request_transfer;
2174 2165
2175 if (test_and_clear_bit(PC_DMA_ERROR, &pc->flags)) { 2166 if (test_and_clear_bit(PC_DMA_ERROR, &pc->flags)) {
2176 printk(KERN_WARNING "ide-tape: DMA disabled, " 2167 printk(KERN_WARNING "ide-tape: DMA disabled, "
@@ -2180,12 +2171,9 @@ static ide_startstop_t idetape_issue_packet_command (ide_drive_t *drive, idetape
2180 if (test_bit(PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma) 2171 if (test_bit(PC_DMA_RECOMMENDED, &pc->flags) && drive->using_dma)
2181 dma_ok = !hwif->dma_setup(drive); 2172 dma_ok = !hwif->dma_setup(drive);
2182 2173
2183 if (IDE_CONTROL_REG) 2174 ide_pktcmd_tf_load(drive, IDE_TFLAG_NO_SELECT_MASK |
2184 hwif->OUTB(drive->ctl, IDE_CONTROL_REG); 2175 IDE_TFLAG_OUT_DEVICE, bcount, dma_ok);
2185 hwif->OUTB(dma_ok ? 1 : 0, IDE_FEATURE_REG); /* Use PIO/DMA */ 2176
2186 hwif->OUTB(bcount.b.high, IDE_BCOUNTH_REG);
2187 hwif->OUTB(bcount.b.low, IDE_BCOUNTL_REG);
2188 hwif->OUTB(drive->select.all, IDE_SELECT_REG);
2189 if (dma_ok) /* Will begin DMA later */ 2177 if (dma_ok) /* Will begin DMA later */
2190 set_bit(PC_DMA_IN_PROGRESS, &pc->flags); 2178 set_bit(PC_DMA_IN_PROGRESS, &pc->flags);
2191 if (test_bit(IDETAPE_DRQ_INTERRUPT, &tape->flags)) { 2179 if (test_bit(IDETAPE_DRQ_INTERRUPT, &tape->flags)) {
@@ -2295,11 +2283,11 @@ static ide_startstop_t idetape_media_access_finished (ide_drive_t *drive)
2295{ 2283{
2296 idetape_tape_t *tape = drive->driver_data; 2284 idetape_tape_t *tape = drive->driver_data;
2297 idetape_pc_t *pc = tape->pc; 2285 idetape_pc_t *pc = tape->pc;
2298 atapi_status_t status; 2286 u8 stat;
2299 2287
2300 status.all = HWIF(drive)->INB(IDE_STATUS_REG); 2288 stat = drive->hwif->INB(IDE_STATUS_REG);
2301 if (status.b.dsc) { 2289 if (stat & SEEK_STAT) {
2302 if (status.b.check) { 2290 if (stat & ERR_STAT) {
2303 /* Error detected */ 2291 /* Error detected */
2304 if (pc->c[0] != IDETAPE_TEST_UNIT_READY_CMD) 2292 if (pc->c[0] != IDETAPE_TEST_UNIT_READY_CMD)
2305 printk(KERN_ERR "ide-tape: %s: I/O error, ", 2293 printk(KERN_ERR "ide-tape: %s: I/O error, ",
@@ -2417,7 +2405,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
2417 idetape_tape_t *tape = drive->driver_data; 2405 idetape_tape_t *tape = drive->driver_data;
2418 idetape_pc_t *pc = NULL; 2406 idetape_pc_t *pc = NULL;
2419 struct request *postponed_rq = tape->postponed_rq; 2407 struct request *postponed_rq = tape->postponed_rq;
2420 atapi_status_t status; 2408 u8 stat;
2421 2409
2422#if IDETAPE_DEBUG_LOG 2410#if IDETAPE_DEBUG_LOG
2423#if 0 2411#if 0
@@ -2465,7 +2453,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
2465 * If the tape is still busy, postpone our request and service 2453 * If the tape is still busy, postpone our request and service
2466 * the other device meanwhile. 2454 * the other device meanwhile.
2467 */ 2455 */
2468 status.all = HWIF(drive)->INB(IDE_STATUS_REG); 2456 stat = drive->hwif->INB(IDE_STATUS_REG);
2469 2457
2470 if (!drive->dsc_overlap && !(rq->cmd[0] & REQ_IDETAPE_PC2)) 2458 if (!drive->dsc_overlap && !(rq->cmd[0] & REQ_IDETAPE_PC2))
2471 set_bit(IDETAPE_IGNORE_DSC, &tape->flags); 2459 set_bit(IDETAPE_IGNORE_DSC, &tape->flags);
@@ -2481,7 +2469,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
2481 tape->insert_speed = tape->insert_size / 1024 * HZ / (jiffies - tape->insert_time); 2469 tape->insert_speed = tape->insert_size / 1024 * HZ / (jiffies - tape->insert_time);
2482 calculate_speeds(drive); 2470 calculate_speeds(drive);
2483 if (!test_and_clear_bit(IDETAPE_IGNORE_DSC, &tape->flags) && 2471 if (!test_and_clear_bit(IDETAPE_IGNORE_DSC, &tape->flags) &&
2484 !status.b.dsc) { 2472 (stat & SEEK_STAT) == 0) {
2485 if (postponed_rq == NULL) { 2473 if (postponed_rq == NULL) {
2486 tape->dsc_polling_start = jiffies; 2474 tape->dsc_polling_start = jiffies;
2487 tape->dsc_polling_frequency = tape->best_dsc_rw_frequency; 2475 tape->dsc_polling_frequency = tape->best_dsc_rw_frequency;
@@ -2502,9 +2490,6 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
2502 } 2490 }
2503 if (rq->cmd[0] & REQ_IDETAPE_READ) { 2491 if (rq->cmd[0] & REQ_IDETAPE_READ) {
2504 tape->buffer_head++; 2492 tape->buffer_head++;
2505#if USE_IOTRACE
2506 IO_trace(IO_IDETAPE_FIFO, tape->pipeline_head, tape->buffer_head, tape->tape_head, tape->minor);
2507#endif
2508 tape->postpone_cnt = 0; 2493 tape->postpone_cnt = 0;
2509 pc = idetape_next_pc_storage(drive); 2494 pc = idetape_next_pc_storage(drive);
2510 idetape_create_read_cmd(tape, pc, rq->current_nr_sectors, (struct idetape_bh *)rq->special); 2495 idetape_create_read_cmd(tape, pc, rq->current_nr_sectors, (struct idetape_bh *)rq->special);
@@ -2512,9 +2497,6 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
2512 } 2497 }
2513 if (rq->cmd[0] & REQ_IDETAPE_WRITE) { 2498 if (rq->cmd[0] & REQ_IDETAPE_WRITE) {
2514 tape->buffer_head++; 2499 tape->buffer_head++;
2515#if USE_IOTRACE
2516 IO_trace(IO_IDETAPE_FIFO, tape->pipeline_head, tape->buffer_head, tape->tape_head, tape->minor);
2517#endif
2518 tape->postpone_cnt = 0; 2500 tape->postpone_cnt = 0;
2519 pc = idetape_next_pc_storage(drive); 2501 pc = idetape_next_pc_storage(drive);
2520 idetape_create_write_cmd(tape, pc, rq->current_nr_sectors, (struct idetape_bh *)rq->special); 2502 idetape_create_write_cmd(tape, pc, rq->current_nr_sectors, (struct idetape_bh *)rq->special);
@@ -3241,9 +3223,6 @@ static int idetape_add_chrdev_write_request (ide_drive_t *drive, int blocks)
3241 idetape_switch_buffers(tape, new_stage); 3223 idetape_switch_buffers(tape, new_stage);
3242 idetape_add_stage_tail(drive, new_stage); 3224 idetape_add_stage_tail(drive, new_stage);
3243 tape->pipeline_head++; 3225 tape->pipeline_head++;
3244#if USE_IOTRACE
3245 IO_trace(IO_IDETAPE_FIFO, tape->pipeline_head, tape->buffer_head, tape->tape_head, tape->minor);
3246#endif
3247 calculate_speeds(drive); 3226 calculate_speeds(drive);
3248 3227
3249 /* 3228 /*
@@ -3493,9 +3472,6 @@ static int idetape_add_chrdev_read_request (ide_drive_t *drive,int blocks)
3493 idetape_remove_stage_head(drive); 3472 idetape_remove_stage_head(drive);
3494 spin_unlock_irqrestore(&tape->spinlock, flags); 3473 spin_unlock_irqrestore(&tape->spinlock, flags);
3495 tape->pipeline_head++; 3474 tape->pipeline_head++;
3496#if USE_IOTRACE
3497 IO_trace(IO_IDETAPE_FIFO, tape->pipeline_head, tape->buffer_head, tape->tape_head, tape->minor);
3498#endif
3499 calculate_speeds(drive); 3475 calculate_speeds(drive);
3500 } 3476 }
3501#if IDETAPE_DEBUG_BUGS 3477#if IDETAPE_DEBUG_BUGS