• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asus-wl-520gu-7.0.1.45/src/linux/linux/drivers/ide/

Lines Matching defs:drive

87 static int amd74xx_swdma_error(ide_drive_t *drive)
89 printk("%s: single-word DMA not support (revision < C4)\n", drive->name);
97 static int amd74xx_tune_chipset (ide_drive_t *drive, byte speed)
99 ide_hwif_t *hwif = HWIF(drive);
102 byte unit = (drive->select.b.unit & 0x01);
112 switch (drive->dn) {
127 drive->name, drive->dn, speed, ultra_timing, dma_pio_timing, pio_timing);
132 pio_timing &= ~(0x03 << drive->dn);
136 drive->name, ultra_timing, dma_pio_timing, pio_timing);
179 return amd74xx_swdma_error(drive);
184 return amd74xx_swdma_error(drive);
189 return amd74xx_swdma_error(drive);
211 pio_timing |= (0x03 << drive->dn);
213 if (!drive->init_speed)
214 drive->init_speed = speed;
224 drive->name, ultra_timing, dma_pio_timing, pio_timing);
235 err = ide_config_drive_speed(drive, speed);
236 drive->current_speed = speed;
240 static void config_chipset_for_pio (ide_drive_t *drive)
243 unsigned short xfer_pio = drive->id->eide_pio_modes;
246 pio = ide_get_best_pio_mode(drive, 255, 5, NULL);
251 if (drive->id->eide_pio_iordy > 0) {
254 drive->id->eide_pio_iordy>eide_pio_timing[xfer_pio];
257 xfer_pio = (drive->id->eide_pio_modes & 4) ? 0x05 :
258 (drive->id->eide_pio_modes & 2) ? 0x04 :
259 (drive->id->eide_pio_modes & 1) ? 0x03 :
260 (drive->id->tPIO & 2) ? 0x02 :
261 (drive->id->tPIO & 1) ? 0x01 : xfer_pio;
272 speed = (!drive->id->tPIO) ? XFER_PIO_0 : XFER_PIO_SLOW;
275 (void) amd74xx_tune_chipset(drive, speed);
276 drive->current_speed = speed;
279 static void amd74xx_tune_drive (ide_drive_t *drive, byte pio)
289 (void) amd74xx_tune_chipset(drive, speed);
295 * for cards that learn about the drive's UDMA, DMA, PIO capabilities
296 * after the drive is reported by the OS.
298 static int config_chipset_for_dma (ide_drive_t *drive)
300 ide_hwif_t *hwif = HWIF(drive);
302 struct hd_driveid *id = drive->id;
303 byte udma_66 = eighty_ninty_three(drive);
310 udma_66 = eighty_ninty_three(drive);
334 (void) amd74xx_tune_chipset(drive, speed);
344 static int config_drive_xfer_rate (ide_drive_t *drive)
346 struct hd_driveid *id = drive->id;
349 if (id && (id->capability & 1) && HWIF(drive)->autodma) {
351 if (ide_dmaproc(ide_dma_bad_drive, drive)) {
359 dma_func = config_chipset_for_dma(drive);
368 (amd74xx_swdma_check(HWIF(drive)->pci_dev)))) {
370 dma_func = config_chipset_for_dma(drive);
375 } else if (ide_dmaproc(ide_dma_good_drive, drive)) {
380 dma_func = config_chipset_for_dma(drive);
391 config_chipset_for_pio(drive);
393 return HWIF(drive)->dmaproc(dma_func, drive);
397 * amd74xx_dmaproc() initiates/aborts (U)DMA read/write operations on a drive.
400 int amd74xx_dmaproc (ide_dma_action_t func, ide_drive_t *drive)
404 return config_drive_xfer_rate(drive);
408 return ide_dmaproc(func, drive); /* use standard DMA stuff */