taglinefilesource code
tape1225drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape1237drivers/block/ide-tape.ctape->block_address=0;      
tape1238drivers/block/ide-tape.ctape->block_address_valid=0;
tape1239drivers/block/ide-tape.ctape->pc_stack_index=0;
tape1240drivers/block/ide-tape.ctape->failed_pc=NULL;
tape1241drivers/block/ide-tape.ctape->postponed_rq=NULL;
tape1242drivers/block/ide-tape.ctape->busy=0;
tape1243drivers/block/ide-tape.ctape->active_data_request=NULL;
tape1244drivers/block/ide-tape.ctape->current_number_of_stages=0;
tape1245drivers/block/ide-tape.ctape->first_stage=tape->next_stage=tape->last_stage=NULL;
tape1246drivers/block/ide-tape.ctape->error_in_pipeline_stage=0;
tape1247drivers/block/ide-tape.ctape->request_status=0;
tape1248drivers/block/ide-tape.ctape->chrdev_direction=idetape_direction_none;
tape1249drivers/block/ide-tape.ctape->reset_issued=0;
tape1250drivers/block/ide-tape.ctape->pc=&(tape->pc_stack [0]);
tape1253drivers/block/ide-tape.ctape->max_number_of_stages=IDETAPE_MIN_PIPELINE_STAGES;
tape1256drivers/block/ide-tape.ctape->max_number_of_stages=0;
tape1262drivers/block/ide-tape.ctape->data_buffer_size=tape->capabilities.ctl*tape->tape_block_size;
tape1264drivers/block/ide-tape.callocation_length=tape->data_buffer_size;
tape1265drivers/block/ide-tape.cif (tape->data_buffer_size % IDETAPE_ALLOCATION_BLOCK)
tape1269drivers/block/ide-tape.ctape->data_buffer=tape->merge_buffer=NULL;
tape1271drivers/block/ide-tape.ctape->data_buffer=kmalloc (allocation_length,GFP_KERNEL);
tape1272drivers/block/ide-tape.ctape->merge_buffer=kmalloc (allocation_length,GFP_KERNEL);
tape1273drivers/block/ide-tape.cif (tape->data_buffer == NULL || tape->merge_buffer == NULL) {
tape1282drivers/block/ide-tape.ctape->merge_buffer_size=tape->merge_buffer_offset=0;
tape1307drivers/block/ide-tape.cservice_time=((double) tape->data_buffer_size/1024.0)/((double) tape->capabilities.speed*(1000.0/1024.0));
tape1308drivers/block/ide-tape.cnr_units=(double) tape->capabilities.buffer_size*512.0/(double) tape->data_buffer_size;
tape1310drivers/block/ide-tape.cif (tape->max_number_of_stages)  
tape1311drivers/block/ide-tape.ctape->best_dsc_rw_frequency=(unsigned long) (0.5*nr_units*service_time*HZ);
tape1313drivers/block/ide-tape.ctape->best_dsc_rw_frequency=(unsigned long) (service_time*HZ);
tape1319drivers/block/ide-tape.cif (tape->best_dsc_rw_frequency > IDETAPE_DSC_READ_WRITE_LOWEST_FREQUENCY) {
tape1320drivers/block/ide-tape.cprintk ("ide-tape: Although the recommended polling period is %lu jiffies, \n",tape->best_dsc_rw_frequency);
tape1323drivers/block/ide-tape.ctape->best_dsc_rw_frequency = IDETAPE_DSC_READ_WRITE_LOWEST_FREQUENCY;
tape1326drivers/block/ide-tape.cif (tape->best_dsc_rw_frequency < IDETAPE_DSC_READ_WRITE_FALLBACK_FREQUENCY) {
tape1327drivers/block/ide-tape.cprintk ("ide-tape: Although the recommended polling period is %lu jiffies, \n",tape->best_dsc_rw_frequency);
tape1329drivers/block/ide-tape.ctape->best_dsc_rw_frequency = IDETAPE_DSC_READ_WRITE_FALLBACK_FREQUENCY;
tape1333drivers/block/ide-tape.ctape->best_dsc_rw_frequency=IDETAPE_DSC_READ_WRITE_FALLBACK_FREQUENCY;
tape1336drivers/block/ide-tape.cprintk ("ide-tape: Tape speed - %d KBps. Recommended transfer unit - %d bytes.\n",tape->capabilities.speed,tape->data_buffer_size);
tape1351drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape1370drivers/block/ide-tape.ctape->capabilities=*capabilities;    /* Save us a copy */
tape1371drivers/block/ide-tape.ctape->tape_block_size=capabilities->blk512 ? 512:1024;
tape1376drivers/block/ide-tape.ctape->tape_block_size=512;
tape1377drivers/block/ide-tape.ctape->capabilities.ctl=52;
tape1378drivers/block/ide-tape.ctape->capabilities.speed=450;
tape1379drivers/block/ide-tape.ctape->capabilities.buffer_size=6*52;
tape1460drivers/block/ide-tape.cidetape_tape_t *tape;
tape1465drivers/block/ide-tape.ctape=&(drive->tape);
tape1468drivers/block/ide-tape.cif (tape->pc->c[0] == IDETAPE_REQUEST_SENSE_CMD && pc->c[0] == IDETAPE_REQUEST_SENSE_CMD) {
tape1473drivers/block/ide-tape.cif (tape->failed_pc == NULL && pc->c[0] != IDETAPE_REQUEST_SENSE_CMD)
tape1474drivers/block/ide-tape.ctape->failed_pc=pc;
tape1475drivers/block/ide-tape.ctape->pc=pc;              /* Set the current packet command */
tape1488drivers/block/ide-tape.cprintk ("pc = %x, key = %x, asc = %x, ascq = %x\n",pc->c[0],tape->sense_key,tape->asc,tape->ascq);
tape1492drivers/block/ide-tape.ctape->failed_pc=NULL;
tape1578drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape1582drivers/block/ide-tape.cidetape_packet_command_t *pc=tape->pc;
tape1636drivers/block/ide-tape.ctape->dsc_polling_frequency=IDETAPE_DSC_FAST_MEDIA_ACCESS_FREQUENCY;
tape1640drivers/block/ide-tape.cif (tape->failed_pc == pc)
tape1641drivers/block/ide-tape.ctape->failed_pc=NULL;
tape1726drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape1734drivers/block/ide-tape.cif (tape->postponed_rq != NULL)
tape1738drivers/block/ide-tape.ctape->dsc_timer.expires=jiffies + tape->dsc_polling_frequency;  /* Set timer to poll for */
tape1739drivers/block/ide-tape.ctape->dsc_timeout=jiffies+IDETAPE_DSC_TIMEOUT;      /* actual completion */
tape1740drivers/block/ide-tape.ctape->dsc_timer.data=(unsigned long) drive;
tape1741drivers/block/ide-tape.ctape->dsc_timer.function=&idetape_poll_for_dsc;
tape1742drivers/block/ide-tape.cinit_timer (&(tape->dsc_timer));
tape1748drivers/block/ide-tape.ctape->postponed_rq = rq = HWGROUP(drive)->rq;
tape1758drivers/block/ide-tape.ctape->last_status=status.all;
tape1759drivers/block/ide-tape.ctape->request_status=1;  
tape1761drivers/block/ide-tape.ctape->dsc_polling_start=jiffies;
tape1762drivers/block/ide-tape.cadd_timer(&(tape->dsc_timer));    /* Activate the polling timer */
tape1775drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape1786drivers/block/ide-tape.ctape->dsc_received=1;
tape1787drivers/block/ide-tape.cdel_timer (&(tape->dsc_timer));      /* Stop polling and put back the postponed */
tape1792drivers/block/ide-tape.cif (jiffies > tape->dsc_timeout)   { /* Timeout */
tape1793drivers/block/ide-tape.ctape->dsc_received=0;
tape1794drivers/block/ide-tape.cdel_timer (&(tape->dsc_timer));
tape1802drivers/block/ide-tape.cif (jiffies - tape->dsc_polling_start > IDETAPE_FAST_SLOW_THRESHOLD)
tape1803drivers/block/ide-tape.ctape->dsc_timer.expires = jiffies + IDETAPE_DSC_SLOW_MEDIA_ACCESS_FREQUENCY;
tape1805drivers/block/ide-tape.ctape->dsc_timer.expires = jiffies + tape->dsc_polling_frequency;
tape1806drivers/block/ide-tape.cadd_timer(&(tape->dsc_timer));
tape1831drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape1859drivers/block/ide-tape.cstatus.all=tape->last_status;
tape1862drivers/block/ide-tape.ctape->dsc_received=1;
tape1864drivers/block/ide-tape.cdel_timer (&(tape->dsc_timer));
tape1920drivers/block/ide-tape.cif (tape->postponed_rq->cmd != IDETAPE_PACKET_COMMAND_REQUEST_TYPE1) {
tape1928drivers/block/ide-tape.cdel_timer (&(tape->dsc_timer));
tape1960drivers/block/ide-tape.cif (tape->postponed_rq->cmd == IDETAPE_PACKET_COMMAND_REQUEST_TYPE1) {
tape1969drivers/block/ide-tape.ctape->request_status=1;
tape1971drivers/block/ide-tape.ctape->dsc_timer.expires = jiffies + tape->dsc_polling_frequency;
tape1972drivers/block/ide-tape.cadd_timer(&(tape->dsc_timer));
tape1983drivers/block/ide-tape.cdel_timer (&(tape->dsc_timer));
tape1995drivers/block/ide-tape.ctape->request_status=1;
tape1998drivers/block/ide-tape.cif (jiffies > tape->dsc_timeout)   {     /* Timeout */
tape1999drivers/block/ide-tape.ctape->dsc_received=0;
tape2002drivers/block/ide-tape.cdel_timer (&(tape->dsc_timer));
tape2009drivers/block/ide-tape.cif (jiffies - tape->dsc_polling_start > IDETAPE_FAST_SLOW_THRESHOLD)
tape2010drivers/block/ide-tape.ctape->dsc_timer.expires = jiffies + IDETAPE_DSC_SLOW_MEDIA_ACCESS_FREQUENCY;
tape2012drivers/block/ide-tape.ctape->dsc_timer.expires = jiffies + tape->dsc_polling_frequency;
tape2013drivers/block/ide-tape.cadd_timer(&(tape->dsc_timer));
tape2025drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
tape2031drivers/block/ide-tape.cif (tape->postponed_rq == NULL) {
tape2036drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive, tape->postponed_rq, ide_next);
tape2053drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape2057drivers/block/ide-tape.cpc=tape->pc;
tape2061drivers/block/ide-tape.cif (tape->dsc_received) {
tape2071drivers/block/ide-tape.cif (tape->failed_pc == pc)
tape2072drivers/block/ide-tape.ctape->failed_pc=NULL;
tape2086drivers/block/ide-tape.ctape->failed_pc=NULL;
tape2128drivers/block/ide-tape.cidetape_tape_t *tape;
tape2131drivers/block/ide-tape.ctape=&(drive->tape);
tape2137drivers/block/ide-tape.cif (!tape->pc->error) {
tape2153drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape2155drivers/block/ide-tape.cint blocks_read=tape->pc->actually_transferred/tape->tape_block_size;
tape2161drivers/block/ide-tape.ctape->block_address+=blocks_read;
tape2164drivers/block/ide-tape.cif (!tape->pc->error)
tape2167drivers/block/ide-tape.crq->errors=tape->pc->error;
tape2181drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape2183drivers/block/ide-tape.cint blocks_written=tape->pc->actually_transferred/tape->tape_block_size;
tape2189drivers/block/ide-tape.ctape->block_address+=blocks_written;
tape2192drivers/block/ide-tape.cif (!tape->pc->error)
tape2195drivers/block/ide-tape.crq->errors=tape->pc->error;
tape2204drivers/block/ide-tape.cidetape_tape_t *tape;
tape2206drivers/block/ide-tape.ctape=&(drive->tape);
tape2208drivers/block/ide-tape.cidetape_display_inquiry_result (tape->pc->buffer);
tape2394drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape2399drivers/block/ide-tape.cif (!tape->pc->error) {
tape2403drivers/block/ide-tape.cidetape_analyze_error (drive,(idetape_request_sense_result_t *) tape->pc->buffer);
tape2422drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape2423drivers/block/ide-tape.cidetape_packet_command_t *pc=tape->failed_pc;
tape2425drivers/block/ide-tape.ctape->sense_key=result->sense_key;
tape2426drivers/block/ide-tape.ctape->asc=result->asc;
tape2427drivers/block/ide-tape.ctape->ascq=result->ascq;
tape2460drivers/block/ide-tape.cpc->actually_transferred=pc->request_transfer-tape->tape_block_size*idetape_swap_long (*long_ptr);
tape2754drivers/block/ide-tape.cidetape_tape_t *tape;
tape2758drivers/block/ide-tape.ctape=&(drive->tape);
tape2766drivers/block/ide-tape.cif (!tape->pc->error) {
tape2767drivers/block/ide-tape.cresult=(idetape_read_position_result_t *) tape->pc->buffer;
tape2777drivers/block/ide-tape.ctape->block_address_valid=0;
tape2784drivers/block/ide-tape.ctape->block_address=idetape_swap_long (result->first_block);
tape2785drivers/block/ide-tape.ctape->block_address_valid=1;
tape2835drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
tape2850drivers/block/ide-tape.cif (tape->active_data_request == rq) {    /* The request was a pipelined data transfer request */
tape2854drivers/block/ide-tape.cif (tape->active_stage == NULL)
tape2858drivers/block/ide-tape.cidetape_copy_buffer_to_stage (tape->active_stage,tape->data_buffer);
tape2861drivers/block/ide-tape.ctape->active_stage=NULL;
tape2862drivers/block/ide-tape.ctape->active_data_request=NULL;
tape2866drivers/block/ide-tape.ctape->error_in_pipeline_stage=rq->errors;
tape2870drivers/block/ide-tape.cif (tape->next_stage == NULL) {
tape2887drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive,tape->active_data_request,ide_end);
tape2889drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive,tape->active_data_request,ide_next);
tape2902drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape2956drivers/block/ide-tape.cif (tape->failed_pc != NULL && tape->pc->c[0] == IDETAPE_REQUEST_SENSE_CMD) {
tape2957drivers/block/ide-tape.cidetape_issue_packet_command (drive,tape->failed_pc,&idetape_pc_intr);
tape2963drivers/block/ide-tape.cif (tape->postponed_rq != NULL) {
tape2965drivers/block/ide-tape.cif (tape->postponed_rq->rq_status != RQ_ACTIVE || rq != tape->postponed_rq) {
tape2975drivers/block/ide-tape.ctape->postponed_rq = NULL;
tape2986drivers/block/ide-tape.ctape->postponed_rq = NULL;
tape2997drivers/block/ide-tape.cif (tape->reset_issued) {
tape2999drivers/block/ide-tape.ctape->reset_issued=0;
tape3008drivers/block/ide-tape.ctape->dsc_polling_frequency=tape->best_dsc_rw_frequency;
tape3018drivers/block/ide-tape.cpc->buffer_size=rq->current_nr_sectors*tape->tape_block_size;
tape3020drivers/block/ide-tape.cpc->request_transfer=rq->current_nr_sectors*tape->tape_block_size;
tape3030drivers/block/ide-tape.ctape->dsc_polling_frequency=tape->best_dsc_rw_frequency;
tape3040drivers/block/ide-tape.cpc->buffer_size=rq->current_nr_sectors*tape->tape_block_size;
tape3042drivers/block/ide-tape.cpc->request_transfer=rq->current_nr_sectors*tape->tape_block_size;
tape3060drivers/block/ide-tape.ctape->dsc_polling_frequency=IDETAPE_DSC_READ_WRITE_FALLBACK_FREQUENCY;
tape3173drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
tape3180drivers/block/ide-tape.cif (tape->active_data_request != NULL) {
tape3189drivers/block/ide-tape.crq.sector = tape->block_address;
tape3193drivers/block/ide-tape.creturn (tape->tape_block_size*(blocks-rq.current_nr_sectors));
tape3204drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
tape3216drivers/block/ide-tape.crq.sector = tape->block_address;
tape3219drivers/block/ide-tape.cif (tape->active_data_request != NULL || tape->current_number_of_stages <= 0.25*tape->max_number_of_stages) {
tape3228drivers/block/ide-tape.cif (tape->active_data_request == NULL)
tape3232drivers/block/ide-tape.cif (tape->first_stage == NULL) {
tape3243drivers/block/ide-tape.cif (tape->active_data_request == &(tape->first_stage->rq))
tape3244drivers/block/ide-tape.cidetape_wait_for_request (tape->active_data_request);
tape3247drivers/block/ide-tape.crq_ptr=&(tape->first_stage->rq);
tape3248drivers/block/ide-tape.cbytes_read=tape->tape_block_size*(rq_ptr->nr_sectors-rq_ptr->current_nr_sectors);
tape3250drivers/block/ide-tape.cidetape_copy_buffer_from_stage (tape->first_stage,buffer);
tape3254drivers/block/ide-tape.cif (bytes_read > blocks*tape->tape_block_size) {
tape3256drivers/block/ide-tape.cbytes_read=blocks*tape->tape_block_size;
tape3277drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
tape3298drivers/block/ide-tape.cif (tape->active_data_request != NULL) {
tape3299drivers/block/ide-tape.cidetape_wait_for_request (tape->active_data_request);
tape3318drivers/block/ide-tape.crq->sector = tape->block_address;  /* Doesn't actually matter - We always assume sequential access */
tape3337drivers/block/ide-tape.cif (tape->active_data_request == NULL && tape->current_number_of_stages >= 0.75*tape->max_number_of_stages)
tape3340drivers/block/ide-tape.cif (tape->error_in_pipeline_stage) {    /* Return a deferred error */
tape3341drivers/block/ide-tape.ctape->error_in_pipeline_stage=0;
tape3351drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
tape3355drivers/block/ide-tape.cif (tape->chrdev_direction != idetape_direction_read) {
tape3361drivers/block/ide-tape.ctape->merge_buffer_size=tape->merge_buffer_offset=0;
tape3362drivers/block/ide-tape.ctape->chrdev_direction=idetape_direction_none;
tape3364drivers/block/ide-tape.cif (tape->first_stage == NULL)
tape3368drivers/block/ide-tape.ctape->next_stage=NULL;
tape3369drivers/block/ide-tape.cif (tape->active_data_request != NULL)
tape3370drivers/block/ide-tape.cidetape_wait_for_request (tape->active_data_request);
tape3373drivers/block/ide-tape.cwhile (tape->first_stage != NULL)
tape3377drivers/block/ide-tape.ctape->max_number_of_stages=IDETAPE_MIN_PIPELINE_STAGES;
tape3379drivers/block/ide-tape.ctape->max_number_of_stages=0;
tape3391drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
tape3394drivers/block/ide-tape.cif (tape->active_data_request == NULL)
tape3398drivers/block/ide-tape.cif (tape->active_data_request == NULL) {
tape3403drivers/block/ide-tape.cif (tape->last_stage != NULL)
tape3404drivers/block/ide-tape.cidetape_wait_for_request (&(tape->last_stage->rq));
tape3406drivers/block/ide-tape.celse if (tape->active_data_request != NULL)
tape3407drivers/block/ide-tape.cidetape_wait_for_request (tape->active_data_request);
tape3414drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
tape3418drivers/block/ide-tape.cif (tape->chrdev_direction != idetape_direction_write) {
tape3422drivers/block/ide-tape.cif (tape->merge_buffer_size > tape->data_buffer_size) {
tape3424drivers/block/ide-tape.ctape->merge_buffer_size = tape->data_buffer_size;
tape3428drivers/block/ide-tape.cif (tape->merge_buffer_size) {
tape3429drivers/block/ide-tape.cblocks=tape->merge_buffer_size/tape->tape_block_size;
tape3430drivers/block/ide-tape.cif (tape->merge_buffer_size % tape->tape_block_size) {
tape3432drivers/block/ide-tape.cmemset (tape->merge_buffer+tape->merge_buffer_size,0,tape->data_buffer_size-tape->merge_buffer_size);
tape3434drivers/block/ide-tape.c(void) idetape_add_chrdev_write_request (drive,blocks,tape->merge_buffer);
tape3435drivers/block/ide-tape.ctape->merge_buffer_size=0;
tape3440drivers/block/ide-tape.ctape->error_in_pipeline_stage=0;
tape3441drivers/block/ide-tape.ctape->chrdev_direction=idetape_direction_none;
tape3451drivers/block/ide-tape.ctape->max_number_of_stages=IDETAPE_MIN_PIPELINE_STAGES;
tape3453drivers/block/ide-tape.ctape->max_number_of_stages=0;
tape3456drivers/block/ide-tape.cif (tape->first_stage != NULL || tape->next_stage != NULL || tape->last_stage != NULL || tape->current_number_of_stages != 0) {
tape3538drivers/block/ide-tape.cidetape_tape_t *tape;
tape3540drivers/block/ide-tape.ctape=&(drive->tape);
tape3542drivers/block/ide-tape.cprintk ("ide-tape: pc_stack_index=%d\n",tape->pc_stack_index);
tape3544drivers/block/ide-tape.cif (tape->pc_stack_index==IDETAPE_PC_STACK)
tape3545drivers/block/ide-tape.ctape->pc_stack_index=0;
tape3546drivers/block/ide-tape.creturn (&(tape->pc_stack [tape->pc_stack_index++]));
tape3565drivers/block/ide-tape.cidetape_tape_t *tape;
tape3567drivers/block/ide-tape.ctape=&(drive->tape);
tape3570drivers/block/ide-tape.cprintk ("ide-tape: rq_stack_index=%d\n",tape->rq_stack_index);
tape3572drivers/block/ide-tape.cif (tape->rq_stack_index==IDETAPE_PC_STACK)
tape3573drivers/block/ide-tape.ctape->rq_stack_index=0;
tape3574drivers/block/ide-tape.creturn (&(tape->rq_stack [tape->rq_stack_index++]));
tape3588drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape3597drivers/block/ide-tape.cif (tape->busy) {
tape3602drivers/block/ide-tape.ctape->busy=1;
tape3611drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape3619drivers/block/ide-tape.ctape->busy=0;
tape3653drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape3661drivers/block/ide-tape.cif (tape->chrdev_direction != idetape_direction_read) {    /* Initialize read operation */
tape3662drivers/block/ide-tape.cif (tape->chrdev_direction == idetape_direction_write) {
tape3673drivers/block/ide-tape.cbytes_read=idetape_queue_rw_tail (drive,IDETAPE_READ_REQUEST,0,tape->merge_buffer);
tape3677drivers/block/ide-tape.ctape->chrdev_direction=idetape_direction_read;
tape3683drivers/block/ide-tape.cif (tape->merge_buffer_size) {
tape3685drivers/block/ide-tape.cif (tape->merge_buffer_offset+tape->merge_buffer_size > tape->data_buffer_size) {
tape3687drivers/block/ide-tape.ctape->merge_buffer_offset=0;tape->merge_buffer_size=tape->data_buffer_size-1;
tape3690drivers/block/ide-tape.cactually_read=IDETAPE_MIN (tape->merge_buffer_size,count);
tape3691drivers/block/ide-tape.cmemcpy_tofs (buf_ptr,tape->merge_buffer+tape->merge_buffer_offset,actually_read);
tape3692drivers/block/ide-tape.cbuf_ptr+=actually_read;tape->merge_buffer_size-=actually_read;
tape3693drivers/block/ide-tape.ccount-=actually_read;tape->merge_buffer_offset+=actually_read;
tape3696drivers/block/ide-tape.cwhile (count >= tape->data_buffer_size) {
tape3697drivers/block/ide-tape.cbytes_read=idetape_add_chrdev_read_request (drive,tape->capabilities.ctl,tape->merge_buffer);
tape3700drivers/block/ide-tape.cmemcpy_tofs (buf_ptr,tape->merge_buffer,bytes_read);
tape3705drivers/block/ide-tape.cbytes_read=idetape_add_chrdev_read_request (drive,tape->capabilities.ctl,tape->merge_buffer);
tape3709drivers/block/ide-tape.cmemcpy_tofs (buf_ptr,tape->merge_buffer,temp);
tape3711drivers/block/ide-tape.ctape->merge_buffer_offset=temp;
tape3712drivers/block/ide-tape.ctape->merge_buffer_size=bytes_read-temp;
tape3721drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape3729drivers/block/ide-tape.cif (tape->chrdev_direction != idetape_direction_write) {  /* Initialize write operation */
tape3730drivers/block/ide-tape.cif (tape->chrdev_direction == idetape_direction_read)
tape3739drivers/block/ide-tape.cretval=idetape_queue_rw_tail (drive,IDETAPE_WRITE_REQUEST,0,tape->merge_buffer);
tape3743drivers/block/ide-tape.ctape->chrdev_direction=idetape_direction_write;
tape3749drivers/block/ide-tape.cif (tape->merge_buffer_size) {
tape3751drivers/block/ide-tape.cif (tape->merge_buffer_size >= tape->data_buffer_size) {
tape3753drivers/block/ide-tape.ctape->merge_buffer_size=0;
tape3757drivers/block/ide-tape.cactually_written=IDETAPE_MIN (tape->data_buffer_size-tape->merge_buffer_size,count);
tape3758drivers/block/ide-tape.cmemcpy_fromfs (tape->merge_buffer+tape->merge_buffer_size,buf_ptr,actually_written);
tape3759drivers/block/ide-tape.cbuf_ptr+=actually_written;tape->merge_buffer_size+=actually_written;count-=actually_written;
tape3761drivers/block/ide-tape.cif (tape->merge_buffer_size == tape->data_buffer_size) {
tape3762drivers/block/ide-tape.ctape->merge_buffer_size=0;
tape3763drivers/block/ide-tape.cretval=idetape_add_chrdev_write_request (drive,tape->capabilities.ctl,tape->merge_buffer);
tape3769drivers/block/ide-tape.cwhile (count >= tape->data_buffer_size) {
tape3770drivers/block/ide-tape.cmemcpy_fromfs (tape->merge_buffer,buf_ptr,tape->data_buffer_size);
tape3771drivers/block/ide-tape.cbuf_ptr+=tape->data_buffer_size;count-=tape->data_buffer_size;
tape3772drivers/block/ide-tape.cretval=idetape_add_chrdev_write_request (drive,tape->capabilities.ctl,tape->merge_buffer);
tape3773drivers/block/ide-tape.cactually_written+=tape->data_buffer_size;
tape3780drivers/block/ide-tape.cmemcpy_fromfs (tape->merge_buffer,buf_ptr,count);
tape3781drivers/block/ide-tape.ctape->merge_buffer_size+=count;
tape3821drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape3832drivers/block/ide-tape.cif (tape->chrdev_direction == idetape_direction_write) {
tape3837drivers/block/ide-tape.cif (tape->chrdev_direction == idetape_direction_read && cmd != MTIOCTOP)
tape3851drivers/block/ide-tape.cmtget.mt_dsreg=(tape->data_buffer_size << MT_ST_BLKSIZE_SHIFT) & MT_ST_BLKSIZE_MASK;
tape3860drivers/block/ide-tape.cmtpos.mt_blkno=tape->block_address;
tape3926drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape3958drivers/block/ide-tape.cif (tape->chrdev_direction == idetape_direction_read)
tape4008drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4013drivers/block/ide-tape.cif (tape->chrdev_direction == idetape_direction_read) {
tape4020drivers/block/ide-tape.ctape->merge_buffer_size=tape->merge_buffer_offset=0;
tape4021drivers/block/ide-tape.cwhile (tape->first_stage != NULL) {
tape4029drivers/block/ide-tape.cif (tape->active_data_request == &(tape->first_stage->rq))
tape4030drivers/block/ide-tape.cidetape_wait_for_request (tape->active_data_request);
tape4033drivers/block/ide-tape.cerrors=tape->first_stage->rq.errors;
tape4064drivers/block/ide-tape.cif (!tape->capabilities.sprev)
tape4070drivers/block/ide-tape.cif (!tape->capabilities.sprev)
tape4075drivers/block/ide-tape.cif (!tape->capabilities.sprev)
tape4094drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4109drivers/block/ide-tape.cif (tape->busy) {
tape4114drivers/block/ide-tape.ctape->busy=1;
tape4117drivers/block/ide-tape.callocation_length=tape->data_buffer_size;
tape4118drivers/block/ide-tape.cif (tape->data_buffer_size % IDETAPE_ALLOCATION_BLOCK)
tape4122drivers/block/ide-tape.cif (tape->data_buffer == NULL)
tape4123drivers/block/ide-tape.ctape->data_buffer=kmalloc (allocation_length,GFP_KERNEL);
tape4124drivers/block/ide-tape.cif (tape->data_buffer == NULL)
tape4126drivers/block/ide-tape.cif (tape->merge_buffer == NULL)
tape4127drivers/block/ide-tape.ctape->merge_buffer=kmalloc (allocation_length,GFP_KERNEL);
tape4128drivers/block/ide-tape.cif (tape->merge_buffer == NULL) {
tape4129drivers/block/ide-tape.ckfree (tape->data_buffer);
tape4132drivers/block/ide-tape.ctape->busy=0;
tape4137drivers/block/ide-tape.cif (!tape->block_address_valid) {
tape4140drivers/block/ide-tape.ctape->busy=0;
tape4156drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4165drivers/block/ide-tape.cif (tape->chrdev_direction == idetape_direction_write) {
tape4172drivers/block/ide-tape.cif (tape->chrdev_direction == idetape_direction_read) {
tape4184drivers/block/ide-tape.ckfree (tape->data_buffer);
tape4185drivers/block/ide-tape.ctape->data_buffer=NULL;
tape4186drivers/block/ide-tape.cif (!tape->merge_buffer_size) {
tape4187drivers/block/ide-tape.ckfree (tape->merge_buffer);
tape4188drivers/block/ide-tape.ctape->merge_buffer=NULL;
tape4193drivers/block/ide-tape.ctape->busy=0;
tape4282drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4291drivers/block/ide-tape.cif (tape->current_number_of_stages>=tape->max_number_of_stages) {
tape4301drivers/block/ide-tape.cbuffers_num=tape->data_buffer_size / IDETAPE_ALLOCATION_BLOCK;
tape4302drivers/block/ide-tape.cif (tape->data_buffer_size % IDETAPE_ALLOCATION_BLOCK)
tape4454drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4460drivers/block/ide-tape.ctape->max_number_of_stages+=IDETAPE_INCREASE_STAGES_RATE*
tape4463drivers/block/ide-tape.cif (tape->max_number_of_stages >= IDETAPE_MAX_PIPELINE_STAGES)
tape4464drivers/block/ide-tape.ctape->max_number_of_stages = IDETAPE_MAX_PIPELINE_STAGES;
tape4467drivers/block/ide-tape.cprintk ("Maximum number of stages: %d\n",tape->max_number_of_stages);
tape4482drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4489drivers/block/ide-tape.cstage->prev=tape->last_stage;
tape4490drivers/block/ide-tape.cif (tape->last_stage != NULL)
tape4491drivers/block/ide-tape.ctape->last_stage->next=stage;
tape4493drivers/block/ide-tape.ctape->first_stage=tape->next_stage=stage;
tape4494drivers/block/ide-tape.ctape->last_stage=stage;
tape4495drivers/block/ide-tape.cif (tape->next_stage == NULL)
tape4496drivers/block/ide-tape.ctape->next_stage=tape->last_stage;
tape4497drivers/block/ide-tape.ctape->current_number_of_stages++;
tape4509drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4516drivers/block/ide-tape.cif (tape->first_stage == NULL) {
tape4520drivers/block/ide-tape.cif (tape->active_stage == tape->first_stage) {
tape4525drivers/block/ide-tape.cstage=tape->first_stage;
tape4526drivers/block/ide-tape.ctape->first_stage=stage->next;
tape4528drivers/block/ide-tape.ctape->current_number_of_stages--;
tape4529drivers/block/ide-tape.cif (tape->first_stage == NULL) {
tape4530drivers/block/ide-tape.ctape->last_stage=NULL;
tape4532drivers/block/ide-tape.cif (tape->next_stage != NULL)
tape4534drivers/block/ide-tape.cif (tape->current_number_of_stages)
tape4548drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4550drivers/block/ide-tape.cif (tape->next_stage == NULL)
tape4553drivers/block/ide-tape.cif (tape->active_data_request == NULL) {
tape4555drivers/block/ide-tape.c(void) (ide_do_drive_cmd (drive,tape->active_data_request,ide_end));
tape4567drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4568drivers/block/ide-tape.cidetape_pipeline_stage_t *stage=tape->next_stage;
tape4581drivers/block/ide-tape.cidetape_copy_buffer_from_stage (stage,tape->data_buffer);
tape4583drivers/block/ide-tape.crq->buffer=tape->data_buffer;
tape4584drivers/block/ide-tape.ctape->active_data_request=rq;
tape4585drivers/block/ide-tape.ctape->active_stage=stage;
tape4586drivers/block/ide-tape.ctape->next_stage=stage->next;
tape513drivers/block/ide-tape.hif (hwif->tape_drive->tape.request_status) {      \
tape515drivers/block/ide-tape.hhwif->tape_drive->tape.last_status=GET_STAT();    \
tape516drivers/block/ide-tape.hhwif->tape_drive->tape.request_status=0;    \
tape767drivers/block/ide.cdrive->tape.reset_issued=1;
tape346drivers/block/ide.hidetape_tape_t  tape;    /* for ide-tape.c */
tape198drivers/block/triton.csize = drive->tape.pc->request_transfer;