Lines Matching refs:drive

10 static int set_io_32bit(ide_drive_t *drive, int arg)  in set_io_32bit()  argument
12 if (drive->dev_flags & IDE_DFLAG_NO_IO_32BIT) in set_io_32bit()
18 drive->io_32bit = arg; in set_io_32bit()
25 static int set_ksettings(ide_drive_t *drive, int arg) in set_ksettings() argument
31 drive->dev_flags |= IDE_DFLAG_KEEP_SETTINGS; in set_ksettings()
33 drive->dev_flags &= ~IDE_DFLAG_KEEP_SETTINGS; in set_ksettings()
40 static int set_using_dma(ide_drive_t *drive, int arg) in set_using_dma() argument
48 if (ata_id_has_dma(drive->id) == 0) in set_using_dma()
51 if (drive->hwif->dma_ops == NULL) in set_using_dma()
57 if (ide_set_dma(drive)) in set_using_dma()
60 ide_dma_off(drive); in set_using_dma()
96 static int set_pio_mode(ide_drive_t *drive, int arg) in set_pio_mode() argument
98 ide_hwif_t *hwif = drive->hwif; in set_pio_mode()
108 if (set_pio_mode_abuse(drive->hwif, arg)) { in set_pio_mode()
109 drive->pio_mode = arg + XFER_PIO_0; in set_pio_mode()
116 port_ops->set_pio_mode(hwif, drive); in set_pio_mode()
119 port_ops->set_pio_mode(hwif, drive); in set_pio_mode()
121 int keep_dma = !!(drive->dev_flags & IDE_DFLAG_USING_DMA); in set_pio_mode()
123 ide_set_pio(drive, arg); in set_pio_mode()
127 ide_dma_on(drive); in set_pio_mode()
136 static int set_unmaskirq(ide_drive_t *drive, int arg) in set_unmaskirq() argument
138 if (drive->dev_flags & IDE_DFLAG_NO_UNMASK) in set_unmaskirq()
145 drive->dev_flags |= IDE_DFLAG_UNMASK; in set_unmaskirq()
147 drive->dev_flags &= ~IDE_DFLAG_UNMASK; in set_unmaskirq()
158 int ide_devset_execute(ide_drive_t *drive, const struct ide_devset *setting, in ide_devset_execute() argument
161 struct request_queue *q = drive->queue; in ide_devset_execute()
166 return setting->set(drive, arg); in ide_devset_execute()
182 ide_startstop_t ide_do_devset(ide_drive_t *drive, struct request *rq) in ide_do_devset() argument
186 err = setfunc(drive, *(int *)&rq->cmd[1]); in ide_do_devset()
189 ide_complete_rq(drive, err, blk_rq_bytes(rq)); in ide_do_devset()