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;
tape1579drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape1583drivers/block/ide-tape.cidetape_packet_command_t *pc=tape->pc;
tape1637drivers/block/ide-tape.ctape->dsc_polling_frequency=IDETAPE_DSC_FAST_MEDIA_ACCESS_FREQUENCY;
tape1641drivers/block/ide-tape.cif (tape->failed_pc == pc)
tape1642drivers/block/ide-tape.ctape->failed_pc=NULL;
tape1727drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape1735drivers/block/ide-tape.cif (tape->postponed_rq != NULL)
tape1739drivers/block/ide-tape.ctape->dsc_timer.expires=jiffies + tape->dsc_polling_frequency;  /* Set timer to poll for */
tape1740drivers/block/ide-tape.ctape->dsc_timeout=jiffies+IDETAPE_DSC_TIMEOUT;      /* actual completion */
tape1741drivers/block/ide-tape.ctape->dsc_timer.data=(unsigned long) drive;
tape1742drivers/block/ide-tape.ctape->dsc_timer.function=&idetape_poll_for_dsc;
tape1743drivers/block/ide-tape.cinit_timer (&(tape->dsc_timer));
tape1749drivers/block/ide-tape.ctape->postponed_rq = rq = HWGROUP(drive)->rq;
tape1759drivers/block/ide-tape.ctape->last_status=status.all;
tape1760drivers/block/ide-tape.ctape->request_status=1;  
tape1762drivers/block/ide-tape.ctape->dsc_polling_start=jiffies;
tape1763drivers/block/ide-tape.cadd_timer(&(tape->dsc_timer));    /* Activate the polling timer */
tape1776drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape1787drivers/block/ide-tape.ctape->dsc_received=1;
tape1788drivers/block/ide-tape.cdel_timer (&(tape->dsc_timer));      /* Stop polling and put back the postponed */
tape1793drivers/block/ide-tape.cif (jiffies > tape->dsc_timeout)   { /* Timeout */
tape1794drivers/block/ide-tape.ctape->dsc_received=0;
tape1795drivers/block/ide-tape.cdel_timer (&(tape->dsc_timer));
tape1803drivers/block/ide-tape.cif (jiffies - tape->dsc_polling_start > IDETAPE_FAST_SLOW_THRESHOLD)
tape1804drivers/block/ide-tape.ctape->dsc_timer.expires = jiffies + IDETAPE_DSC_SLOW_MEDIA_ACCESS_FREQUENCY;
tape1806drivers/block/ide-tape.ctape->dsc_timer.expires = jiffies + tape->dsc_polling_frequency;
tape1807drivers/block/ide-tape.cadd_timer(&(tape->dsc_timer));
tape1832drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape1860drivers/block/ide-tape.cstatus.all=tape->last_status;
tape1863drivers/block/ide-tape.ctape->dsc_received=1;
tape1865drivers/block/ide-tape.cdel_timer (&(tape->dsc_timer));
tape1921drivers/block/ide-tape.cif (tape->postponed_rq->cmd != IDETAPE_PACKET_COMMAND_REQUEST_TYPE1) {
tape1929drivers/block/ide-tape.cdel_timer (&(tape->dsc_timer));
tape1961drivers/block/ide-tape.cif (tape->postponed_rq->cmd == IDETAPE_PACKET_COMMAND_REQUEST_TYPE1) {
tape1970drivers/block/ide-tape.ctape->request_status=1;
tape1972drivers/block/ide-tape.ctape->dsc_timer.expires = jiffies + tape->dsc_polling_frequency;
tape1973drivers/block/ide-tape.cadd_timer(&(tape->dsc_timer));
tape1984drivers/block/ide-tape.cdel_timer (&(tape->dsc_timer));
tape1996drivers/block/ide-tape.ctape->request_status=1;
tape1999drivers/block/ide-tape.cif (jiffies > tape->dsc_timeout)   {     /* Timeout */
tape2000drivers/block/ide-tape.ctape->dsc_received=0;
tape2003drivers/block/ide-tape.cdel_timer (&(tape->dsc_timer));
tape2010drivers/block/ide-tape.cif (jiffies - tape->dsc_polling_start > IDETAPE_FAST_SLOW_THRESHOLD)
tape2011drivers/block/ide-tape.ctape->dsc_timer.expires = jiffies + IDETAPE_DSC_SLOW_MEDIA_ACCESS_FREQUENCY;
tape2013drivers/block/ide-tape.ctape->dsc_timer.expires = jiffies + tape->dsc_polling_frequency;
tape2014drivers/block/ide-tape.cadd_timer(&(tape->dsc_timer));
tape2026drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
tape2032drivers/block/ide-tape.cif (tape->postponed_rq == NULL) {
tape2037drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive, tape->postponed_rq, ide_next);
tape2054drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape2058drivers/block/ide-tape.cpc=tape->pc;
tape2062drivers/block/ide-tape.cif (tape->dsc_received) {
tape2072drivers/block/ide-tape.cif (tape->failed_pc == pc)
tape2073drivers/block/ide-tape.ctape->failed_pc=NULL;
tape2087drivers/block/ide-tape.ctape->failed_pc=NULL;
tape2129drivers/block/ide-tape.cidetape_tape_t *tape;
tape2132drivers/block/ide-tape.ctape=&(drive->tape);
tape2138drivers/block/ide-tape.cif (!tape->pc->error) {
tape2154drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape2156drivers/block/ide-tape.cint blocks_read=tape->pc->actually_transferred/tape->tape_block_size;
tape2162drivers/block/ide-tape.ctape->block_address+=blocks_read;
tape2165drivers/block/ide-tape.cif (!tape->pc->error)
tape2168drivers/block/ide-tape.crq->errors=tape->pc->error;
tape2182drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape2184drivers/block/ide-tape.cint blocks_written=tape->pc->actually_transferred/tape->tape_block_size;
tape2190drivers/block/ide-tape.ctape->block_address+=blocks_written;
tape2193drivers/block/ide-tape.cif (!tape->pc->error)
tape2196drivers/block/ide-tape.crq->errors=tape->pc->error;
tape2205drivers/block/ide-tape.cidetape_tape_t *tape;
tape2207drivers/block/ide-tape.ctape=&(drive->tape);
tape2209drivers/block/ide-tape.cidetape_display_inquiry_result (tape->pc->buffer);
tape2395drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape2400drivers/block/ide-tape.cif (!tape->pc->error) {
tape2404drivers/block/ide-tape.cidetape_analyze_error (drive,(idetape_request_sense_result_t *) tape->pc->buffer);
tape2423drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape2424drivers/block/ide-tape.cidetape_packet_command_t *pc=tape->failed_pc;
tape2426drivers/block/ide-tape.ctape->sense_key=result->sense_key;
tape2427drivers/block/ide-tape.ctape->asc=result->asc;
tape2428drivers/block/ide-tape.ctape->ascq=result->ascq;
tape2461drivers/block/ide-tape.cpc->actually_transferred=pc->request_transfer-tape->tape_block_size*idetape_swap_long (*long_ptr);
tape2755drivers/block/ide-tape.cidetape_tape_t *tape;
tape2759drivers/block/ide-tape.ctape=&(drive->tape);
tape2767drivers/block/ide-tape.cif (!tape->pc->error) {
tape2768drivers/block/ide-tape.cresult=(idetape_read_position_result_t *) tape->pc->buffer;
tape2778drivers/block/ide-tape.ctape->block_address_valid=0;
tape2785drivers/block/ide-tape.ctape->block_address=idetape_swap_long (result->first_block);
tape2786drivers/block/ide-tape.ctape->block_address_valid=1;
tape2836drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
tape2851drivers/block/ide-tape.cif (tape->active_data_request == rq) {    /* The request was a pipelined data transfer request */
tape2855drivers/block/ide-tape.cif (tape->active_stage == NULL)
tape2859drivers/block/ide-tape.cidetape_copy_buffer_to_stage (tape->active_stage,tape->data_buffer);
tape2862drivers/block/ide-tape.ctape->active_stage=NULL;
tape2863drivers/block/ide-tape.ctape->active_data_request=NULL;
tape2867drivers/block/ide-tape.ctape->error_in_pipeline_stage=rq->errors;
tape2871drivers/block/ide-tape.cif (tape->next_stage == NULL) {
tape2888drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive,tape->active_data_request,ide_end);
tape2890drivers/block/ide-tape.c(void) ide_do_drive_cmd (drive,tape->active_data_request,ide_next);
tape2903drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape2957drivers/block/ide-tape.cif (tape->failed_pc != NULL && tape->pc->c[0] == IDETAPE_REQUEST_SENSE_CMD) {
tape2958drivers/block/ide-tape.cidetape_issue_packet_command (drive,tape->failed_pc,&idetape_pc_intr);
tape2964drivers/block/ide-tape.cif (tape->postponed_rq != NULL) {
tape2966drivers/block/ide-tape.cif (tape->postponed_rq->rq_status != RQ_ACTIVE || rq != tape->postponed_rq) {
tape2976drivers/block/ide-tape.ctape->postponed_rq = NULL;
tape2987drivers/block/ide-tape.ctape->postponed_rq = NULL;
tape2998drivers/block/ide-tape.cif (tape->reset_issued) {
tape3000drivers/block/ide-tape.ctape->reset_issued=0;
tape3009drivers/block/ide-tape.ctape->dsc_polling_frequency=tape->best_dsc_rw_frequency;
tape3019drivers/block/ide-tape.cpc->buffer_size=rq->current_nr_sectors*tape->tape_block_size;
tape3021drivers/block/ide-tape.cpc->request_transfer=rq->current_nr_sectors*tape->tape_block_size;
tape3031drivers/block/ide-tape.ctape->dsc_polling_frequency=tape->best_dsc_rw_frequency;
tape3041drivers/block/ide-tape.cpc->buffer_size=rq->current_nr_sectors*tape->tape_block_size;
tape3043drivers/block/ide-tape.cpc->request_transfer=rq->current_nr_sectors*tape->tape_block_size;
tape3061drivers/block/ide-tape.ctape->dsc_polling_frequency=IDETAPE_DSC_READ_WRITE_FALLBACK_FREQUENCY;
tape3174drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
tape3181drivers/block/ide-tape.cif (tape->active_data_request != NULL) {
tape3190drivers/block/ide-tape.crq.sector = tape->block_address;
tape3194drivers/block/ide-tape.creturn (tape->tape_block_size*(blocks-rq.current_nr_sectors));
tape3205drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
tape3217drivers/block/ide-tape.crq.sector = tape->block_address;
tape3220drivers/block/ide-tape.cif (tape->active_data_request != NULL || tape->current_number_of_stages <= 0.25*tape->max_number_of_stages) {
tape3229drivers/block/ide-tape.cif (tape->active_data_request == NULL)
tape3233drivers/block/ide-tape.cif (tape->first_stage == NULL) {
tape3244drivers/block/ide-tape.cif (tape->active_data_request == &(tape->first_stage->rq))
tape3245drivers/block/ide-tape.cidetape_wait_for_request (tape->active_data_request);
tape3248drivers/block/ide-tape.crq_ptr=&(tape->first_stage->rq);
tape3249drivers/block/ide-tape.cbytes_read=tape->tape_block_size*(rq_ptr->nr_sectors-rq_ptr->current_nr_sectors);
tape3251drivers/block/ide-tape.cidetape_copy_buffer_from_stage (tape->first_stage,buffer);
tape3255drivers/block/ide-tape.cif (bytes_read > blocks*tape->tape_block_size) {
tape3257drivers/block/ide-tape.cbytes_read=blocks*tape->tape_block_size;
tape3278drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
tape3299drivers/block/ide-tape.cif (tape->active_data_request != NULL) {
tape3300drivers/block/ide-tape.cidetape_wait_for_request (tape->active_data_request);
tape3319drivers/block/ide-tape.crq->sector = tape->block_address;  /* Doesn't actually matter - We always assume sequential access */
tape3338drivers/block/ide-tape.cif (tape->active_data_request == NULL && tape->current_number_of_stages >= 0.75*tape->max_number_of_stages)
tape3341drivers/block/ide-tape.cif (tape->error_in_pipeline_stage) {    /* Return a deferred error */
tape3342drivers/block/ide-tape.ctape->error_in_pipeline_stage=0;
tape3352drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
tape3356drivers/block/ide-tape.cif (tape->chrdev_direction != idetape_direction_read) {
tape3362drivers/block/ide-tape.ctape->merge_buffer_size=tape->merge_buffer_offset=0;
tape3363drivers/block/ide-tape.ctape->chrdev_direction=idetape_direction_none;
tape3365drivers/block/ide-tape.cif (tape->first_stage == NULL)
tape3369drivers/block/ide-tape.ctape->next_stage=NULL;
tape3370drivers/block/ide-tape.cif (tape->active_data_request != NULL)
tape3371drivers/block/ide-tape.cidetape_wait_for_request (tape->active_data_request);
tape3374drivers/block/ide-tape.cwhile (tape->first_stage != NULL)
tape3378drivers/block/ide-tape.ctape->max_number_of_stages=IDETAPE_MIN_PIPELINE_STAGES;
tape3380drivers/block/ide-tape.ctape->max_number_of_stages=0;
tape3392drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
tape3395drivers/block/ide-tape.cif (tape->active_data_request == NULL)
tape3399drivers/block/ide-tape.cif (tape->active_data_request == NULL) {
tape3404drivers/block/ide-tape.cif (tape->last_stage != NULL)
tape3405drivers/block/ide-tape.cidetape_wait_for_request (&(tape->last_stage->rq));
tape3407drivers/block/ide-tape.celse if (tape->active_data_request != NULL)
tape3408drivers/block/ide-tape.cidetape_wait_for_request (tape->active_data_request);
tape3415drivers/block/ide-tape.cidetape_tape_t *tape = &(drive->tape);
tape3419drivers/block/ide-tape.cif (tape->chrdev_direction != idetape_direction_write) {
tape3423drivers/block/ide-tape.cif (tape->merge_buffer_size > tape->data_buffer_size) {
tape3425drivers/block/ide-tape.ctape->merge_buffer_size = tape->data_buffer_size;
tape3429drivers/block/ide-tape.cif (tape->merge_buffer_size) {
tape3430drivers/block/ide-tape.cblocks=tape->merge_buffer_size/tape->tape_block_size;
tape3431drivers/block/ide-tape.cif (tape->merge_buffer_size % tape->tape_block_size) {
tape3433drivers/block/ide-tape.cmemset (tape->merge_buffer+tape->merge_buffer_size,0,tape->data_buffer_size-tape->merge_buffer_size);
tape3435drivers/block/ide-tape.c(void) idetape_add_chrdev_write_request (drive,blocks,tape->merge_buffer);
tape3436drivers/block/ide-tape.ctape->merge_buffer_size=0;
tape3441drivers/block/ide-tape.ctape->error_in_pipeline_stage=0;
tape3442drivers/block/ide-tape.ctape->chrdev_direction=idetape_direction_none;
tape3452drivers/block/ide-tape.ctape->max_number_of_stages=IDETAPE_MIN_PIPELINE_STAGES;
tape3454drivers/block/ide-tape.ctape->max_number_of_stages=0;
tape3457drivers/block/ide-tape.cif (tape->first_stage != NULL || tape->next_stage != NULL || tape->last_stage != NULL || tape->current_number_of_stages != 0) {
tape3539drivers/block/ide-tape.cidetape_tape_t *tape;
tape3541drivers/block/ide-tape.ctape=&(drive->tape);
tape3543drivers/block/ide-tape.cprintk ("ide-tape: pc_stack_index=%d\n",tape->pc_stack_index);
tape3545drivers/block/ide-tape.cif (tape->pc_stack_index==IDETAPE_PC_STACK)
tape3546drivers/block/ide-tape.ctape->pc_stack_index=0;
tape3547drivers/block/ide-tape.creturn (&(tape->pc_stack [tape->pc_stack_index++]));
tape3566drivers/block/ide-tape.cidetape_tape_t *tape;
tape3568drivers/block/ide-tape.ctape=&(drive->tape);
tape3571drivers/block/ide-tape.cprintk ("ide-tape: rq_stack_index=%d\n",tape->rq_stack_index);
tape3573drivers/block/ide-tape.cif (tape->rq_stack_index==IDETAPE_PC_STACK)
tape3574drivers/block/ide-tape.ctape->rq_stack_index=0;
tape3575drivers/block/ide-tape.creturn (&(tape->rq_stack [tape->rq_stack_index++]));
tape3589drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape3598drivers/block/ide-tape.cif (tape->busy) {
tape3603drivers/block/ide-tape.ctape->busy=1;
tape3612drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape3620drivers/block/ide-tape.ctape->busy=0;
tape3654drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape3662drivers/block/ide-tape.cif (tape->chrdev_direction != idetape_direction_read) {    /* Initialize read operation */
tape3663drivers/block/ide-tape.cif (tape->chrdev_direction == idetape_direction_write) {
tape3674drivers/block/ide-tape.cbytes_read=idetape_queue_rw_tail (drive,IDETAPE_READ_REQUEST,0,tape->merge_buffer);
tape3678drivers/block/ide-tape.ctape->chrdev_direction=idetape_direction_read;
tape3684drivers/block/ide-tape.cif (tape->merge_buffer_size) {
tape3686drivers/block/ide-tape.cif (tape->merge_buffer_offset+tape->merge_buffer_size > tape->data_buffer_size) {
tape3688drivers/block/ide-tape.ctape->merge_buffer_offset=0;tape->merge_buffer_size=tape->data_buffer_size-1;
tape3691drivers/block/ide-tape.cactually_read=IDETAPE_MIN (tape->merge_buffer_size,count);
tape3692drivers/block/ide-tape.cmemcpy_tofs (buf_ptr,tape->merge_buffer+tape->merge_buffer_offset,actually_read);
tape3693drivers/block/ide-tape.cbuf_ptr+=actually_read;tape->merge_buffer_size-=actually_read;
tape3694drivers/block/ide-tape.ccount-=actually_read;tape->merge_buffer_offset+=actually_read;
tape3697drivers/block/ide-tape.cwhile (count >= tape->data_buffer_size) {
tape3698drivers/block/ide-tape.cbytes_read=idetape_add_chrdev_read_request (drive,tape->capabilities.ctl,tape->merge_buffer);
tape3701drivers/block/ide-tape.cmemcpy_tofs (buf_ptr,tape->merge_buffer,bytes_read);
tape3706drivers/block/ide-tape.cbytes_read=idetape_add_chrdev_read_request (drive,tape->capabilities.ctl,tape->merge_buffer);
tape3710drivers/block/ide-tape.cmemcpy_tofs (buf_ptr,tape->merge_buffer,temp);
tape3712drivers/block/ide-tape.ctape->merge_buffer_offset=temp;
tape3713drivers/block/ide-tape.ctape->merge_buffer_size=bytes_read-temp;
tape3722drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape3730drivers/block/ide-tape.cif (tape->chrdev_direction != idetape_direction_write) {  /* Initialize write operation */
tape3731drivers/block/ide-tape.cif (tape->chrdev_direction == idetape_direction_read)
tape3740drivers/block/ide-tape.cretval=idetape_queue_rw_tail (drive,IDETAPE_WRITE_REQUEST,0,tape->merge_buffer);
tape3744drivers/block/ide-tape.ctape->chrdev_direction=idetape_direction_write;
tape3750drivers/block/ide-tape.cif (tape->merge_buffer_size) {
tape3752drivers/block/ide-tape.cif (tape->merge_buffer_size >= tape->data_buffer_size) {
tape3754drivers/block/ide-tape.ctape->merge_buffer_size=0;
tape3758drivers/block/ide-tape.cactually_written=IDETAPE_MIN (tape->data_buffer_size-tape->merge_buffer_size,count);
tape3759drivers/block/ide-tape.cmemcpy_fromfs (tape->merge_buffer+tape->merge_buffer_size,buf_ptr,actually_written);
tape3760drivers/block/ide-tape.cbuf_ptr+=actually_written;tape->merge_buffer_size+=actually_written;count-=actually_written;
tape3762drivers/block/ide-tape.cif (tape->merge_buffer_size == tape->data_buffer_size) {
tape3763drivers/block/ide-tape.ctape->merge_buffer_size=0;
tape3764drivers/block/ide-tape.cretval=idetape_add_chrdev_write_request (drive,tape->capabilities.ctl,tape->merge_buffer);
tape3770drivers/block/ide-tape.cwhile (count >= tape->data_buffer_size) {
tape3771drivers/block/ide-tape.cmemcpy_fromfs (tape->merge_buffer,buf_ptr,tape->data_buffer_size);
tape3772drivers/block/ide-tape.cbuf_ptr+=tape->data_buffer_size;count-=tape->data_buffer_size;
tape3773drivers/block/ide-tape.cretval=idetape_add_chrdev_write_request (drive,tape->capabilities.ctl,tape->merge_buffer);
tape3774drivers/block/ide-tape.cactually_written+=tape->data_buffer_size;
tape3781drivers/block/ide-tape.cmemcpy_fromfs (tape->merge_buffer,buf_ptr,count);
tape3782drivers/block/ide-tape.ctape->merge_buffer_size+=count;
tape3822drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape3833drivers/block/ide-tape.cif (tape->chrdev_direction == idetape_direction_write) {
tape3838drivers/block/ide-tape.cif (tape->chrdev_direction == idetape_direction_read && cmd != MTIOCTOP)
tape3852drivers/block/ide-tape.cmtget.mt_dsreg=(tape->data_buffer_size << MT_ST_BLKSIZE_SHIFT) & MT_ST_BLKSIZE_MASK;
tape3861drivers/block/ide-tape.cmtpos.mt_blkno=tape->block_address;
tape3927drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape3959drivers/block/ide-tape.cif (tape->chrdev_direction == idetape_direction_read)
tape4009drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4014drivers/block/ide-tape.cif (tape->chrdev_direction == idetape_direction_read) {
tape4021drivers/block/ide-tape.ctape->merge_buffer_size=tape->merge_buffer_offset=0;
tape4022drivers/block/ide-tape.cwhile (tape->first_stage != NULL) {
tape4030drivers/block/ide-tape.cif (tape->active_data_request == &(tape->first_stage->rq))
tape4031drivers/block/ide-tape.cidetape_wait_for_request (tape->active_data_request);
tape4034drivers/block/ide-tape.cerrors=tape->first_stage->rq.errors;
tape4065drivers/block/ide-tape.cif (!tape->capabilities.sprev)
tape4071drivers/block/ide-tape.cif (!tape->capabilities.sprev)
tape4076drivers/block/ide-tape.cif (!tape->capabilities.sprev)
tape4095drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4110drivers/block/ide-tape.cif (tape->busy) {
tape4115drivers/block/ide-tape.ctape->busy=1;
tape4118drivers/block/ide-tape.callocation_length=tape->data_buffer_size;
tape4119drivers/block/ide-tape.cif (tape->data_buffer_size % IDETAPE_ALLOCATION_BLOCK)
tape4123drivers/block/ide-tape.cif (tape->data_buffer == NULL)
tape4124drivers/block/ide-tape.ctape->data_buffer=kmalloc (allocation_length,GFP_KERNEL);
tape4125drivers/block/ide-tape.cif (tape->data_buffer == NULL)
tape4127drivers/block/ide-tape.cif (tape->merge_buffer == NULL)
tape4128drivers/block/ide-tape.ctape->merge_buffer=kmalloc (allocation_length,GFP_KERNEL);
tape4129drivers/block/ide-tape.cif (tape->merge_buffer == NULL) {
tape4130drivers/block/ide-tape.ckfree (tape->data_buffer);
tape4133drivers/block/ide-tape.ctape->busy=0;
tape4138drivers/block/ide-tape.cif (!tape->block_address_valid) {
tape4141drivers/block/ide-tape.ctape->busy=0;
tape4157drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4166drivers/block/ide-tape.cif (tape->chrdev_direction == idetape_direction_write) {
tape4173drivers/block/ide-tape.cif (tape->chrdev_direction == idetape_direction_read) {
tape4185drivers/block/ide-tape.ckfree (tape->data_buffer);
tape4186drivers/block/ide-tape.ctape->data_buffer=NULL;
tape4187drivers/block/ide-tape.cif (!tape->merge_buffer_size) {
tape4188drivers/block/ide-tape.ckfree (tape->merge_buffer);
tape4189drivers/block/ide-tape.ctape->merge_buffer=NULL;
tape4194drivers/block/ide-tape.ctape->busy=0;
tape4283drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4292drivers/block/ide-tape.cif (tape->current_number_of_stages>=tape->max_number_of_stages) {
tape4302drivers/block/ide-tape.cbuffers_num=tape->data_buffer_size / IDETAPE_ALLOCATION_BLOCK;
tape4303drivers/block/ide-tape.cif (tape->data_buffer_size % IDETAPE_ALLOCATION_BLOCK)
tape4455drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4461drivers/block/ide-tape.ctape->max_number_of_stages+=IDETAPE_INCREASE_STAGES_RATE*
tape4464drivers/block/ide-tape.cif (tape->max_number_of_stages >= IDETAPE_MAX_PIPELINE_STAGES)
tape4465drivers/block/ide-tape.ctape->max_number_of_stages = IDETAPE_MAX_PIPELINE_STAGES;
tape4468drivers/block/ide-tape.cprintk ("Maximum number of stages: %d\n",tape->max_number_of_stages);
tape4483drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4490drivers/block/ide-tape.cstage->prev=tape->last_stage;
tape4491drivers/block/ide-tape.cif (tape->last_stage != NULL)
tape4492drivers/block/ide-tape.ctape->last_stage->next=stage;
tape4494drivers/block/ide-tape.ctape->first_stage=tape->next_stage=stage;
tape4495drivers/block/ide-tape.ctape->last_stage=stage;
tape4496drivers/block/ide-tape.cif (tape->next_stage == NULL)
tape4497drivers/block/ide-tape.ctape->next_stage=tape->last_stage;
tape4498drivers/block/ide-tape.ctape->current_number_of_stages++;
tape4510drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4517drivers/block/ide-tape.cif (tape->first_stage == NULL) {
tape4521drivers/block/ide-tape.cif (tape->active_stage == tape->first_stage) {
tape4526drivers/block/ide-tape.cstage=tape->first_stage;
tape4527drivers/block/ide-tape.ctape->first_stage=stage->next;
tape4529drivers/block/ide-tape.ctape->current_number_of_stages--;
tape4530drivers/block/ide-tape.cif (tape->first_stage == NULL) {
tape4531drivers/block/ide-tape.ctape->last_stage=NULL;
tape4533drivers/block/ide-tape.cif (tape->next_stage != NULL)
tape4535drivers/block/ide-tape.cif (tape->current_number_of_stages)
tape4549drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4551drivers/block/ide-tape.cif (tape->next_stage == NULL)
tape4554drivers/block/ide-tape.cif (tape->active_data_request == NULL) {
tape4556drivers/block/ide-tape.c(void) (ide_do_drive_cmd (drive,tape->active_data_request,ide_end));
tape4568drivers/block/ide-tape.cidetape_tape_t *tape=&(drive->tape);
tape4569drivers/block/ide-tape.cidetape_pipeline_stage_t *stage=tape->next_stage;
tape4582drivers/block/ide-tape.cidetape_copy_buffer_from_stage (stage,tape->data_buffer);
tape4584drivers/block/ide-tape.crq->buffer=tape->data_buffer;
tape4585drivers/block/ide-tape.ctape->active_data_request=rq;
tape4586drivers/block/ide-tape.ctape->active_stage=stage;
tape4587drivers/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;    \
tape772drivers/block/ide.cdrive->tape.reset_issued=1;
tape347drivers/block/ide.hidetape_tape_t  tape;    /* for ide-tape.c */
tape198drivers/block/triton.csize = drive->tape.pc->request_transfer;