• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/ide/arm/

Lines Matching refs:drive

167  * we write the command to the drive.
169 static void icside_maskproc(ide_drive_t *drive, int mask)
171 ide_hwif_t *hwif = HWIF(drive);
204 * one drive can be accessed at one time. NOTE! We do not enforce that
209 static void icside_build_sglist(ide_drive_t *drive, struct request *rq)
211 ide_hwif_t *hwif = drive->hwif;
215 ide_map_sg(drive, rq);
230 * MW DMA specs that the drive provides in the IDENTIFY command.
251 static int icside_set_speed(ide_drive_t *drive, u8 xfer_mode)
287 if (use_dma_info && drive->id->eide_dma_time > cycle_time)
288 cycle_time = drive->id->eide_dma_time;
290 drive->drive_data = cycle_time;
292 if (cycle_time && ide_config_drive_speed(drive, xfer_mode) == 0)
295 drive->drive_data = 480;
297 printk("%s: %s selected (peak %dMB/s)\n", drive->name,
298 ide_xfer_verbose(xfer_mode), 2000 / drive->drive_data);
300 drive->current_speed = xfer_mode;
305 static void icside_dma_host_off(ide_drive_t *drive)
309 static void icside_dma_off_quietly(ide_drive_t *drive)
311 drive->using_dma = 0;
314 static void icside_dma_host_on(ide_drive_t *drive)
318 static int icside_dma_on(ide_drive_t *drive)
320 drive->using_dma = 1;
325 static int icside_dma_check(ide_drive_t *drive)
327 struct hd_driveid *id = drive->id;
328 ide_hwif_t *hwif = HWIF(drive);
338 if (__ide_dma_bad_drive(drive))
342 * Enable DMA on any drive that has multiword DMA
345 xfer_mode = ide_max_dma_mode(drive);
352 if (__ide_dma_good_drive(drive)) {
359 on = icside_set_speed(drive, xfer_mode);
364 static int icside_dma_end(ide_drive_t *drive)
366 ide_hwif_t *hwif = HWIF(drive);
369 drive->waiting_for_dma = 0;
380 static void icside_dma_start(ide_drive_t *drive)
382 ide_hwif_t *hwif = HWIF(drive);
389 static int icside_dma_setup(ide_drive_t *drive)
391 ide_hwif_t *hwif = HWIF(drive);
405 icside_build_sglist(drive, rq);
410 icside_maskproc(drive, 0);
418 * Select the correct timing for this drive.
420 set_dma_speed(hwif->hw.dma, drive->drive_data);
429 drive->waiting_for_dma = 1;
434 static void icside_dma_exec_cmd(ide_drive_t *drive, u8 cmd)
436 /* issue cmd to drive */
437 ide_execute_command(drive, cmd, ide_dma_intr, 2 * WAIT_CMD, NULL);
440 static int icside_dma_test_irq(ide_drive_t *drive)
442 ide_hwif_t *hwif = HWIF(drive);
451 static int icside_dma_timeout(ide_drive_t *drive)
453 printk(KERN_ERR "%s: DMA timeout occurred: ", drive->name);
455 if (icside_dma_test_irq(drive))
458 ide_dump_status(drive, "DMA timeout",
459 HWIF(drive)->INB(IDE_STATUS_REG));
461 return icside_dma_end(drive);
464 static int icside_dma_lostirq(ide_drive_t *drive)
466 printk(KERN_ERR "%s: IRQ lost\n", drive->name);