• Home
  • Raw
  • Download

Lines Matching refs:drive

62 static u8 ide_get_best_pio_mode(ide_drive_t *drive, u8 mode_wanted, u8 max_mode)  in ide_get_best_pio_mode()  argument
64 u16 *id = drive->id; in ide_get_best_pio_mode()
70 if ((drive->hwif->host_flags & IDE_HFLAG_PIO_NO_BLACKLIST) == 0) in ide_get_best_pio_mode()
74 printk(KERN_INFO "%s: is on PIO blacklist\n", drive->name); in ide_get_best_pio_mode()
101 drive->name); in ide_get_best_pio_mode()
110 int ide_pio_need_iordy(ide_drive_t *drive, const u8 pio) in ide_pio_need_iordy() argument
116 if (pio == 0 && (drive->hwif->port_flags & IDE_PFLAG_PROBING)) in ide_pio_need_iordy()
118 return ata_id_pio_need_iordy(drive->id, pio); in ide_pio_need_iordy()
122 int ide_set_pio_mode(ide_drive_t *drive, const u8 mode) in ide_set_pio_mode() argument
124 ide_hwif_t *hwif = drive->hwif; in ide_set_pio_mode()
138 drive->pio_mode = mode; in ide_set_pio_mode()
139 port_ops->set_pio_mode(hwif, drive); in ide_set_pio_mode()
144 if (ide_config_drive_speed(drive, mode)) in ide_set_pio_mode()
146 drive->pio_mode = mode; in ide_set_pio_mode()
147 port_ops->set_pio_mode(hwif, drive); in ide_set_pio_mode()
150 drive->pio_mode = mode; in ide_set_pio_mode()
151 port_ops->set_pio_mode(hwif, drive); in ide_set_pio_mode()
152 return ide_config_drive_speed(drive, mode); in ide_set_pio_mode()
156 int ide_set_dma_mode(ide_drive_t *drive, const u8 mode) in ide_set_dma_mode() argument
158 ide_hwif_t *hwif = drive->hwif; in ide_set_dma_mode()
168 if (ide_config_drive_speed(drive, mode)) in ide_set_dma_mode()
170 drive->dma_mode = mode; in ide_set_dma_mode()
171 port_ops->set_dma_mode(hwif, drive); in ide_set_dma_mode()
174 drive->dma_mode = mode; in ide_set_dma_mode()
175 port_ops->set_dma_mode(hwif, drive); in ide_set_dma_mode()
176 return ide_config_drive_speed(drive, mode); in ide_set_dma_mode()
182 void ide_set_pio(ide_drive_t *drive, u8 req_pio) in ide_set_pio() argument
184 ide_hwif_t *hwif = drive->hwif; in ide_set_pio()
196 pio = ide_get_best_pio_mode(drive, req_pio, host_pio); in ide_set_pio()
204 drive->name, host_pio, req_pio, in ide_set_pio()
207 (void)ide_set_pio_mode(drive, XFER_PIO_0 + pio); in ide_set_pio()
222 static u8 ide_rate_filter(ide_drive_t *drive, u8 speed) in ide_rate_filter() argument
224 ide_hwif_t *hwif = drive->hwif; in ide_rate_filter()
225 u8 mode = ide_find_dma_mode(drive, speed); in ide_rate_filter()
249 int ide_set_xfer_rate(ide_drive_t *drive, u8 rate) in ide_set_xfer_rate() argument
251 ide_hwif_t *hwif = drive->hwif; in ide_set_xfer_rate()
258 rate = ide_rate_filter(drive, rate); in ide_set_xfer_rate()
263 return ide_set_pio_mode(drive, rate); in ide_set_xfer_rate()
265 return ide_set_dma_mode(drive, rate); in ide_set_xfer_rate()