• Home
  • Raw
  • Download

Lines Matching refs:rq

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