Lines Matching defs:cqr

31 	struct dasd_ccw_req *cqr;
45 cqr = (struct dasd_ccw_req *)
48 if (cqr == NULL)
50 memset(cqr, 0, sizeof(struct dasd_ccw_req));
51 INIT_LIST_HEAD(&cqr->devlist);
52 INIT_LIST_HEAD(&cqr->blocklist);
53 data = (char *) cqr + ((sizeof(struct dasd_ccw_req) + 7L) & -8L);
54 cqr->cpaddr = NULL;
56 cqr->cpaddr = (struct ccw1 *) data;
58 memset(cqr->cpaddr, 0, cplength*sizeof(struct ccw1));
60 cqr->data = NULL;
62 cqr->data = data;
63 memset(cqr->data, 0, datasize);
65 strncpy((char *) &cqr->magic, magic, 4);
66 ASCEBC((char *) &cqr->magic, 4);
67 set_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags);
69 return cqr;
73 dasd_free_erp_request(struct dasd_ccw_req *cqr, struct dasd_device * device)
78 dasd_free_chunk(&device->erp_chunks, cqr);
85 * dasd_default_erp_action just retries the current cqr
88 dasd_default_erp_action(struct dasd_ccw_req *cqr)
92 device = cqr->startdev;
95 if (cqr->retries > 0) {
98 cqr->retries);
99 if (!test_bit(DASD_CQR_VERIFY_PATH, &cqr->flags))
100 cqr->lpm = dasd_path_get_opm(device);
101 cqr->status = DASD_CQR_FILLED;
105 cqr->status = DASD_CQR_FAILED;
106 cqr->stopclk = get_tod_clock();
108 return cqr;
123 * cqr pointer to the original CQR
125 struct dasd_ccw_req *dasd_default_erp_postaction(struct dasd_ccw_req *cqr)
131 BUG_ON(cqr->refers == NULL || cqr->function == NULL);
133 success = cqr->status == DASD_CQR_DONE;
134 startclk = cqr->startclk;
135 stopclk = cqr->stopclk;
136 startdev = cqr->startdev;
138 /* free all ERPs - but NOT the original cqr */
139 while (cqr->refers != NULL) {
142 refers = cqr->refers;
144 list_del(&cqr->blocklist);
146 dasd_free_erp_request(cqr, cqr->memdev);
147 cqr = refers;
150 /* set corresponding status to original cqr */
151 cqr->startclk = startclk;
152 cqr->stopclk = stopclk;
153 cqr->startdev = startdev;
155 cqr->status = DASD_CQR_DONE;
157 cqr->status = DASD_CQR_FAILED;
158 cqr->stopclk = get_tod_clock();
161 return cqr;
166 dasd_log_sense(struct dasd_ccw_req *cqr, struct irb *irb)
170 device = cqr->startdev;
171 if (cqr->intrc == -ETIMEDOUT) {
173 "A timeout error occurred for cqr %p\n", cqr);
176 if (cqr->intrc == -ENOLINK) {
178 "A transport error occurred for cqr %p\n", cqr);
183 device->discipline->dump_sense(device, cqr, irb);
187 dasd_log_sense_dbf(struct dasd_ccw_req *cqr, struct irb *irb)
191 device = cqr->startdev;