Lines Matching refs:drive
43 static unsigned int get_pio_timings(ide_drive_t *drive, u8 pio)
50 cmd_off = (ide_pio_cycle_time(drive, pio) - 30 * cmd_on + 29) / 30;
58 if (ide_pio_need_iordy(drive, pio))
67 static void sl82c105_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
70 unsigned long timings = (unsigned long)ide_get_drivedata(drive);
71 int reg = 0x44 + drive->dn * 4;
73 const u8 pio = drive->pio_mode - XFER_PIO_0;
75 drv_ctrl = get_pio_timings(drive, pio);
83 ide_set_drivedata(drive, (void *)timings);
88 printk(KERN_DEBUG "%s: selected %s (%dns) (%04X)\n", drive->name,
90 ide_pio_cycle_time(drive, pio), drv_ctrl);
96 static void sl82c105_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive)
99 unsigned long timings = (unsigned long)ide_get_drivedata(drive);
101 const u8 speed = drive->dma_mode;
111 ide_set_drivedata(drive, (void *)timings);
127 * when the drive wants to report an error condition).
145 * This function is called when the IDE timer expires, the drive
148 static void sl82c105_dma_lost_irq(ide_drive_t *drive)
150 ide_hwif_t *hwif = drive->hwif;
158 * Check the raw interrupt from the drive.
162 printk(KERN_INFO "sl82c105: drive was requesting IRQ, "
167 * host. The IDE layer will be handling the drive for us.
186 static void sl82c105_dma_start(ide_drive_t *drive)
188 ide_hwif_t *hwif = drive->hwif;
190 int reg = 0x44 + drive->dn * 4;
193 (unsigned long)ide_get_drivedata(drive) >> 16);
196 ide_dma_start(drive);
199 static void sl82c105_dma_clear(ide_drive_t *drive)
201 struct pci_dev *dev = to_pci_dev(drive->hwif->dev);
206 static int sl82c105_dma_end(ide_drive_t *drive)
208 struct pci_dev *dev = to_pci_dev(drive->hwif->dev);
209 int reg = 0x44 + drive->dn * 4;
210 int ret = ide_dma_end(drive);
213 (unsigned long)ide_get_drivedata(drive));
222 static void sl82c105_resetproc(ide_drive_t *drive)
224 struct pci_dev *dev = to_pci_dev(drive->hwif->dev);