Lines Matching refs:mode
28 const char *ide_xfer_verbose(u8 mode) in ide_xfer_verbose() argument
31 u8 i = mode & 0xf; in ide_xfer_verbose()
33 if (mode >= XFER_UDMA_0 && mode <= XFER_UDMA_7) in ide_xfer_verbose()
35 else if (mode >= XFER_MW_DMA_0 && mode <= XFER_MW_DMA_4) in ide_xfer_verbose()
37 else if (mode >= XFER_SW_DMA_0 && mode <= XFER_SW_DMA_2) in ide_xfer_verbose()
39 else if (mode >= XFER_PIO_0 && mode <= XFER_PIO_6) in ide_xfer_verbose()
41 else if (mode == XFER_PIO_SLOW) in ide_xfer_verbose()
123 int ide_set_pio_mode(ide_drive_t *drive, const u8 mode) in ide_set_pio_mode() argument
139 drive->pio_mode = mode; in ide_set_pio_mode()
145 if (ide_config_drive_speed(drive, mode)) in ide_set_pio_mode()
147 drive->pio_mode = mode; in ide_set_pio_mode()
151 drive->pio_mode = mode; in ide_set_pio_mode()
153 return ide_config_drive_speed(drive, mode); in ide_set_pio_mode()
157 int ide_set_dma_mode(ide_drive_t *drive, const u8 mode) in ide_set_dma_mode() argument
169 if (ide_config_drive_speed(drive, mode)) in ide_set_dma_mode()
171 drive->dma_mode = mode; in ide_set_dma_mode()
175 drive->dma_mode = mode; in ide_set_dma_mode()
177 return ide_config_drive_speed(drive, mode); in ide_set_dma_mode()
226 u8 mode = ide_find_dma_mode(drive, speed); in ide_rate_filter() local
228 if (mode == 0) { in ide_rate_filter()
230 mode = fls(hwif->pio_mask) - 1 + XFER_PIO_0; in ide_rate_filter()
232 mode = XFER_PIO_4; in ide_rate_filter()
237 return min(speed, mode); in ide_rate_filter()