Lines Matching refs:mode
27 const char *ide_xfer_verbose(u8 mode) in ide_xfer_verbose() argument
30 u8 i = mode & 0xf; in ide_xfer_verbose()
32 if (mode >= XFER_UDMA_0 && mode <= XFER_UDMA_7) in ide_xfer_verbose()
34 else if (mode >= XFER_MW_DMA_0 && mode <= XFER_MW_DMA_4) in ide_xfer_verbose()
36 else if (mode >= XFER_SW_DMA_0 && mode <= XFER_SW_DMA_2) in ide_xfer_verbose()
38 else if (mode >= XFER_PIO_0 && mode <= XFER_PIO_6) in ide_xfer_verbose()
40 else if (mode == XFER_PIO_SLOW) in ide_xfer_verbose()
122 int ide_set_pio_mode(ide_drive_t *drive, const u8 mode) in ide_set_pio_mode() argument
138 drive->pio_mode = mode; 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()
150 drive->pio_mode = mode; 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
168 if (ide_config_drive_speed(drive, mode)) in ide_set_dma_mode()
170 drive->dma_mode = mode; in ide_set_dma_mode()
174 drive->dma_mode = mode; in ide_set_dma_mode()
176 return ide_config_drive_speed(drive, mode); in ide_set_dma_mode()
225 u8 mode = ide_find_dma_mode(drive, speed); in ide_rate_filter() local
227 if (mode == 0) { in ide_rate_filter()
229 mode = fls(hwif->pio_mask) - 1 + XFER_PIO_0; in ide_rate_filter()
231 mode = XFER_PIO_4; in ide_rate_filter()
236 return min(speed, mode); in ide_rate_filter()