Lines Matching refs:cqr
294 struct dasd_ccw_req *cqr, in dasd_eer_write_standard_trigger() argument
307 for (temp_cqr = cqr; temp_cqr; temp_cqr = temp_cqr->refers) in dasd_eer_write_standard_trigger()
323 for (temp_cqr = cqr; temp_cqr; temp_cqr = temp_cqr->refers) { in dasd_eer_write_standard_trigger()
338 struct dasd_ccw_req *cqr, in dasd_eer_write_snss_trigger() argument
348 snss_rc = (cqr->status == DASD_CQR_DONE) ? 0 : -EIO; in dasd_eer_write_snss_trigger()
367 dasd_eer_write_buffer(eerb, cqr->data, SNSS_DATA_SIZE); in dasd_eer_write_snss_trigger()
378 void dasd_eer_write(struct dasd_device *device, struct dasd_ccw_req *cqr, in dasd_eer_write() argument
386 dasd_eer_write_standard_trigger(device, cqr, id); in dasd_eer_write()
394 dasd_eer_write_snss_trigger(device, cqr, id); in dasd_eer_write()
409 struct dasd_ccw_req *cqr; in dasd_eer_snss() local
411 cqr = device->eer_cqr; in dasd_eer_snss()
412 if (!cqr) /* Device not eer enabled. */ in dasd_eer_snss()
421 cqr->status = DASD_CQR_QUEUED; in dasd_eer_snss()
422 list_add(&cqr->devlist, &device->ccw_queue); in dasd_eer_snss()
429 static void dasd_eer_snss_cb(struct dasd_ccw_req *cqr, void *data) in dasd_eer_snss_cb() argument
431 struct dasd_device *device = cqr->startdev; in dasd_eer_snss_cb()
434 dasd_eer_write(device, cqr, DASD_EER_STATECHANGE); in dasd_eer_snss_cb()
436 if (device->eer_cqr == cqr) { in dasd_eer_snss_cb()
441 cqr = NULL; in dasd_eer_snss_cb()
444 if (cqr) in dasd_eer_snss_cb()
452 dasd_sfree_request(cqr, device); in dasd_eer_snss_cb()
460 struct dasd_ccw_req *cqr = NULL; in dasd_eer_enable() local
477 cqr = dasd_smalloc_request(DASD_ECKD_MAGIC, 1 /* SNSS */, in dasd_eer_enable()
479 if (IS_ERR(cqr)) { in dasd_eer_enable()
481 cqr = NULL; in dasd_eer_enable()
485 cqr->startdev = device; in dasd_eer_enable()
486 cqr->retries = 255; in dasd_eer_enable()
487 cqr->expires = 10 * HZ; in dasd_eer_enable()
488 clear_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags); in dasd_eer_enable()
489 set_bit(DASD_CQR_ALLOW_SLOCK, &cqr->flags); in dasd_eer_enable()
491 ccw = cqr->cpaddr; in dasd_eer_enable()
495 ccw->cda = (__u32)virt_to_phys(cqr->data); in dasd_eer_enable()
497 cqr->buildclk = get_tod_clock(); in dasd_eer_enable()
498 cqr->status = DASD_CQR_FILLED; in dasd_eer_enable()
499 cqr->callback = dasd_eer_snss_cb; in dasd_eer_enable()
502 device->eer_cqr = cqr; in dasd_eer_enable()
503 cqr = NULL; in dasd_eer_enable()
509 if (cqr) in dasd_eer_enable()
510 dasd_sfree_request(cqr, device); in dasd_eer_enable()
520 struct dasd_ccw_req *cqr; in dasd_eer_disable() local
527 cqr = device->eer_cqr; in dasd_eer_disable()
532 if (cqr && !in_use) in dasd_eer_disable()
533 dasd_sfree_request(cqr, device); in dasd_eer_disable()