Lines Matching refs:ehc

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