Lines Matching refs:rq

92 	struct request *rq;
95 rq = blk_get_request(drive->queue, READ, __GFP_WAIT);
96 rq->cmd_type = REQ_TYPE_SPECIAL;
97 rq->special = (char *)pc;
100 error = blk_rq_map_kern(drive->queue, rq, buf, bufflen,
106 memcpy(rq->cmd, pc->c, 12);
108 rq->cmd[13] = REQ_IDETAPE_PC1;
109 error = blk_execute_rq(drive->queue, disk, rq, 0);
111 blk_put_request(rq);
171 void ide_prep_sense(ide_drive_t *drive, struct request *rq)
194 if (rq->cmd_type == REQ_TYPE_SENSE || drive->sense_rq_armed)
199 blk_rq_init(rq->q, sense_rq);
210 sense_rq->rq_disk = rq->rq_disk;
235 drive->hwif->rq = NULL;
249 struct request *failed_rq = drive->hwif->rq;
267 drive->hwif->rq = NULL;
278 struct request *rq = drive->hwif->rq;
281 debug_log("%s: rq->cmd[0]: 0x%x\n", __func__, rq->cmd[0]);
289 switch (rq->cmd[0]) {
298 if (!(rq->cmd_flags & REQ_QUIET))
300 rq->cmd[0]);
308 int ide_cd_get_xferlen(struct request *rq)
310 switch (rq->cmd_type) {
316 return blk_rq_bytes(rq);
343 int ide_check_ireason(ide_drive_t *drive, struct request *rq, int len,
377 if (dev_is_idecd(drive) && rq->cmd_type == REQ_TYPE_ATA_PC)
378 rq->cmd_flags |= REQ_FAILED;
394 struct request *rq = hwif->rq;
419 drive->name, rq_data_dir(pc->rq)
423 rq->resid_len = 0;
432 blk_rq_bytes(rq));
439 (stat & ATA_ERR) && rq->cmd[0] == REQUEST_SENSE)
447 pc->rq->errors++;
449 if (rq->cmd[0] == REQUEST_SENSE) {
455 debug_log("[cmd %x]: check condition\n", rq->cmd[0]);
469 * ->pc_callback() might change rq->data_len for
472 done = blk_rq_bytes(rq);
480 if (rq->cmd_type == REQ_TYPE_SPECIAL) {
481 rq->errors = 0;
485 if (rq->cmd_type != REQ_TYPE_FS && uptodate <= 0) {
486 if (rq->errors == 0)
487 rq->errors = -EIO;
493 ide_complete_rq(drive, error, blk_rq_bytes(rq));
508 if (ide_check_ireason(drive, rq, bcount, ireason, write))
515 rq->resid_len -= done;
523 rq->cmd[0], done, bcount, rq->resid_len);
586 struct request *rq = hwif->rq;
606 cmd_len = COMMAND_SIZE(rq->cmd[0]);
610 timeout = rq->timeout;
653 hwif->tp_ops->output_data(drive, NULL, rq->cmd, cmd_len);
674 struct request *rq = hwif->rq;
682 bcount = ide_cd_get_xferlen(rq);
692 bytes = blk_rq_bytes(rq);
698 rq->resid_len = bcount;