Lines Matching refs:rq
10 struct request *rq; in generic_ide_suspend() local
21 rq = blk_get_request(drive->queue, READ, __GFP_RECLAIM); in generic_ide_suspend()
22 rq->cmd_type = REQ_TYPE_ATA_PM_SUSPEND; in generic_ide_suspend()
23 rq->special = &rqpm; in generic_ide_suspend()
29 ret = blk_execute_rq(drive->queue, NULL, rq, 0); in generic_ide_suspend()
30 blk_put_request(rq); in generic_ide_suspend()
41 static void ide_end_sync_rq(struct request *rq, int error) in ide_end_sync_rq() argument
43 complete(rq->end_io_data); in ide_end_sync_rq()
46 static int ide_pm_execute_rq(struct request *rq) in ide_pm_execute_rq() argument
48 struct request_queue *q = rq->q; in ide_pm_execute_rq()
51 rq->end_io_data = &wait; in ide_pm_execute_rq()
52 rq->end_io = ide_end_sync_rq; in ide_pm_execute_rq()
56 rq->cmd_flags |= REQ_QUIET; in ide_pm_execute_rq()
57 rq->errors = -ENXIO; in ide_pm_execute_rq()
58 __blk_end_request_all(rq, rq->errors); in ide_pm_execute_rq()
62 __elv_add_request(q, rq, ELEVATOR_INSERT_FRONT); in ide_pm_execute_rq()
68 return rq->errors ? -EIO : 0; in ide_pm_execute_rq()
76 struct request *rq; in generic_ide_resume() local
91 rq = blk_get_request(drive->queue, READ, __GFP_RECLAIM); in generic_ide_resume()
92 rq->cmd_type = REQ_TYPE_ATA_PM_RESUME; in generic_ide_resume()
93 rq->cmd_flags |= REQ_PREEMPT; in generic_ide_resume()
94 rq->special = &rqpm; in generic_ide_resume()
98 err = ide_pm_execute_rq(rq); in generic_ide_resume()
99 blk_put_request(rq); in generic_ide_resume()
111 void ide_complete_power_step(ide_drive_t *drive, struct request *rq) in ide_complete_power_step() argument
113 struct ide_pm_state *pm = rq->special; in ide_complete_power_step()
141 ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *rq) in ide_start_power_step() argument
143 struct ide_pm_state *pm = rq->special; in ide_start_power_step()
153 ide_complete_power_step(drive, rq); in ide_start_power_step()
172 ide_complete_power_step(drive, rq); in ide_start_power_step()
212 void ide_complete_pm_rq(ide_drive_t *drive, struct request *rq) in ide_complete_pm_rq() argument
215 struct ide_pm_state *pm = rq->special; in ide_complete_pm_rq()
218 ide_complete_power_step(drive, rq); in ide_complete_pm_rq()
224 (rq->cmd_type == REQ_TYPE_ATA_PM_SUSPEND) ? "suspend" : "resume"); in ide_complete_pm_rq()
227 if (rq->cmd_type == REQ_TYPE_ATA_PM_SUSPEND) in ide_complete_pm_rq()
233 drive->hwif->rq = NULL; in ide_complete_pm_rq()
235 if (blk_end_request(rq, 0, 0)) in ide_complete_pm_rq()
239 void ide_check_pm_state(ide_drive_t *drive, struct request *rq) in ide_check_pm_state() argument
241 struct ide_pm_state *pm = rq->special; in ide_check_pm_state()
243 if (rq->cmd_type == REQ_TYPE_ATA_PM_SUSPEND && in ide_check_pm_state()
247 else if (rq->cmd_type == REQ_TYPE_ATA_PM_RESUME && in ide_check_pm_state()