Lines Matching refs:rq

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