Lines Matching full:drive

83 	u16	udma[2];		/* Cached UDMA values (per drive) */
105 * @drive: drive to tune
112 static void it821x_program(ide_drive_t *drive, u16 timing) in it821x_program() argument
114 ide_hwif_t *hwif = drive->hwif; in it821x_program()
131 * @drive: drive to tune
134 * Program the UDMA timing for this drive according to the
138 static void it821x_program_udma(ide_drive_t *drive, u16 timing) in it821x_program_udma() argument
140 ide_hwif_t *hwif = drive->hwif; in it821x_program_udma()
144 u8 unit = drive->dn & 1, conf; in it821x_program_udma()
162 * @drive: drive to set up
168 static void it821x_clock_strategy(ide_drive_t *drive) in it821x_clock_strategy() argument
170 ide_hwif_t *hwif = drive->hwif; in it821x_clock_strategy()
173 ide_drive_t *pair = ide_get_pair_dev(drive); in it821x_clock_strategy()
175 u8 unit = drive->dn & 1, v; in it821x_clock_strategy()
213 * Reprogram the UDMA/PIO of the pair drive for the switch in it821x_clock_strategy()
221 * Reprogram the UDMA/PIO of our drive for the switch. in it821x_clock_strategy()
225 it821x_program_udma(drive, itdev->udma[unit]); in it821x_clock_strategy()
226 it821x_program(drive, itdev->pio[unit]); in it821x_clock_strategy()
233 * @drive: drive
239 static void it821x_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) in it821x_set_pio_mode() argument
242 ide_drive_t *pair = ide_get_pair_dev(drive); in it821x_set_pio_mode()
243 const u8 pio = drive->pio_mode - XFER_PIO_0; in it821x_set_pio_mode()
244 u8 unit = drive->dn & 1, set_pio = pio; in it821x_set_pio_mode()
266 it821x_clock_strategy(drive); in it821x_set_pio_mode()
267 it821x_program(drive, itdev->pio[unit]); in it821x_set_pio_mode()
272 * @drive: drive to set up
281 static void it821x_tune_mwdma(ide_drive_t *drive, u8 mode_wanted) in it821x_tune_mwdma() argument
283 ide_hwif_t *hwif = drive->hwif; in it821x_tune_mwdma()
286 u8 unit = drive->dn & 1, channel = hwif->channel, conf; in it821x_tune_mwdma()
304 it821x_clock_strategy(drive); in it821x_tune_mwdma()
306 /* it821x_program(drive, itdev->mwdma[unit]); */ in it821x_tune_mwdma()
311 * @drive: drive to set up
318 static void it821x_tune_udma(ide_drive_t *drive, u8 mode_wanted) in it821x_tune_udma() argument
320 ide_hwif_t *hwif = drive->hwif; in it821x_tune_udma()
323 u8 unit = drive->dn & 1, channel = hwif->channel, conf; in it821x_tune_udma()
343 it821x_clock_strategy(drive); in it821x_tune_udma()
344 it821x_program_udma(drive, itdev->udma[unit]); in it821x_tune_udma()
350 * @drive: drive for DMA
361 static void it821x_dma_start(ide_drive_t *drive) in it821x_dma_start() argument
363 ide_hwif_t *hwif = drive->hwif; in it821x_dma_start()
365 u8 unit = drive->dn & 1; in it821x_dma_start()
368 it821x_program(drive, itdev->mwdma[unit]); in it821x_dma_start()
370 it821x_program_udma(drive, itdev->udma[unit]); in it821x_dma_start()
371 ide_dma_start(drive); in it821x_dma_start()
376 * @drive: drive for DMA stop
383 static int it821x_dma_end(ide_drive_t *drive) in it821x_dma_end() argument
385 ide_hwif_t *hwif = drive->hwif; in it821x_dma_end()
387 int ret = ide_dma_end(drive); in it821x_dma_end()
388 u8 unit = drive->dn & 1; in it821x_dma_end()
391 it821x_program(drive, itdev->pio[unit]); in it821x_dma_end()
398 * @drive: drive
403 static void it821x_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) in it821x_set_dma_mode() argument
405 const u8 speed = drive->dma_mode; in it821x_set_dma_mode()
413 it821x_tune_udma(drive, speed - XFER_UDMA_0); in it821x_set_dma_mode()
415 it821x_tune_mwdma(drive, speed - XFER_MW_DMA_0); in it821x_set_dma_mode()
435 * @drive: drive
437 * This callback is run after the drive has been probed but
442 static void it821x_quirkproc(ide_drive_t *drive) in it821x_quirkproc() argument
444 struct it821x_dev *itdev = ide_get_hwifdata(drive->hwif); in it821x_quirkproc()
445 u16 *id = drive->id; in it821x_quirkproc()
454 drive->dev_flags |= IDE_DFLAG_UNMASK; in it821x_quirkproc()
474 drive->name, id[147] ? "Bootable " : "", in it821x_quirkproc()
495 drive->name); in it821x_quirkproc()
505 drive->current_speed = XFER_MW_DMA_0; in it821x_quirkproc()