Lines Matching refs:ehc

129  * ehc->cmd_timeout_idx keeps track of which timeout to use per
335 struct ata_eh_context *ehc = &dev->link->eh_context;
342 idx = ehc->cmd_timeout_idx[dev->devno][ent];
360 struct ata_eh_context *ehc = &dev->link->eh_context;
367 idx = ehc->cmd_timeout_idx[dev->devno][ent];
369 ehc->cmd_timeout_idx[dev->devno][ent]++;
431 struct ata_eh_context *ehc = &dev->link->eh_context;
433 return ehc->i.action | ehc->i.dev_action[dev->devno];
688 struct ata_eh_context *ehc = &link->eh_context;
698 ehc->saved_xfer_mode[devno] = dev->xfer_mode;
700 ehc->saved_ncq_enabled |= 1 << devno;
704 ehc->i.dev_action[devno] |= ATA_EH_SET_ACTIVE;
1238 struct ata_eh_context *ehc = &link->eh_context;
1262 ehc->saved_xfer_mode[dev->devno] = 0;
1263 ehc->saved_ncq_enabled &= ~(1 << dev->devno);
1286 struct ata_eh_context *ehc = &link->eh_context;
1298 if (!(ehc->i.flags & ATA_EHI_QUIET) && link != ap->slave_link)
1319 struct ata_eh_context *ehc = &link->eh_context;
1323 ata_eh_clear_action(link, dev, &ehc->i, action);
1514 struct ata_eh_context *ehc = &link->eh_context;
1515 u32 serror = ehc->i.serror;
1545 ata_ehi_hotplugged(&ehc->i);
1547 ehc->i.err_mask |= err_mask;
1548 ehc->i.action |= action;
1948 struct ata_eh_context *ehc = &link->eh_context;
1954 if (!(ehc->i.dev_action[dev->devno] & ATA_EH_GET_SUCCESS_SENSE))
2026 struct ata_eh_context *ehc = &link->eh_context;
2034 if (ehc->i.flags & ATA_EHI_NO_AUTOPSY)
2040 ehc->i.serror |= serror;
2044 ehc->i.probe_mask |= ATA_ALL_DEVICES;
2045 ehc->i.action |= ATA_EH_RESET;
2046 ehc->i.err_mask |= AC_ERR_OTHER;
2061 if (ehc->i.err_mask & ~AC_ERR_OTHER)
2062 ehc->i.err_mask &= ~AC_ERR_OTHER;
2064 all_err_mask |= ehc->i.err_mask;
2074 qc->err_mask |= ehc->i.err_mask;
2077 ehc->i.action |= ata_eh_analyze_tf(qc);
2101 ehc->i.dev = qc->dev;
2115 ehc->i.flags |= ATA_EHI_QUIET;
2120 ehc->i.action |= ATA_EH_RESET;
2123 ehc->i.action |= ATA_EH_REVALIDATE;
2128 if (ehc->i.dev) {
2129 ehc->i.dev_action[ehc->i.dev->devno] |=
2130 ehc->i.action & ATA_EH_PERDEV_MASK;
2131 ehc->i.action &= ~ATA_EH_PERDEV_MASK;
2139 dev = ehc->i.dev;
2147 ehc->i.action |= ata_eh_speed_down(dev, eflags, all_err_mask);
2148 trace_ata_eh_link_autopsy(dev, ehc->i.action, all_err_mask);
2332 struct ata_eh_context *ehc = &link->eh_context;
2338 if (ehc->i.flags & ATA_EHI_QUIET)
2342 if (ehc->i.desc[0] != '\0')
2343 desc = ehc->i.desc;
2357 if (!nr_failed && !ehc->i.err_mask)
2368 if (ehc->i.dev) {
2369 ata_dev_err(ehc->i.dev, "exception Emask 0x%x "
2371 ehc->i.err_mask, link->sactive, ehc->i.serror,
2372 ehc->i.action, frozen, tries_buf);
2374 ata_dev_err(ehc->i.dev, "%s\n", desc);
2378 ehc->i.err_mask, link->sactive, ehc->i.serror,
2379 ehc->i.action, frozen, tries_buf);
2385 if (ehc->i.serror)
2388 ehc->i.serror & SERR_DATA_RECOVERED ? "RecovData " : "",
2389 ehc->i.serror & SERR_COMM_RECOVERED ? "RecovComm " : "",
2390 ehc->i.serror & SERR_DATA ? "UnrecovData " : "",
2391 ehc->i.serror & SERR_PERSISTENT ? "Persist " : "",
2392 ehc->i.serror & SERR_PROTOCOL ? "Proto " : "",
2393 ehc->i.serror & SERR_INTERNAL ? "HostInt " : "",
2394 ehc->i.serror & SERR_PHYRDY_CHG ? "PHYRdyChg " : "",
2395 ehc->i.serror & SERR_PHY_INT_ERR ? "PHYInt " : "",
2396 ehc->i.serror & SERR_COMM_WAKE ? "CommWake " : "",
2397 ehc->i.serror & SERR_10B_8B_ERR ? "10B8B " : "",
2398 ehc->i.serror & SERR_DISPARITY ? "Dispar " : "",
2399 ehc->i.serror & SERR_CRC ? "BadCRC " : "",
2400 ehc->i.serror & SERR_HANDSHAKE ? "Handshk " : "",
2401 ehc->i.serror & SERR_LINK_SEQ_ERR ? "LinkSeq " : "",
2402 ehc->i.serror & SERR_TRANS_ST_ERROR ? "TrStaTrns " : "",
2403 ehc->i.serror & SERR_UNRECOG_FIS ? "UnrecFIS " : "",
2404 ehc->i.serror & SERR_DEV_XCHG ? "DevExch " : "");
2562 struct ata_eh_context *ehc = &link->eh_context;
2564 unsigned int *classes = ehc->classes;
2566 int verbose = !(ehc->i.flags & ATA_EHI_QUIET);
2589 if (ehc->i.flags & ATA_EHI_DID_RESET) {
2591 WARN_ON(time_after(ehc->last_reset, now));
2592 deadline = ata_deadline(ehc->last_reset,
2626 ehc->i.action &= ~ATA_EH_RESET;
2629 ehc->i.action |= ATA_EH_HARDRESET;
2632 ehc->i.action |= ATA_EH_SOFTRESET;
2641 sehc->i.action |= ehc->i.action;
2657 ehc->i.action |= sehc->i.action;
2663 ehc->i.action &= ~ATA_EH_RESET;
2679 if (reset && !(ehc->i.action & ATA_EH_RESET)) {
2704 ehc->last_reset = jiffies;
2706 ehc->i.flags |= ATA_EHI_DID_HARDRESET;
2709 ehc->i.flags |= ATA_EHI_DID_SOFTRESET;
2880 ehc->last_reset = jiffies; /* update to completion time */
2881 ehc->i.action |= ATA_EH_REVALIDATE;
2887 ehc->i.flags &= ~ATA_EHI_HOTPLUGGED;
2999 struct ata_eh_context *ehc = &dev->link->eh_context;
3005 ehc->unloaded_mask |= 1 << dev->devno;
3012 ehc->unloaded_mask &= ~(1 << dev->devno);
3021 ehc->unloaded_mask &= ~(1 << dev->devno);
3029 struct ata_eh_context *ehc = &link->eh_context;
3043 if (ehc->i.flags & ATA_EHI_DID_RESET)
3081 rc = ata_dev_revalidate(dev, ehc->classes[dev->devno],
3091 ehc->i.flags |= ATA_EHI_SETMODE;
3096 ehc->tries[dev->devno] &&
3097 ata_class_enabled(ehc->classes[dev->devno])) {
3104 dev->class = ehc->classes[dev->devno];
3113 ehc->classes[dev->devno] = dev->class;
3136 if ((ehc->i.flags & ATA_EHI_DID_RESET) && ata_is_host_link(link)) {
3149 dev->class = ehc->classes[dev->devno];
3154 ehc->i.flags |= ATA_EHI_PRINTINFO;
3156 ehc->i.flags &= ~ATA_EHI_PRINTINFO;
3167 ehc->i.flags |= ATA_EHI_SETMODE;
3217 struct ata_eh_context *ehc = &link->eh_context;
3218 u8 saved_xfer_mode = ehc->saved_xfer_mode[dev->devno];
3219 u8 saved_ncq = !!(ehc->saved_ncq_enabled & (1 << dev->devno));
3374 struct ata_eh_context *ehc = &link->eh_context;
3478 if (!dev || ehc->tries[dev->devno] <= 2) {
3511 struct ata_eh_context *ehc = &link->eh_context;
3519 if (ehc->i.flags & ATA_EHI_NO_RECOVERY)
3527 if ((ehc->i.action & ATA_EH_RESET) &&
3528 !(ehc->i.flags & ATA_EHI_DID_RESET))
3534 ehc->classes[dev->devno] != ATA_DEV_NONE)
3557 struct ata_eh_context *ehc = &dev->link->eh_context;
3561 if (!(ehc->i.probe_mask & (1 << dev->devno)) ||
3562 (ehc->did_probe_mask & (1 << dev->devno)))
3567 ehc->did_probe_mask |= (1 << dev->devno);
3568 ehc->i.action |= ATA_EH_RESET;
3569 ehc->saved_xfer_mode[dev->devno] = 0;
3570 ehc->saved_ncq_enabled &= ~(1 << dev->devno);
3606 struct ata_eh_context *ehc = &dev->link->eh_context;
3612 ehc->tries[dev->devno]--;
3617 ehc->i.probe_mask |= (1 << dev->devno);
3621 ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1);
3624 if (ehc->tries[dev->devno] == 1) {
3634 if (ata_dev_enabled(dev) && !ehc->tries[dev->devno]) {
3644 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES;
3645 memset(ehc->cmd_timeout_idx[dev->devno], 0,
3646 sizeof(ehc->cmd_timeout_idx[dev->devno]));
3651 ehc->i.action |= ATA_EH_RESET;
3690 struct ata_eh_context *ehc = &link->eh_context;
3693 if (ehc->i.action & ATA_EH_ENABLE_LINK) {
3703 ehc->tries[dev->devno] = 1;
3705 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES;
3708 ehc->i.action |= ehc->i.dev_action[dev->devno] &
3710 ehc->i.dev_action[dev->devno] &= ATA_EH_PERDEV_MASK;
3731 struct ata_eh_context *ehc = &link->eh_context;
3735 ehc->i.action = 0;
3738 ehc->classes[dev->devno] = ATA_DEV_UNKNOWN;
3743 struct ata_eh_context *ehc = &link->eh_context;
3745 if (!(ehc->i.action & ATA_EH_RESET))
3768 struct ata_eh_context *ehc = &link->eh_context;
3774 if (!(ehc->i.dev_action[dev->devno] &
3782 if (ehc->unloaded_mask & (1 << dev->devno))
3812 struct ata_eh_context *ehc = &link->eh_context;
3824 ehc->i.action = 0;
3829 if (ehc->i.flags & ATA_EHI_SETMODE) {
3833 ehc->i.flags &= ~ATA_EHI_SETMODE;
3839 if (ehc->i.flags & ATA_EHI_DID_RESET) {
3870 ehc->i.flags = 0;