• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/ide/

Lines Matching defs: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)
114 ide_hwif_t *hwif = drive->hwif;
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)
140 ide_hwif_t *hwif = drive->hwif;
144 u8 unit = drive->dn & 1, conf;
162 * @drive: drive to set up
168 static void it821x_clock_strategy(ide_drive_t *drive)
170 ide_hwif_t *hwif = drive->hwif;
173 ide_drive_t *pair = ide_get_pair_dev(drive);
175 u8 unit = drive->dn & 1, v;
213 * Reprogram the UDMA/PIO of the pair drive for the switch
221 * Reprogram the UDMA/PIO of our drive for the switch.
225 it821x_program_udma(drive, itdev->udma[unit]);
226 it821x_program(drive, itdev->pio[unit]);
233 * @drive: drive
239 static void it821x_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
242 ide_drive_t *pair = ide_get_pair_dev(drive);
243 const u8 pio = drive->pio_mode - XFER_PIO_0;
244 u8 unit = drive->dn & 1, set_pio = pio;
266 it821x_clock_strategy(drive);
267 it821x_program(drive, itdev->pio[unit]);
272 * @drive: drive to set up
281 static void it821x_tune_mwdma(ide_drive_t *drive, u8 mode_wanted)
283 ide_hwif_t *hwif = drive->hwif;
286 u8 unit = drive->dn & 1, channel = hwif->channel, conf;
304 it821x_clock_strategy(drive);
305 /* it821x_program(drive, itdev->mwdma[unit]); */
310 * @drive: drive to set up
317 static void it821x_tune_udma(ide_drive_t *drive, u8 mode_wanted)
319 ide_hwif_t *hwif = drive->hwif;
322 u8 unit = drive->dn & 1, channel = hwif->channel, conf;
342 it821x_clock_strategy(drive);
343 it821x_program_udma(drive, itdev->udma[unit]);
348 static void it821x_dma_start(ide_drive_t *drive)
350 ide_hwif_t *hwif = drive->hwif;
352 u8 unit = drive->dn & 1;
355 it821x_program(drive, itdev->mwdma[unit]);
357 it821x_program_udma(drive, itdev->udma[unit]);
358 ide_dma_start(drive);
363 * @drive: drive for DMA stop
370 static int it821x_dma_end(ide_drive_t *drive)
372 ide_hwif_t *hwif = drive->hwif;
374 int ret = ide_dma_end(drive);
375 u8 unit = drive->dn & 1;
378 it821x_program(drive, itdev->pio[unit]);
385 * @drive: drive
390 static void it821x_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive)
392 const u8 speed = drive->dma_mode;
400 it821x_tune_udma(drive, speed - XFER_UDMA_0);
402 it821x_tune_mwdma(drive, speed - XFER_MW_DMA_0);
421 static void it821x_quirkproc(ide_drive_t *drive)
423 struct it821x_dev *itdev = ide_get_hwifdata(drive->hwif);
424 u16 *id = drive->id;
433 drive->dev_flags |= IDE_DFLAG_UNMASK;
453 drive->name, id[147] ? "Bootable " : "",
474 drive->name);
484 drive->current_speed = XFER_MW_DMA_0;