Lines Matching refs:pc
38 struct ide_atapi_pc *pc, in ide_floppy_get_format_capacities() argument
52 ide_floppy_create_read_capacity_cmd(pc); in ide_floppy_get_format_capacities()
54 if (ide_queue_pc_tail(drive, floppy->disk, pc, pc_buf, pc->req_xfer)) { in ide_floppy_get_format_capacities()
98 static void ide_floppy_create_format_unit_cmd(struct ide_atapi_pc *pc, in ide_floppy_create_format_unit_cmd() argument
102 ide_init_pc(pc); in ide_floppy_create_format_unit_cmd()
103 pc->c[0] = GPCMD_FORMAT_UNIT; in ide_floppy_create_format_unit_cmd()
104 pc->c[1] = 0x17; in ide_floppy_create_format_unit_cmd()
116 pc->req_xfer = 12; in ide_floppy_create_format_unit_cmd()
117 pc->flags |= PC_FLAG_WRITING; in ide_floppy_create_format_unit_cmd()
120 static int ide_floppy_get_sfrp_bit(ide_drive_t *drive, struct ide_atapi_pc *pc) in ide_floppy_get_sfrp_bit() argument
127 ide_floppy_create_mode_sense_cmd(pc, IDEFLOPPY_CAPABILITIES_PAGE); in ide_floppy_get_sfrp_bit()
128 pc->flags |= PC_FLAG_SUPPRESS_ERROR; in ide_floppy_get_sfrp_bit()
130 if (ide_queue_pc_tail(drive, floppy->disk, pc, buf, pc->req_xfer)) in ide_floppy_get_sfrp_bit()
139 static int ide_floppy_format_unit(ide_drive_t *drive, struct ide_atapi_pc *pc, in ide_floppy_format_unit() argument
176 ide_floppy_get_sfrp_bit(drive, pc); in ide_floppy_format_unit()
177 ide_floppy_create_format_unit_cmd(pc, buf, blocks, length, flags); in ide_floppy_format_unit()
179 if (ide_queue_pc_tail(drive, floppy->disk, pc, buf, pc->req_xfer)) in ide_floppy_format_unit()
199 struct ide_atapi_pc *pc, in ide_floppy_get_format_progress() argument
207 ide_create_request_sense_cmd(drive, pc); in ide_floppy_get_format_progress()
208 if (ide_queue_pc_tail(drive, floppy->disk, pc, sense_buf, in ide_floppy_get_format_progress()
209 pc->req_xfer)) in ide_floppy_get_format_progress()
236 static int ide_floppy_lockdoor(ide_drive_t *drive, struct ide_atapi_pc *pc, in ide_floppy_lockdoor() argument
254 static int ide_floppy_format_ioctl(ide_drive_t *drive, struct ide_atapi_pc *pc, in ide_floppy_format_ioctl() argument
262 return ide_floppy_get_format_capacities(drive, pc, argp); in ide_floppy_format_ioctl()
266 return ide_floppy_format_unit(drive, pc, (int __user *)argp); in ide_floppy_format_ioctl()
268 return ide_floppy_get_format_progress(drive, pc, argp); in ide_floppy_format_ioctl()
277 struct ide_atapi_pc pc; in ide_floppy_ioctl() local
283 err = ide_floppy_lockdoor(drive, &pc, arg, cmd); in ide_floppy_ioctl()
287 err = ide_floppy_format_ioctl(drive, &pc, mode, cmd, argp); in ide_floppy_ioctl()