Lines Matching refs:ehc

333 	struct ata_eh_context *ehc = &dev->link->eh_context;  in ata_internal_cmd_timeout()  local
340 idx = ehc->cmd_timeout_idx[dev->devno][ent]; in ata_internal_cmd_timeout()
358 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_internal_cmd_timed_out() local
365 idx = ehc->cmd_timeout_idx[dev->devno][ent]; in ata_internal_cmd_timed_out()
367 ehc->cmd_timeout_idx[dev->devno][ent]++; in ata_internal_cmd_timed_out()
429 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_dev_action() local
431 return ehc->i.action | ehc->i.dev_action[dev->devno]; in ata_eh_dev_action()
677 struct ata_eh_context *ehc = &link->eh_context; in ata_scsi_port_error_handler() local
687 ehc->saved_xfer_mode[devno] = dev->xfer_mode; in ata_scsi_port_error_handler()
689 ehc->saved_ncq_enabled |= 1 << devno; in ata_scsi_port_error_handler()
1241 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_detach_dev() local
1258 ehc->saved_xfer_mode[dev->devno] = 0; in ata_eh_detach_dev()
1259 ehc->saved_ncq_enabled &= ~(1 << dev->devno); in ata_eh_detach_dev()
1282 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_about_to_do() local
1294 if (!(ehc->i.flags & ATA_EHI_QUIET) && link != ap->slave_link) in ata_eh_about_to_do()
1315 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_done() local
1319 ata_eh_clear_action(link, dev, &ehc->i, action); in ata_eh_done()
1502 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_analyze_serror() local
1503 u32 serror = ehc->i.serror; in ata_eh_analyze_serror()
1533 ata_ehi_hotplugged(&ehc->i); in ata_eh_analyze_serror()
1535 ehc->i.err_mask |= err_mask; in ata_eh_analyze_serror()
1536 ehc->i.action |= action; in ata_eh_analyze_serror()
1916 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_link_autopsy() local
1924 if (ehc->i.flags & ATA_EHI_NO_AUTOPSY) in ata_eh_link_autopsy()
1930 ehc->i.serror |= serror; in ata_eh_link_autopsy()
1934 ehc->i.probe_mask |= ATA_ALL_DEVICES; in ata_eh_link_autopsy()
1935 ehc->i.action |= ATA_EH_RESET; in ata_eh_link_autopsy()
1936 ehc->i.err_mask |= AC_ERR_OTHER; in ata_eh_link_autopsy()
1943 if (ehc->i.err_mask & ~AC_ERR_OTHER) in ata_eh_link_autopsy()
1944 ehc->i.err_mask &= ~AC_ERR_OTHER; in ata_eh_link_autopsy()
1946 all_err_mask |= ehc->i.err_mask; in ata_eh_link_autopsy()
1954 qc->err_mask |= ehc->i.err_mask; in ata_eh_link_autopsy()
1957 ehc->i.action |= ata_eh_analyze_tf(qc); in ata_eh_link_autopsy()
1981 ehc->i.dev = qc->dev; in ata_eh_link_autopsy()
1995 ehc->i.flags |= ATA_EHI_QUIET; in ata_eh_link_autopsy()
2000 ehc->i.action |= ATA_EH_RESET; in ata_eh_link_autopsy()
2003 ehc->i.action |= ATA_EH_REVALIDATE; in ata_eh_link_autopsy()
2008 if (ehc->i.dev) { in ata_eh_link_autopsy()
2009 ehc->i.dev_action[ehc->i.dev->devno] |= in ata_eh_link_autopsy()
2010 ehc->i.action & ATA_EH_PERDEV_MASK; in ata_eh_link_autopsy()
2011 ehc->i.action &= ~ATA_EH_PERDEV_MASK; in ata_eh_link_autopsy()
2019 dev = ehc->i.dev; in ata_eh_link_autopsy()
2027 ehc->i.action |= ata_eh_speed_down(dev, eflags, all_err_mask); in ata_eh_link_autopsy()
2028 trace_ata_eh_link_autopsy(dev, ehc->i.action, all_err_mask); in ata_eh_link_autopsy()
2212 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_link_report() local
2218 if (ehc->i.flags & ATA_EHI_QUIET) in ata_eh_link_report()
2222 if (ehc->i.desc[0] != '\0') in ata_eh_link_report()
2223 desc = ehc->i.desc; in ata_eh_link_report()
2237 if (!nr_failed && !ehc->i.err_mask) in ata_eh_link_report()
2248 if (ehc->i.dev) { in ata_eh_link_report()
2249 ata_dev_err(ehc->i.dev, "exception Emask 0x%x " in ata_eh_link_report()
2251 ehc->i.err_mask, link->sactive, ehc->i.serror, in ata_eh_link_report()
2252 ehc->i.action, frozen, tries_buf); in ata_eh_link_report()
2254 ata_dev_err(ehc->i.dev, "%s\n", desc); in ata_eh_link_report()
2258 ehc->i.err_mask, link->sactive, ehc->i.serror, in ata_eh_link_report()
2259 ehc->i.action, frozen, tries_buf); in ata_eh_link_report()
2265 if (ehc->i.serror) in ata_eh_link_report()
2268 ehc->i.serror & SERR_DATA_RECOVERED ? "RecovData " : "", in ata_eh_link_report()
2269 ehc->i.serror & SERR_COMM_RECOVERED ? "RecovComm " : "", in ata_eh_link_report()
2270 ehc->i.serror & SERR_DATA ? "UnrecovData " : "", in ata_eh_link_report()
2271 ehc->i.serror & SERR_PERSISTENT ? "Persist " : "", in ata_eh_link_report()
2272 ehc->i.serror & SERR_PROTOCOL ? "Proto " : "", in ata_eh_link_report()
2273 ehc->i.serror & SERR_INTERNAL ? "HostInt " : "", in ata_eh_link_report()
2274 ehc->i.serror & SERR_PHYRDY_CHG ? "PHYRdyChg " : "", in ata_eh_link_report()
2275 ehc->i.serror & SERR_PHY_INT_ERR ? "PHYInt " : "", in ata_eh_link_report()
2276 ehc->i.serror & SERR_COMM_WAKE ? "CommWake " : "", in ata_eh_link_report()
2277 ehc->i.serror & SERR_10B_8B_ERR ? "10B8B " : "", in ata_eh_link_report()
2278 ehc->i.serror & SERR_DISPARITY ? "Dispar " : "", in ata_eh_link_report()
2279 ehc->i.serror & SERR_CRC ? "BadCRC " : "", in ata_eh_link_report()
2280 ehc->i.serror & SERR_HANDSHAKE ? "Handshk " : "", in ata_eh_link_report()
2281 ehc->i.serror & SERR_LINK_SEQ_ERR ? "LinkSeq " : "", in ata_eh_link_report()
2282 ehc->i.serror & SERR_TRANS_ST_ERROR ? "TrStaTrns " : "", in ata_eh_link_report()
2283 ehc->i.serror & SERR_UNRECOG_FIS ? "UnrecFIS " : "", in ata_eh_link_report()
2284 ehc->i.serror & SERR_DEV_XCHG ? "DevExch " : ""); in ata_eh_link_report()
2442 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_reset() local
2444 unsigned int *classes = ehc->classes; in ata_eh_reset()
2446 int verbose = !(ehc->i.flags & ATA_EHI_QUIET); in ata_eh_reset()
2469 if (ehc->i.flags & ATA_EHI_DID_RESET) { in ata_eh_reset()
2471 WARN_ON(time_after(ehc->last_reset, now)); in ata_eh_reset()
2472 deadline = ata_deadline(ehc->last_reset, in ata_eh_reset()
2506 ehc->i.action &= ~ATA_EH_RESET; in ata_eh_reset()
2509 ehc->i.action |= ATA_EH_HARDRESET; in ata_eh_reset()
2512 ehc->i.action |= ATA_EH_SOFTRESET; in ata_eh_reset()
2521 sehc->i.action |= ehc->i.action; in ata_eh_reset()
2537 ehc->i.action |= sehc->i.action; in ata_eh_reset()
2543 ehc->i.action &= ~ATA_EH_RESET; in ata_eh_reset()
2559 if (reset && !(ehc->i.action & ATA_EH_RESET)) { in ata_eh_reset()
2585 ehc->last_reset = jiffies; in ata_eh_reset()
2587 ehc->i.flags |= ATA_EHI_DID_HARDRESET; in ata_eh_reset()
2590 ehc->i.flags |= ATA_EHI_DID_SOFTRESET; in ata_eh_reset()
2771 ehc->last_reset = jiffies; /* update to completion time */ in ata_eh_reset()
2772 ehc->i.action |= ATA_EH_REVALIDATE; in ata_eh_reset()
2778 ehc->i.flags &= ~ATA_EHI_HOTPLUGGED; in ata_eh_reset()
2890 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_park_issue_cmd() local
2896 ehc->unloaded_mask |= 1 << dev->devno; in ata_eh_park_issue_cmd()
2903 ehc->unloaded_mask &= ~(1 << dev->devno); in ata_eh_park_issue_cmd()
2912 ehc->unloaded_mask &= ~(1 << dev->devno); in ata_eh_park_issue_cmd()
2920 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_revalidate_and_attach() local
2934 if (ehc->i.flags & ATA_EHI_DID_RESET) in ata_eh_revalidate_and_attach()
2963 rc = ata_dev_revalidate(dev, ehc->classes[dev->devno], in ata_eh_revalidate_and_attach()
2973 ehc->i.flags |= ATA_EHI_SETMODE; in ata_eh_revalidate_and_attach()
2978 ehc->tries[dev->devno] && in ata_eh_revalidate_and_attach()
2979 ata_class_enabled(ehc->classes[dev->devno])) { in ata_eh_revalidate_and_attach()
2986 dev->class = ehc->classes[dev->devno]; in ata_eh_revalidate_and_attach()
2995 ehc->classes[dev->devno] = dev->class; in ata_eh_revalidate_and_attach()
3018 if ((ehc->i.flags & ATA_EHI_DID_RESET) && ata_is_host_link(link)) { in ata_eh_revalidate_and_attach()
3031 dev->class = ehc->classes[dev->devno]; in ata_eh_revalidate_and_attach()
3036 ehc->i.flags |= ATA_EHI_PRINTINFO; in ata_eh_revalidate_and_attach()
3038 ehc->i.flags &= ~ATA_EHI_PRINTINFO; in ata_eh_revalidate_and_attach()
3049 ehc->i.flags |= ATA_EHI_SETMODE; in ata_eh_revalidate_and_attach()
3099 struct ata_eh_context *ehc = &link->eh_context; in ata_set_mode() local
3100 u8 saved_xfer_mode = ehc->saved_xfer_mode[dev->devno]; in ata_set_mode()
3101 u8 saved_ncq = !!(ehc->saved_ncq_enabled & (1 << dev->devno)); in ata_set_mode()
3256 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_set_lpm() local
3360 if (!dev || ehc->tries[dev->devno] <= 2) { in ata_eh_set_lpm()
3393 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_skip_recovery() local
3401 if (ehc->i.flags & ATA_EHI_NO_RECOVERY) in ata_eh_skip_recovery()
3409 if ((ehc->i.action & ATA_EH_RESET) && in ata_eh_skip_recovery()
3410 !(ehc->i.flags & ATA_EHI_DID_RESET)) in ata_eh_skip_recovery()
3416 ehc->classes[dev->devno] != ATA_DEV_NONE) in ata_eh_skip_recovery()
3439 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_schedule_probe() local
3443 if (!(ehc->i.probe_mask & (1 << dev->devno)) || in ata_eh_schedule_probe()
3444 (ehc->did_probe_mask & (1 << dev->devno))) in ata_eh_schedule_probe()
3449 ehc->did_probe_mask |= (1 << dev->devno); in ata_eh_schedule_probe()
3450 ehc->i.action |= ATA_EH_RESET; in ata_eh_schedule_probe()
3451 ehc->saved_xfer_mode[dev->devno] = 0; in ata_eh_schedule_probe()
3452 ehc->saved_ncq_enabled &= ~(1 << dev->devno); in ata_eh_schedule_probe()
3488 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_handle_dev_fail() local
3494 ehc->tries[dev->devno]--; in ata_eh_handle_dev_fail()
3499 ehc->i.probe_mask |= (1 << dev->devno); in ata_eh_handle_dev_fail()
3503 ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1); in ata_eh_handle_dev_fail()
3506 if (ehc->tries[dev->devno] == 1) { in ata_eh_handle_dev_fail()
3516 if (ata_dev_enabled(dev) && !ehc->tries[dev->devno]) { in ata_eh_handle_dev_fail()
3526 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; in ata_eh_handle_dev_fail()
3527 memset(ehc->cmd_timeout_idx[dev->devno], 0, in ata_eh_handle_dev_fail()
3528 sizeof(ehc->cmd_timeout_idx[dev->devno])); in ata_eh_handle_dev_fail()
3533 ehc->i.action |= ATA_EH_RESET; in ata_eh_handle_dev_fail()
3572 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3575 if (ehc->i.action & ATA_EH_ENABLE_LINK) { in ata_eh_recover()
3585 ehc->tries[dev->devno] = 1; in ata_eh_recover()
3587 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; in ata_eh_recover()
3590 ehc->i.action |= ehc->i.dev_action[dev->devno] & in ata_eh_recover()
3592 ehc->i.dev_action[dev->devno] &= ATA_EH_PERDEV_MASK; in ata_eh_recover()
3613 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3617 ehc->i.action = 0; in ata_eh_recover()
3620 ehc->classes[dev->devno] = ATA_DEV_UNKNOWN; in ata_eh_recover()
3625 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3627 if (!(ehc->i.action & ATA_EH_RESET)) in ata_eh_recover()
3650 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3656 if (!(ehc->i.dev_action[dev->devno] & in ata_eh_recover()
3664 if (ehc->unloaded_mask & (1 << dev->devno)) in ata_eh_recover()
3694 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3706 ehc->i.action = 0; in ata_eh_recover()
3711 if (ehc->i.flags & ATA_EHI_SETMODE) { in ata_eh_recover()
3715 ehc->i.flags &= ~ATA_EHI_SETMODE; in ata_eh_recover()
3721 if (ehc->i.flags & ATA_EHI_DID_RESET) { in ata_eh_recover()
3752 ehc->i.flags = 0; in ata_eh_recover()