• Home
  • Raw
  • Download

Lines Matching refs:rq

66 	struct request *rq = pc->rq;  in ide_floppy_callback()  local
75 rq->cmd_type == REQ_TYPE_BLOCK_PC) in ide_floppy_callback()
79 u8 *buf = bio_data(rq->bio); in ide_floppy_callback()
100 if (rq->cmd_type == REQ_TYPE_DRV_PRIV) in ide_floppy_callback()
101 rq->errors = uptodate ? 0 : IDE_DRV_ERROR_GENERAL; in ide_floppy_callback()
136 unsigned int done = blk_rq_bytes(drive->hwif->rq); in ide_floppy_issue_pc()
191 struct ide_atapi_pc *pc, struct request *rq, in idefloppy_create_rw_cmd() argument
196 int blocks = blk_rq_sectors(rq) / floppy->bs_factor; in idefloppy_create_rw_cmd()
197 int cmd = rq_data_dir(rq); in idefloppy_create_rw_cmd()
206 memcpy(rq->cmd, pc->c, 12); in idefloppy_create_rw_cmd()
208 pc->rq = rq; in idefloppy_create_rw_cmd()
216 struct ide_atapi_pc *pc, struct request *rq) in idefloppy_blockpc_cmd() argument
219 memcpy(pc->c, rq->cmd, sizeof(pc->c)); in idefloppy_blockpc_cmd()
220 pc->rq = rq; in idefloppy_blockpc_cmd()
221 if (blk_rq_bytes(rq)) { in idefloppy_blockpc_cmd()
223 if (rq_data_dir(rq) == WRITE) in idefloppy_blockpc_cmd()
229 struct request *rq, sector_t block) in ide_floppy_do_request() argument
235 ide_debug_log(IDE_DBG_FUNC, "enter, cmd: 0x%x\n", rq->cmd[0]); in ide_floppy_do_request()
238 blk_dump_rq_flags(rq, (rq->rq_disk in ide_floppy_do_request()
239 ? rq->rq_disk->disk_name in ide_floppy_do_request()
242 if (rq->errors >= ERROR_MAX) { in ide_floppy_do_request()
249 if (rq->cmd_type == REQ_TYPE_DRV_PRIV) { in ide_floppy_do_request()
250 rq->errors = 0; in ide_floppy_do_request()
251 ide_complete_rq(drive, 0, blk_rq_bytes(rq)); in ide_floppy_do_request()
257 switch (rq->cmd_type) { in ide_floppy_do_request()
259 if (((long)blk_rq_pos(rq) % floppy->bs_factor) || in ide_floppy_do_request()
260 (blk_rq_sectors(rq) % floppy->bs_factor)) { in ide_floppy_do_request()
266 idefloppy_create_rw_cmd(drive, pc, rq, (unsigned long)block); in ide_floppy_do_request()
270 pc = (struct ide_atapi_pc *)rq->special; in ide_floppy_do_request()
274 idefloppy_blockpc_cmd(floppy, pc, rq); in ide_floppy_do_request()
280 ide_prep_sense(drive, rq); in ide_floppy_do_request()
284 if (rq_data_dir(rq)) in ide_floppy_do_request()
287 cmd.rq = rq; in ide_floppy_do_request()
289 if (rq->cmd_type == REQ_TYPE_FS || blk_rq_bytes(rq)) { in ide_floppy_do_request()
290 ide_init_sg_cmd(&cmd, blk_rq_bytes(rq)); in ide_floppy_do_request()
294 pc->rq = rq; in ide_floppy_do_request()
299 if (rq->cmd_type != REQ_TYPE_FS && rq->errors == 0) in ide_floppy_do_request()
300 rq->errors = -EIO; in ide_floppy_do_request()
301 ide_complete_rq(drive, -EIO, blk_rq_bytes(rq)); in ide_floppy_do_request()