kernels/linux-2.4.0/drivers/ide/qd6580.c
/*
 * tune_snd_drive
 *
 * Finds timings for the specified drive, using second channel rules
 */
tune_snd_drive
Finds timings for the specified drive, using second channel rules
tune_snd_drive Finds timings for the specified drive using second channel rules
static void tune_snd_drive ( ide_drive_t *drive, byte pio, ide_hd_timings_t *t )
{
	ide_pio_data_t d;
	t->active_time   = 175;
	t->recovery_time = 415;
	if (!drive->present) {	
		t->active_time = 0;
		t->recovery_time = 0;
		return;
	}
	pio = ide_get_best_pio_mode(drive, pio, 255, &d);
	if ((pio) && (d.cycle_time >= 180)) {
		t->active_time = 115;
		t->recovery_time = d.cycle_time - 115;
	}
	printk("%s: PIO mode%d, tim1=%dns tim2=%dns\n", drive->name, pio, t->active_time, t->recovery_time);
	if ((drive->media == ide_disk) && (nb_disks_prim<2)) {
		printk("%s: Warning: please try to connect this drive to primary IDE port\nto improve data transfer rate.\n",drive->name);
	}
}
static void tune_snd_drive ( ide_drive_t * drive , byte pio , ide_hd_timings_t * t ) { ide_pio_data_t d ; t -> active_time = 175 ; t -> recovery_time = 415 ; if ( ! drive -> present ) { t -> active_time = 0 ; t -> recovery_time = 0 ; return ; } pio = ide_get_best_pio_mode ( drive , pio , 255 , & d ) ; if ( ( pio ) && ( d . cycle_time >= 180 ) ) { t -> active_time = 115 ; t -> recovery_time = d . cycle_time - 115 ; } printk ( " \n " , drive -> name , pio , t -> active_time , t -> recovery_time ) ; if ( ( drive -> media == ide_disk ) && ( nb_disks_prim < 2 ) ) { printk ( " \n \n " , drive -> name ) ; } }
tune_snd_drive
 Finds timings for the specified drive, using second channel rules
tune_snd_drive Finds timings for the specified drive using second channel rules
/* not present : free to give any timing */ /* a disk drive on secondary port while there's room on primary, which is the
 * only one that has read-ahead fifo and post-write buffer ? What a waste !*/