Lines Matching defs:cqr
43 * the status of the original cqr / erp to the given (final) status
50 * cqr original cqr
55 struct dasd_ccw_req *cqr = erp->refers;
58 cqr->status = final_status;
59 return cqr;
110 /* (this enables easier enqueing of the cqr) */
184 * Setup cqr to do the Diagnostic Control (DCTL) command with an
290 * Use a timer (20 seconds) to retry the cqr if the interrupt is still
309 /* interrupt (this enables easier enqueing of the cqr) */
1086 /* (this enables easier enqueing of the cqr) */
1304 * erp pointer to original (failed) cqr.
1435 struct dasd_ccw_req *cqr = erp->refers;
1438 if (cqr->block &&
1439 (cqr->block->base != cqr->startdev)) {
1445 if (!test_bit(DASD_FLAG_OFFLINE, &cqr->startdev->flags) && sense
1453 dasd_alias_remove_device(cqr->startdev);
1456 dasd_reload_device(cqr->startdev);
1459 if (cqr->startdev->features & DASD_FEATURE_ERPLOG) {
1460 DBF_DEV_EVENT(DBF_ERR, cqr->startdev,
1462 " recover on base device %s", cqr,
1463 dev_name(&cqr->block->base->cdev->dev));
1465 dasd_eckd_reset_ccw_to_base_io(cqr);
1466 erp->startdev = cqr->block->base;
1608 struct dasd_ccw_req *cqr;
1620 /* determine the original cqr */
1621 cqr = default_erp;
1623 while (cqr->refers != NULL) {
1624 cqr = cqr->refers;
1627 if (scsw_is_tm(&cqr->irb.scsw)) {
1655 erp = dasd_alloc_erp_request((char *) &cqr->magic,
1669 oldccw = cqr->cpaddr;
1671 PFX_data = cqr->data;
1675 memcpy(DE_data, cqr->data, sizeof(struct DE_eckd_data));
1767 struct dasd_ccw_req *cqr;
1776 /* determine the original cqr */
1777 cqr = previous_erp;
1779 while (cqr->refers != NULL) {
1780 cqr = cqr->refers;
1783 if (scsw_is_tm(&cqr->irb.scsw)) {
2358 * the given cqr (or erp).
2359 * For a command mode cqr the erp is initialized as an default erp
2366 * cqr head of the current ERP-chain (or single cqr if
2371 static struct dasd_ccw_req *dasd_3990_erp_add_erp(struct dasd_ccw_req *cqr)
2374 struct dasd_device *device = cqr->startdev;
2381 if (cqr->cpmode == 1) {
2391 erp = dasd_alloc_erp_request((char *) &cqr->magic,
2394 if (cqr->retries <= 0) {
2397 cqr->status = DASD_CQR_FAILED;
2398 cqr->stopclk = get_tod_clock();
2403 cqr->retries);
2409 ccw = cqr->cpaddr;
2410 if (cqr->cpmode == 1) {
2416 *tcw = *((struct tcw *)cqr->cpaddr);
2420 erp->cpaddr = cqr->cpaddr;
2428 ccw->cda = (long)(cqr->cpaddr);
2431 erp->flags = cqr->flags;
2433 erp->refers = cqr;
2436 erp->block = cqr->block;
2437 erp->magic = cqr->magic;
2438 erp->expires = cqr->expires;
2455 * cqr head of the current ERP-chain (or single cqr if
2462 dasd_3990_erp_additional_erp(struct dasd_ccw_req * cqr)
2468 erp = dasd_3990_erp_add_erp(cqr);
2474 if (erp != cqr) {
2487 * Check if the device status of the given cqr is the same.
2494 * cqr1 first cqr, which will be compared with the
2495 * cqr2 second cqr.
2541 * quick exit if current cqr is not an ERP (cqr->refers=NULL)
2544 * cqr failed cqr (either original cqr or already an erp)
2552 dasd_3990_erp_in_erp(struct dasd_ccw_req *cqr)
2555 struct dasd_ccw_req *erp_head = cqr, /* save erp chain head */
2559 if (cqr->refers == NULL) { /* return if not in erp */
2563 /* check the erp/cqr chain for current error */
2565 match = dasd_3990_erp_error_match(erp_head, cqr->refers);
2566 erp_match = cqr; /* save possible matching erp */
2567 cqr = cqr->refers; /* check next erp/cqr in queue */
2569 } while ((cqr->refers != NULL) && (!match));
2762 * cqr failed cqr (either original cqr or already an erp)
2767 * - either a ptr to an additional ERP cqr or
2768 * - the original given cqr (which's status might
2772 dasd_3990_erp_action(struct dasd_ccw_req * cqr)
2775 struct dasd_device *device = cqr->startdev;
2782 for (temp_erp = cqr;
2792 /* double-check if current erp/cqr was successful */
2793 if ((scsw_cstat(&cqr->irb.scsw) == 0x00) &&
2794 (scsw_dstat(&cqr->irb.scsw) ==
2799 " - NO ERP necessary", cqr);
2801 cqr->status = DASD_CQR_DONE;
2803 return cqr;
2807 erp = dasd_3990_erp_in_erp(cqr);
2811 erp = dasd_3990_erp_additional_erp(cqr);
2816 erp = dasd_3990_erp_handle_match_erp(cqr, erp);
2825 if (test_bit(DASD_CQR_VERIFY_PATH, &erp->flags) && cqr->lpm) {
2826 erp->lpm = cqr->lpm;
2845 cqr->status = DASD_CQR_IN_ERP;
2846 /* add erp request before the cqr */
2847 list_add_tail(&erp->blocklist, &cqr->blocklist);