Lines Matching refs:drive
68 static void piix_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) in piix_set_pio_mode() argument
71 int is_slave = drive->dn & 1; in piix_set_pio_mode()
79 const u8 pio = drive->pio_mode - XFER_PIO_0; in piix_set_pio_mode()
99 if (drive->media == ide_disk) in piix_set_pio_mode()
101 if (ide_pio_need_iordy(drive, pio)) in piix_set_pio_mode()
137 static void piix_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) in piix_set_dma_mode() argument
141 int a_speed = 3 << (drive->dn * 4); in piix_set_dma_mode()
142 int u_flag = 1 << drive->dn; in piix_set_dma_mode()
143 int v_flag = 0x01 << drive->dn; in piix_set_dma_mode()
144 int w_flag = 0x10 << drive->dn; in piix_set_dma_mode()
149 const u8 speed = drive->dma_mode; in piix_set_dma_mode()
161 u_speed = min_t(u8, 2 - (udma & 1), udma) << (drive->dn * 4); in piix_set_dma_mode()
190 drive->pio_mode = in piix_set_dma_mode()
193 drive->pio_mode = XFER_PIO_2; /* for SWDMA2 */ in piix_set_dma_mode()
195 piix_set_pio_mode(hwif, drive); in piix_set_dma_mode()
225 static void ich_clear_irq(ide_drive_t *drive) in ich_clear_irq() argument
227 ide_hwif_t *hwif = drive->hwif; in ich_clear_irq()
235 if (drive->waiting_for_dma || hwif->dma_base == 0) in ich_clear_irq()