/Linux-v5.10/drivers/ide/ |
D | ide-disk.c | 56 static void ide_tf_set_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 dma) in ide_tf_set_cmd() argument 68 if (drive->mult_count) { in ide_tf_set_cmd() 82 static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, in __ide_do_rw_disk() argument 85 ide_hwif_t *hwif = drive->hwif; in __ide_do_rw_disk() 87 u8 lba48 = !!(drive->dev_flags & IDE_DFLAG_LBA48); in __ide_do_rw_disk() 88 u8 dma = !!(drive->dev_flags & IDE_DFLAG_USING_DMA); in __ide_do_rw_disk() 104 if (drive->dev_flags & IDE_DFLAG_LBA) { in __ide_do_rw_disk() 106 pr_debug("%s: LBA=0x%012llx\n", drive->name, in __ide_do_rw_disk() 136 track = (int)block / drive->sect; in __ide_do_rw_disk() 137 sect = (int)block % drive->sect + 1; in __ide_do_rw_disk() [all …]
|
D | ide-atapi.c | 28 static inline int dev_is_idecd(ide_drive_t *drive) in dev_is_idecd() argument 30 return drive->media == ide_cdrom || drive->media == ide_optical; in dev_is_idecd() 37 int ide_check_atapi_device(ide_drive_t *drive, const char *s) in ide_check_atapi_device() argument 39 u16 *id = drive->id; in ide_check_atapi_device() 52 if (drive->media == ide_floppy && device_type == 5 && in ide_check_atapi_device() 60 s, drive->name, protocol); in ide_check_atapi_device() 61 else if ((drive->media == ide_floppy && device_type != 0) || in ide_check_atapi_device() 62 (drive->media == ide_tape && device_type != 1)) in ide_check_atapi_device() 64 s, drive->name, device_type); in ide_check_atapi_device() 67 s, drive->name); in ide_check_atapi_device() [all …]
|
D | ide-gd.c | 41 if (ide_device_get(idkp->drive)) in ide_disk_get() 52 ide_drive_t *drive = idkp->drive; in ide_disk_put() local 56 ide_device_put(drive); in ide_disk_put() 60 sector_t ide_gd_capacity(ide_drive_t *drive) in ide_gd_capacity() argument 62 return drive->capacity64; in ide_gd_capacity() 67 static void ide_gd_remove(ide_drive_t *drive) in ide_gd_remove() argument 69 struct ide_disk_obj *idkp = drive->driver_data; in ide_gd_remove() 72 ide_proc_unregister_driver(drive, idkp->driver); in ide_gd_remove() 75 drive->disk_ops->flush(drive); in ide_gd_remove() 85 ide_drive_t *drive = idkp->drive; in ide_disk_release() local [all …]
|
D | ide-dma.c | 28 * for supplying a Promise UDMA board & WD UDMA drive for this work! 70 { "CD-ROM Drive/F5A", NULL }, 74 { "ATAPI CD-ROM DRIVE 40X MAXIMUM", NULL }, 85 * @drive: the drive the interrupt is for 91 ide_startstop_t ide_dma_intr(ide_drive_t *drive) in ide_dma_intr() argument 93 ide_hwif_t *hwif = drive->hwif; in ide_dma_intr() 97 drive->waiting_for_dma = 0; in ide_dma_intr() 98 dma_stat = hwif->dma_ops->dma_end(drive); in ide_dma_intr() 99 ide_dma_unmap_sg(drive, cmd); in ide_dma_intr() 102 if (OK_STAT(stat, DRIVE_READY, drive->bad_wstat | ATA_DRQ)) { in ide_dma_intr() [all …]
|
D | ide-eh.c | 8 static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq, in ide_ata_error() argument 11 ide_hwif_t *hwif = drive->hwif; in ide_ata_error() 14 ((stat & ATA_DF) && (drive->dev_flags & IDE_DFLAG_NOWERR) == 0)) { in ide_ata_error() 20 if ((drive->dev_flags & IDE_DFLAG_LBA) && in ide_ata_error() 26 drive->crc_count++; in ide_ata_error() 38 int nsect = drive->mult_count ? drive->mult_count : 1; in ide_ata_error() 40 ide_pad_transfer(drive, READ, nsect * SECTOR_SIZE); in ide_ata_error() 44 ide_kill_rq(drive, rq); in ide_ata_error() 53 return ide_do_reset(drive); in ide_ata_error() 57 drive->special_flags |= IDE_SFLAG_RECALIBRATE; in ide_ata_error() [all …]
|
D | ide-probe.c | 44 * generic_id - add a generic drive id 45 * @drive: drive to make an ID block for 47 * Add a fake id field to the drive we are passed. This allows 49 * and make drive properties unconditional outside of this file 52 static void generic_id(ide_drive_t *drive) in generic_id() argument 54 u16 *id = drive->id; in generic_id() 56 id[ATA_ID_CUR_CYLS] = id[ATA_ID_CYLS] = drive->cyl; in generic_id() 57 id[ATA_ID_CUR_HEADS] = id[ATA_ID_HEADS] = drive->head; in generic_id() 58 id[ATA_ID_CUR_SECTORS] = id[ATA_ID_SECTORS] = drive->sect; in generic_id() 61 static void ide_disk_init_chs(ide_drive_t *drive) in ide_disk_init_chs() argument [all …]
|
D | ide-io.c | 57 int ide_end_rq(ide_drive_t *drive, struct request *rq, blk_status_t error, in ide_end_rq() argument 64 if ((drive->dev_flags & IDE_DFLAG_DMA_PIO_RETRY) && in ide_end_rq() 65 drive->retry_pio <= 3) { in ide_end_rq() 66 drive->dev_flags &= ~IDE_DFLAG_DMA_PIO_RETRY; in ide_end_rq() 67 ide_dma_on(drive); in ide_end_rq() 71 if (rq == drive->sense_rq) { in ide_end_rq() 72 drive->sense_rq = NULL; in ide_end_rq() 73 drive->sense_rq_active = false; in ide_end_rq() 84 void ide_complete_cmd(ide_drive_t *drive, struct ide_cmd *cmd, u8 stat, u8 err) in ide_complete_cmd() argument 86 const struct ide_tp_ops *tp_ops = drive->hwif->tp_ops; in ide_complete_cmd() [all …]
|
D | ide-floppy.c | 59 * The following delay solves a problem with ATAPI Zip 100 drive where BSY bit 64 static int ide_floppy_callback(ide_drive_t *drive, int dsc) in ide_floppy_callback() argument 66 struct ide_disk_obj *floppy = drive->driver_data; in ide_floppy_callback() 67 struct ide_atapi_pc *pc = drive->pc; in ide_floppy_callback() 73 if (drive->failed_pc == pc) in ide_floppy_callback() 74 drive->failed_pc = NULL; in ide_floppy_callback() 90 if (drive->failed_pc) in ide_floppy_callback() 92 drive->failed_pc->c[0]); in ide_floppy_callback() 119 floppy->drive->name, pc->c[0], floppy->sense_key, in ide_floppy_report_error() 124 static ide_startstop_t ide_floppy_issue_pc(ide_drive_t *drive, in ide_floppy_issue_pc() argument [all …]
|
D | ide-pm.c | 8 ide_drive_t *drive = to_ide_device(dev); in generic_ide_suspend() local 9 ide_drive_t *pair = ide_get_pair_dev(drive); in generic_ide_suspend() 10 ide_hwif_t *hwif = drive->hwif; in generic_ide_suspend() 17 if ((drive->dn & 1) == 0 || pair == NULL) in generic_ide_suspend() 22 rq = blk_get_request(drive->queue, REQ_OP_DRV_IN, 0); in generic_ide_suspend() 30 blk_execute_rq(drive->queue, NULL, rq, 0); in generic_ide_suspend() 36 if ((drive->dn & 1) || pair == NULL) in generic_ide_suspend() 60 ide_drive_t *drive = to_ide_device(dev); in generic_ide_resume() local 61 ide_drive_t *pair = ide_get_pair_dev(drive); in generic_ide_resume() 62 ide_hwif_t *hwif = drive->hwif; in generic_ide_resume() [all …]
|
D | ide-tape.c | 142 ide_drive_t *drive; member 245 if (ide_device_get(tape->drive)) in ide_tape_get() 257 ide_drive_t *drive = tape->drive; in ide_tape_put() local 261 ide_device_put(drive); in ide_tape_put() 269 static void idetape_analyze_error(ide_drive_t *drive) in idetape_analyze_error() argument 271 idetape_tape_t *tape = drive->driver_data; in idetape_analyze_error() 272 struct ide_atapi_pc *pc = drive->failed_pc; in idetape_analyze_error() 273 struct request *rq = drive->hwif->rq; in idetape_analyze_error() 327 static int ide_tape_callback(ide_drive_t *drive, int dsc) in ide_tape_callback() argument 329 idetape_tape_t *tape = drive->driver_data; in ide_tape_callback() [all …]
|
D | ide-xfer-mode.c | 51 * ide_get_best_pio_mode - get PIO mode from drive 52 * @drive: drive to consider 56 * This routine returns the recommended PIO settings for a given drive, 57 * based on the drive->id information and the ide_pio_blacklist[]. 59 * Drive PIO mode is auto-selected if 255 is passed as mode_wanted. 63 static u8 ide_get_best_pio_mode(ide_drive_t *drive, u8 mode_wanted, u8 max_mode) in ide_get_best_pio_mode() argument 65 u16 *id = drive->id; in ide_get_best_pio_mode() 71 if ((drive->hwif->host_flags & IDE_HFLAG_PIO_NO_BLACKLIST) == 0) in ide_get_best_pio_mode() 75 printk(KERN_INFO "%s: is on PIO blacklist\n", drive->name); in ide_get_best_pio_mode() 102 drive->name); in ide_get_best_pio_mode() [all …]
|
D | ide-taskfile.c | 29 void ide_tf_readback(ide_drive_t *drive, struct ide_cmd *cmd) in ide_tf_readback() argument 31 ide_hwif_t *hwif = drive->hwif; in ide_tf_readback() 37 tp_ops->tf_read(drive, &cmd->tf, cmd->valid.in.tf); in ide_tf_readback() 42 tp_ops->tf_read(drive, &cmd->hob, cmd->valid.in.hob); in ide_tf_readback() 59 int taskfile_lib_get_identify(ide_drive_t *drive, u8 *buf) in taskfile_lib_get_identify() argument 65 if (drive->media == ide_disk) in taskfile_lib_get_identify() 73 return ide_raw_taskfile(drive, &cmd, buf, 1); in taskfile_lib_get_identify() 80 ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *orig_cmd) in do_rw_taskfile() argument 82 ide_hwif_t *hwif = drive->hwif; in do_rw_taskfile() 91 drive->mult_count == 0) { in do_rw_taskfile() [all …]
|
D | ide-cd.c | 67 if (ide_device_get(cd->drive)) in ide_cd_get() 79 ide_drive_t *drive = cd->drive; in ide_cd_put() local 83 ide_device_put(drive); in ide_cd_put() 92 static void cdrom_saw_media_change(ide_drive_t *drive) in cdrom_saw_media_change() argument 94 drive->dev_flags |= IDE_DFLAG_MEDIA_CHANGED; in cdrom_saw_media_change() 95 drive->atapi_flags &= ~IDE_AFLAG_TOC_VALID; in cdrom_saw_media_change() 98 static int cdrom_log_sense(ide_drive_t *drive, struct request *rq) in cdrom_log_sense() argument 100 struct request_sense *sense = &drive->sense_data; in cdrom_log_sense() 124 * reliably check if drive can auto-close in cdrom_log_sense() 136 cdrom_saw_media_change(drive); in cdrom_log_sense() [all …]
|
D | ide-cd_ioctl.c | 31 ide_drive_t *drive = cdi->handle; in ide_cdrom_release_real() local 34 drive->atapi_flags &= ~IDE_AFLAG_TOC_VALID; in ide_cdrom_release_real() 44 ide_drive_t *drive = cdi->handle; in ide_cdrom_drive_status() local 52 stat = cdrom_check_status(drive, &sshdr); in ide_cdrom_drive_status() 93 ide_drive_t *drive = cdi->handle; in ide_cdrom_check_events_real() local 97 (void) cdrom_check_status(drive, NULL); in ide_cdrom_check_events_real() 98 retval = (drive->dev_flags & IDE_DFLAG_MEDIA_CHANGED) ? 1 : 0; in ide_cdrom_check_events_real() 99 drive->dev_flags &= ~IDE_DFLAG_MEDIA_CHANGED; in ide_cdrom_check_events_real() 109 int cdrom_eject(ide_drive_t *drive, int ejectflag) in cdrom_eject() argument 111 struct cdrom_info *cd = drive->driver_data; in cdrom_eject() [all …]
|
D | ide-iops.c | 31 void SELECT_MASK(ide_drive_t *drive, int mask) in SELECT_MASK() argument 33 const struct ide_port_ops *port_ops = drive->hwif->port_ops; in SELECT_MASK() 36 port_ops->maskproc(drive, mask); in SELECT_MASK() 39 u8 ide_read_error(ide_drive_t *drive) in ide_read_error() argument 43 drive->hwif->tp_ops->tf_read(drive, &tf, IDE_VALID_ERROR); in ide_read_error() 96 * This routine busy-waits for the drive status to be not "busy". 106 int __ide_wait_stat(ide_drive_t *drive, u8 good, u8 bad, in __ide_wait_stat() argument 109 ide_hwif_t *hwif = drive->hwif; in __ide_wait_stat() 116 udelay(1); /* spec allows drive 400ns to assert "BUSY" */ in __ide_wait_stat() 170 int ide_wait_stat(ide_startstop_t *startstop, ide_drive_t *drive, u8 good, in ide_wait_stat() argument [all …]
|
D | ide-proc.c | 12 * Drive/Driver settings can be retrieved by reading the drive's 81 ide_drive_t *drive = (ide_drive_t *)m->private; in ide_identify_proc_show() local 84 if (!drive) { in ide_identify_proc_show() 92 if (taskfile_lib_get_identify(drive, buf) == 0) { in ide_identify_proc_show() 130 * @drive: drive to read from 131 * @setting: drive setting 133 * Read a drive setting and return the value. The caller 141 static int ide_read_setting(ide_drive_t *drive, in ide_read_setting() argument 148 val = ds->get(drive); in ide_read_setting() 155 * @drive: drive to read from [all …]
|
D | ide-devsets.c | 11 static int set_io_32bit(ide_drive_t *drive, int arg) in set_io_32bit() argument 13 if (drive->dev_flags & IDE_DFLAG_NO_IO_32BIT) in set_io_32bit() 19 drive->io_32bit = arg; in set_io_32bit() 26 static int set_ksettings(ide_drive_t *drive, int arg) in set_ksettings() argument 32 drive->dev_flags |= IDE_DFLAG_KEEP_SETTINGS; in set_ksettings() 34 drive->dev_flags &= ~IDE_DFLAG_KEEP_SETTINGS; in set_ksettings() 41 static int set_using_dma(ide_drive_t *drive, int arg) in set_using_dma() argument 49 if (ata_id_has_dma(drive->id) == 0) in set_using_dma() 52 if (drive->hwif->dma_ops == NULL) in set_using_dma() 58 if (ide_set_dma(drive)) in set_using_dma() [all …]
|
D | ide.c | 34 * | IRQ-unmask, drive-id, multiple-mode, support for ">16 heads", 67 * @drive: device to get a reference to 72 int ide_device_get(ide_drive_t *drive) in ide_device_get() argument 77 if (!get_device(&drive->gendev)) in ide_device_get() 80 host_dev = drive->hwif->host->dev[0]; in ide_device_get() 84 put_device(&drive->gendev); in ide_device_get() 94 * @drive: device to release a reference on 99 void ide_device_put(ide_drive_t *drive) in ide_device_put() argument 102 struct device *host_dev = drive->hwif->host->dev[0]; in ide_device_put() 107 put_device(&drive->gendev); in ide_device_put() [all …]
|
D | ide-floppy_ioctl.c | 38 static int ide_floppy_get_format_capacities(ide_drive_t *drive, in ide_floppy_get_format_capacities() argument 42 struct ide_disk_obj *floppy = drive->driver_data; in ide_floppy_get_format_capacities() 55 if (ide_queue_pc_tail(drive, floppy->disk, pc, pc_buf, pc->req_xfer)) { in ide_floppy_get_format_capacities() 121 static int ide_floppy_get_sfrp_bit(ide_drive_t *drive, struct ide_atapi_pc *pc) in ide_floppy_get_sfrp_bit() argument 123 struct ide_disk_obj *floppy = drive->driver_data; in ide_floppy_get_sfrp_bit() 126 drive->atapi_flags &= ~IDE_AFLAG_SRFP; in ide_floppy_get_sfrp_bit() 131 if (ide_queue_pc_tail(drive, floppy->disk, pc, buf, pc->req_xfer)) in ide_floppy_get_sfrp_bit() 135 drive->atapi_flags |= IDE_AFLAG_SRFP; in ide_floppy_get_sfrp_bit() 140 static int ide_floppy_format_unit(ide_drive_t *drive, struct ide_atapi_pc *pc, in ide_floppy_format_unit() argument 143 struct ide_disk_obj *floppy = drive->driver_data; in ide_floppy_format_unit() [all …]
|
D | ide-park.c | 10 static void issue_park_cmd(ide_drive_t *drive, unsigned long timeout) in issue_park_cmd() argument 12 ide_hwif_t *hwif = drive->hwif; in issue_park_cmd() 13 struct request_queue *q = drive->queue; in issue_park_cmd() 19 if (drive->dev_flags & IDE_DFLAG_PARKED) { in issue_park_cmd() 20 int reset_timer = time_before(timeout, drive->sleep); in issue_park_cmd() 23 drive->sleep = timeout; in issue_park_cmd() 47 * Make sure that *some* command is sent to the drive after the in issue_park_cmd() 58 ide_insert_request_head(drive, rq); in issue_park_cmd() 65 ide_startstop_t ide_do_park_unpark(ide_drive_t *drive, struct request *rq) in ide_do_park_unpark() argument 72 drive->sleep = *(unsigned long *)ide_req(rq)->special; in ide_do_park_unpark() [all …]
|
D | it821x.c | 83 u16 udma[2]; /* Cached UDMA values (per drive) */ 105 * @drive: drive to tune 112 static void it821x_program(ide_drive_t *drive, u16 timing) in it821x_program() argument 114 ide_hwif_t *hwif = drive->hwif; in it821x_program() 131 * @drive: drive to tune 134 * Program the UDMA timing for this drive according to the 138 static void it821x_program_udma(ide_drive_t *drive, u16 timing) in it821x_program_udma() argument 140 ide_hwif_t *hwif = drive->hwif; in it821x_program_udma() 144 u8 unit = drive->dn & 1, conf; in it821x_program_udma() 162 * @drive: drive to set up [all …]
|
/Linux-v5.10/arch/arm64/boot/dts/qcom/ |
D | msm8916-pins.dtsi | 13 drive-strength = <16>; 21 drive-strength = <2>; 29 drive-strength = <16>; 37 drive-strength = <2>; 45 drive-strength = <12>; 52 drive-strength = <16>; 62 drive-strength = <2>; 70 drive-strength = <12>; 77 drive-strength = <16>; 87 drive-strength = <2>; [all …]
|
D | msm8996-pins.dtsi | 17 drive-strength = <2>; /* 2 mA */ 32 drive-strength = <16>; 44 drive-strength = <16>; 62 drive-strength = <12>; 67 drive-strength = <16>; 80 drive-strength = <2>; 92 drive-strength = <16>; 104 drive-strength = <2>; 116 drive-strength = <16>; 128 drive-strength = <2>; [all …]
|
/Linux-v5.10/drivers/block/ |
D | amiflop.c | 53 * - added trackbuffer for each drive to speed things up 102 #define DSKSEL3 (0x1<<6) /* select drive 3 when low */ 103 #define DSKSEL2 (0x1<<5) /* select drive 2 when low */ 104 #define DSKSEL1 (0x1<<4) /* select drive 1 when low */ 105 #define DSKSEL0 (0x1<<3) /* select drive 0 when low */ 176 unsigned long code; /* code returned from drive */ 177 char *name; /* description of drive */ 199 int disk; /* disk in drive (-1 == unknown) */ 201 int busy; /* true when drive is active */ 227 #define FD_DD_3 0xffffffff /* double-density 3.5" (880K) drive */ [all …]
|
D | floppy.c | 241 * motor of these drives causes system hangs on some PCI computers. drive 242 * 0 is the low bit (0x1), and drive 7 is the high bit (0x80). Bits are on if 243 * a drive is allowed. 303 #define UNIT(x) ((x) & 0x03) /* drive on fdc */ 304 #define FDC(x) (((x) & 0x04) >> 2) /* fdc of drive */ 305 /* reverse mapping from unit and fdc to drive */ 354 * this struct defines the different floppy drive types. 361 CMOS drive type 362 | Maximum data rate supported by drive type 415 * types (e.g. 360kB diskette in 1.2MB drive, etc.). Bit 1 of 'stretch' [all …]
|