Lines Matching refs:drive
42 static unsigned int get_pio_timings(ide_drive_t *drive, u8 pio) in get_pio_timings() argument
49 cmd_off = (ide_pio_cycle_time(drive, pio) - 30 * cmd_on + 29) / 30; in get_pio_timings()
57 if (ide_pio_need_iordy(drive, pio)) in get_pio_timings()
66 static void sl82c105_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) in sl82c105_set_pio_mode() argument
69 unsigned long timings = (unsigned long)ide_get_drivedata(drive); in sl82c105_set_pio_mode()
70 int reg = 0x44 + drive->dn * 4; in sl82c105_set_pio_mode()
72 const u8 pio = drive->pio_mode - XFER_PIO_0; in sl82c105_set_pio_mode()
74 drv_ctrl = get_pio_timings(drive, pio); in sl82c105_set_pio_mode()
82 ide_set_drivedata(drive, (void *)timings); in sl82c105_set_pio_mode()
87 printk(KERN_DEBUG "%s: selected %s (%dns) (%04X)\n", drive->name, in sl82c105_set_pio_mode()
89 ide_pio_cycle_time(drive, pio), drv_ctrl); in sl82c105_set_pio_mode()
95 static void sl82c105_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) in sl82c105_set_dma_mode() argument
98 unsigned long timings = (unsigned long)ide_get_drivedata(drive); in sl82c105_set_dma_mode()
100 const u8 speed = drive->dma_mode; in sl82c105_set_dma_mode()
110 ide_set_drivedata(drive, (void *)timings); in sl82c105_set_dma_mode()
147 static void sl82c105_dma_lost_irq(ide_drive_t *drive) in sl82c105_dma_lost_irq() argument
149 ide_hwif_t *hwif = drive->hwif; in sl82c105_dma_lost_irq()
185 static void sl82c105_dma_start(ide_drive_t *drive) in sl82c105_dma_start() argument
187 ide_hwif_t *hwif = drive->hwif; in sl82c105_dma_start()
189 int reg = 0x44 + drive->dn * 4; in sl82c105_dma_start()
192 (unsigned long)ide_get_drivedata(drive) >> 16); in sl82c105_dma_start()
195 ide_dma_start(drive); in sl82c105_dma_start()
198 static void sl82c105_dma_clear(ide_drive_t *drive) in sl82c105_dma_clear() argument
200 struct pci_dev *dev = to_pci_dev(drive->hwif->dev); in sl82c105_dma_clear()
205 static int sl82c105_dma_end(ide_drive_t *drive) in sl82c105_dma_end() argument
207 struct pci_dev *dev = to_pci_dev(drive->hwif->dev); in sl82c105_dma_end()
208 int reg = 0x44 + drive->dn * 4; in sl82c105_dma_end()
209 int ret = ide_dma_end(drive); in sl82c105_dma_end()
212 (unsigned long)ide_get_drivedata(drive)); in sl82c105_dma_end()
221 static void sl82c105_resetproc(ide_drive_t *drive) in sl82c105_resetproc() argument
223 struct pci_dev *dev = to_pci_dev(drive->hwif->dev); in sl82c105_resetproc()