Lines Matching refs:ehc
129 * ehc->cmd_timeout_idx keeps track of which timeout to use per
331 struct ata_eh_context *ehc = &dev->link->eh_context;
338 idx = ehc->cmd_timeout_idx[dev->devno][ent];
356 struct ata_eh_context *ehc = &dev->link->eh_context;
363 idx = ehc->cmd_timeout_idx[dev->devno][ent];
365 ehc->cmd_timeout_idx[dev->devno][ent]++;
427 struct ata_eh_context *ehc = &dev->link->eh_context;
429 return ehc->i.action | ehc->i.dev_action[dev->devno];
678 struct ata_eh_context *ehc = &link->eh_context;
688 ehc->saved_xfer_mode[devno] = dev->xfer_mode;
690 ehc->saved_ncq_enabled |= 1 << devno;
1246 struct ata_eh_context *ehc = &link->eh_context;
1263 ehc->saved_xfer_mode[dev->devno] = 0;
1264 ehc->saved_ncq_enabled &= ~(1 << dev->devno);
1287 struct ata_eh_context *ehc = &link->eh_context;
1297 if (!(ehc->i.flags & ATA_EHI_QUIET) && link != ap->slave_link)
1318 struct ata_eh_context *ehc = &link->eh_context;
1320 ata_eh_clear_action(link, dev, &ehc->i, action);
1508 struct ata_eh_context *ehc = &link->eh_context;
1509 u32 serror = ehc->i.serror;
1539 ata_ehi_hotplugged(&ehc->i);
1541 ehc->i.err_mask |= err_mask;
1542 ehc->i.action |= action;
1924 struct ata_eh_context *ehc = &link->eh_context;
1934 if (ehc->i.flags & ATA_EHI_NO_AUTOPSY)
1940 ehc->i.serror |= serror;
1944 ehc->i.probe_mask |= ATA_ALL_DEVICES;
1945 ehc->i.action |= ATA_EH_RESET;
1946 ehc->i.err_mask |= AC_ERR_OTHER;
1953 if (ehc->i.err_mask & ~AC_ERR_OTHER)
1954 ehc->i.err_mask &= ~AC_ERR_OTHER;
1956 all_err_mask |= ehc->i.err_mask;
1964 qc->err_mask |= ehc->i.err_mask;
1967 ehc->i.action |= ata_eh_analyze_tf(qc, &qc->result_tf);
1991 ehc->i.dev = qc->dev;
2005 ehc->i.flags |= ATA_EHI_QUIET;
2010 ehc->i.action |= ATA_EH_RESET;
2013 ehc->i.action |= ATA_EH_REVALIDATE;
2018 if (ehc->i.dev) {
2019 ehc->i.dev_action[ehc->i.dev->devno] |=
2020 ehc->i.action & ATA_EH_PERDEV_MASK;
2021 ehc->i.action &= ~ATA_EH_PERDEV_MASK;
2029 dev = ehc->i.dev;
2037 ehc->i.action |= ata_eh_speed_down(dev, eflags, all_err_mask);
2038 trace_ata_eh_link_autopsy(dev, ehc->i.action, all_err_mask);
2224 struct ata_eh_context *ehc = &link->eh_context;
2230 if (ehc->i.flags & ATA_EHI_QUIET)
2234 if (ehc->i.desc[0] != '\0')
2235 desc = ehc->i.desc;
2249 if (!nr_failed && !ehc->i.err_mask)
2260 if (ehc->i.dev) {
2261 ata_dev_err(ehc->i.dev, "exception Emask 0x%x "
2263 ehc->i.err_mask, link->sactive, ehc->i.serror,
2264 ehc->i.action, frozen, tries_buf);
2266 ata_dev_err(ehc->i.dev, "%s\n", desc);
2270 ehc->i.err_mask, link->sactive, ehc->i.serror,
2271 ehc->i.action, frozen, tries_buf);
2277 if (ehc->i.serror)
2280 ehc->i.serror & SERR_DATA_RECOVERED ? "RecovData " : "",
2281 ehc->i.serror & SERR_COMM_RECOVERED ? "RecovComm " : "",
2282 ehc->i.serror & SERR_DATA ? "UnrecovData " : "",
2283 ehc->i.serror & SERR_PERSISTENT ? "Persist " : "",
2284 ehc->i.serror & SERR_PROTOCOL ? "Proto " : "",
2285 ehc->i.serror & SERR_INTERNAL ? "HostInt " : "",
2286 ehc->i.serror & SERR_PHYRDY_CHG ? "PHYRdyChg " : "",
2287 ehc->i.serror & SERR_PHY_INT_ERR ? "PHYInt " : "",
2288 ehc->i.serror & SERR_COMM_WAKE ? "CommWake " : "",
2289 ehc->i.serror & SERR_10B_8B_ERR ? "10B8B " : "",
2290 ehc->i.serror & SERR_DISPARITY ? "Dispar " : "",
2291 ehc->i.serror & SERR_CRC ? "BadCRC " : "",
2292 ehc->i.serror & SERR_HANDSHAKE ? "Handshk " : "",
2293 ehc->i.serror & SERR_LINK_SEQ_ERR ? "LinkSeq " : "",
2294 ehc->i.serror & SERR_TRANS_ST_ERROR ? "TrStaTrns " : "",
2295 ehc->i.serror & SERR_UNRECOG_FIS ? "UnrecFIS " : "",
2296 ehc->i.serror & SERR_DEV_XCHG ? "DevExch " : "");
2457 struct ata_eh_context *ehc = &link->eh_context;
2459 unsigned int *classes = ehc->classes;
2461 int verbose = !(ehc->i.flags & ATA_EHI_QUIET);
2484 if (ehc->i.flags & ATA_EHI_DID_RESET) {
2486 WARN_ON(time_after(ehc->last_reset, now));
2487 deadline = ata_deadline(ehc->last_reset,
2521 ehc->i.action &= ~ATA_EH_RESET;
2524 ehc->i.action |= ATA_EH_HARDRESET;
2527 ehc->i.action |= ATA_EH_SOFTRESET;
2536 sehc->i.action |= ehc->i.action;
2552 ehc->i.action |= sehc->i.action;
2558 ehc->i.action &= ~ATA_EH_RESET;
2574 if (reset && !(ehc->i.action & ATA_EH_RESET)) {
2600 ehc->last_reset = jiffies;
2602 ehc->i.flags |= ATA_EHI_DID_HARDRESET;
2604 ehc->i.flags |= ATA_EHI_DID_SOFTRESET;
2763 ehc->last_reset = jiffies; /* update to completion time */
2764 ehc->i.action |= ATA_EH_REVALIDATE;
2770 ehc->i.flags &= ~ATA_EHI_HOTPLUGGED;
2882 struct ata_eh_context *ehc = &dev->link->eh_context;
2888 ehc->unloaded_mask |= 1 << dev->devno;
2895 ehc->unloaded_mask &= ~(1 << dev->devno);
2904 ehc->unloaded_mask &= ~(1 << dev->devno);
2912 struct ata_eh_context *ehc = &link->eh_context;
2928 if (ehc->i.flags & ATA_EHI_DID_RESET)
2940 rc = ata_dev_revalidate(dev, ehc->classes[dev->devno],
2950 ehc->i.flags |= ATA_EHI_SETMODE;
2955 ehc->tries[dev->devno] &&
2956 ata_class_enabled(ehc->classes[dev->devno])) {
2963 dev->class = ehc->classes[dev->devno];
2972 ehc->classes[dev->devno] = dev->class;
2995 if ((ehc->i.flags & ATA_EHI_DID_RESET) && ata_is_host_link(link)) {
3008 dev->class = ehc->classes[dev->devno];
3013 ehc->i.flags |= ATA_EHI_PRINTINFO;
3015 ehc->i.flags &= ~ATA_EHI_PRINTINFO;
3026 ehc->i.flags |= ATA_EHI_SETMODE;
3077 struct ata_eh_context *ehc = &link->eh_context;
3078 u8 saved_xfer_mode = ehc->saved_xfer_mode[dev->devno];
3079 u8 saved_ncq = !!(ehc->saved_ncq_enabled & (1 << dev->devno));
3234 struct ata_eh_context *ehc = &link->eh_context;
3338 if (!dev || ehc->tries[dev->devno] <= 2) {
3371 struct ata_eh_context *ehc = &link->eh_context;
3379 if (ehc->i.flags & ATA_EHI_NO_RECOVERY)
3387 if ((ehc->i.action & ATA_EH_RESET) &&
3388 !(ehc->i.flags & ATA_EHI_DID_RESET))
3394 ehc->classes[dev->devno] != ATA_DEV_NONE)
3417 struct ata_eh_context *ehc = &dev->link->eh_context;
3421 if (!(ehc->i.probe_mask & (1 << dev->devno)) ||
3422 (ehc->did_probe_mask & (1 << dev->devno)))
3427 ehc->did_probe_mask |= (1 << dev->devno);
3428 ehc->i.action |= ATA_EH_RESET;
3429 ehc->saved_xfer_mode[dev->devno] = 0;
3430 ehc->saved_ncq_enabled &= ~(1 << dev->devno);
3466 struct ata_eh_context *ehc = &dev->link->eh_context;
3472 ehc->tries[dev->devno]--;
3477 ehc->i.probe_mask |= (1 << dev->devno);
3481 ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1);
3484 if (ehc->tries[dev->devno] == 1) {
3494 if (ata_dev_enabled(dev) && !ehc->tries[dev->devno]) {
3504 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES;
3505 memset(ehc->cmd_timeout_idx[dev->devno], 0,
3506 sizeof(ehc->cmd_timeout_idx[dev->devno]));
3511 ehc->i.action |= ATA_EH_RESET;
3552 struct ata_eh_context *ehc = &link->eh_context;
3555 if (ehc->i.action & ATA_EH_ENABLE_LINK) {
3565 ehc->tries[dev->devno] = 1;
3567 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES;
3570 ehc->i.action |= ehc->i.dev_action[dev->devno] &
3572 ehc->i.dev_action[dev->devno] &= ATA_EH_PERDEV_MASK;
3593 struct ata_eh_context *ehc = &link->eh_context;
3597 ehc->i.action = 0;
3600 ehc->classes[dev->devno] = ATA_DEV_UNKNOWN;
3605 struct ata_eh_context *ehc = &link->eh_context;
3607 if (!(ehc->i.action & ATA_EH_RESET))
3630 struct ata_eh_context *ehc = &link->eh_context;
3636 if (!(ehc->i.dev_action[dev->devno] &
3644 if (ehc->unloaded_mask & (1 << dev->devno))
3674 struct ata_eh_context *ehc = &link->eh_context;
3686 ehc->i.action = 0;
3691 if (ehc->i.flags & ATA_EHI_SETMODE) {
3695 ehc->i.flags &= ~ATA_EHI_SETMODE;
3701 if (ehc->i.flags & ATA_EHI_DID_RESET) {
3732 ehc->i.flags = 0;