Lines Matching defs:cqr
267 * eer enabled DASD device. The presence of the cqr in device->eer_cqr
270 * that the cqr is currently in use, dasd_eer_snss cannot start a second
289 * If the parameter cqr is not NULL, the chain of requests will be searched
294 struct dasd_ccw_req *cqr,
305 /* go through cqr chain and count the valid sense data sets */
307 for (temp_cqr = cqr; temp_cqr; temp_cqr = temp_cqr->refers)
323 for (temp_cqr = cqr; temp_cqr; temp_cqr = temp_cqr->refers) {
338 struct dasd_ccw_req *cqr,
348 snss_rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO;
367 dasd_eer_write_buffer(eerb, cqr->data, SNSS_DATA_SIZE);
378 void dasd_eer_write(struct dasd_device *device, struct dasd_ccw_req *cqr,
386 dasd_eer_write_standard_trigger(device, cqr, id);
393 dasd_eer_write_snss_trigger(device, cqr, id);
408 struct dasd_ccw_req *cqr;
410 cqr = device->eer_cqr;
411 if (!cqr) /* Device not eer enabled. */
420 cqr->status = DASD_CQR_QUEUED;
421 list_add(&cqr->devlist, &device->ccw_queue);
428 static void dasd_eer_snss_cb(struct dasd_ccw_req *cqr, void *data)
430 struct dasd_device *device = cqr->startdev;
433 dasd_eer_write(device, cqr, DASD_EER_STATECHANGE);
435 if (device->eer_cqr == cqr) {
440 cqr = NULL;
443 if (cqr)
451 dasd_sfree_request(cqr, device);
459 struct dasd_ccw_req *cqr = NULL;
476 cqr = dasd_smalloc_request(DASD_ECKD_MAGIC, 1 /* SNSS */,
478 if (IS_ERR(cqr)) {
480 cqr = NULL;
484 cqr->startdev = device;
485 cqr->retries = 255;
486 cqr->expires = 10 * HZ;
487 clear_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags);
488 set_bit(DASD_CQR_ALLOW_SLOCK, &cqr->flags);
490 ccw = cqr->cpaddr;
494 ccw->cda = (__u32)(addr_t) cqr->data;
496 cqr->buildclk = get_tod_clock();
497 cqr->status = DASD_CQR_FILLED;
498 cqr->callback = dasd_eer_snss_cb;
501 device->eer_cqr = cqr;
502 cqr = NULL;
508 if (cqr)
509 dasd_sfree_request(cqr, device);
519 struct dasd_ccw_req *cqr;
526 cqr = device->eer_cqr;
531 if (cqr && !in_use)
532 dasd_sfree_request(cqr, device);