Lines Matching refs:ehc

324 	struct ata_eh_context *ehc = &dev->link->eh_context;  in ata_internal_cmd_timeout()  local
331 idx = ehc->cmd_timeout_idx[dev->devno][ent]; in ata_internal_cmd_timeout()
349 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_internal_cmd_timed_out() local
356 idx = ehc->cmd_timeout_idx[dev->devno][ent]; in ata_internal_cmd_timed_out()
358 ehc->cmd_timeout_idx[dev->devno][ent]++; in ata_internal_cmd_timed_out()
420 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_dev_action() local
422 return ehc->i.action | ehc->i.dev_action[dev->devno]; in ata_eh_dev_action()
671 struct ata_eh_context *ehc = &link->eh_context; in ata_scsi_port_error_handler() local
681 ehc->saved_xfer_mode[devno] = dev->xfer_mode; in ata_scsi_port_error_handler()
683 ehc->saved_ncq_enabled |= 1 << devno; in ata_scsi_port_error_handler()
1306 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_detach_dev() local
1323 ehc->saved_xfer_mode[dev->devno] = 0; in ata_eh_detach_dev()
1324 ehc->saved_ncq_enabled &= ~(1 << dev->devno); in ata_eh_detach_dev()
1347 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_about_to_do() local
1357 if (!(ehc->i.flags & ATA_EHI_QUIET) && link != ap->slave_link) in ata_eh_about_to_do()
1378 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_done() local
1380 ata_eh_clear_action(link, dev, &ehc->i, action); in ata_eh_done()
1624 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_analyze_serror() local
1625 u32 serror = ehc->i.serror; in ata_eh_analyze_serror()
1655 ata_ehi_hotplugged(&ehc->i); in ata_eh_analyze_serror()
1657 ehc->i.err_mask |= err_mask; in ata_eh_analyze_serror()
1658 ehc->i.action |= action; in ata_eh_analyze_serror()
1676 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_analyze_ncq_error() local
1687 if (!link->sactive || !(ehc->i.err_mask & AC_ERR_DEV)) in ata_eh_analyze_ncq_error()
1732 ehc->i.err_mask &= ~AC_ERR_DEV; in ata_eh_analyze_ncq_error()
2114 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_link_autopsy() local
2124 if (ehc->i.flags & ATA_EHI_NO_AUTOPSY) in ata_eh_link_autopsy()
2130 ehc->i.serror |= serror; in ata_eh_link_autopsy()
2134 ehc->i.probe_mask |= ATA_ALL_DEVICES; in ata_eh_link_autopsy()
2135 ehc->i.action |= ATA_EH_RESET; in ata_eh_link_autopsy()
2136 ehc->i.err_mask |= AC_ERR_OTHER; in ata_eh_link_autopsy()
2143 if (ehc->i.err_mask & ~AC_ERR_OTHER) in ata_eh_link_autopsy()
2144 ehc->i.err_mask &= ~AC_ERR_OTHER; in ata_eh_link_autopsy()
2146 all_err_mask |= ehc->i.err_mask; in ata_eh_link_autopsy()
2154 qc->err_mask |= ehc->i.err_mask; in ata_eh_link_autopsy()
2157 ehc->i.action |= ata_eh_analyze_tf(qc, &qc->result_tf); in ata_eh_link_autopsy()
2181 ehc->i.dev = qc->dev; in ata_eh_link_autopsy()
2195 ehc->i.flags |= ATA_EHI_QUIET; in ata_eh_link_autopsy()
2200 ehc->i.action |= ATA_EH_RESET; in ata_eh_link_autopsy()
2203 ehc->i.action |= ATA_EH_REVALIDATE; in ata_eh_link_autopsy()
2208 if (ehc->i.dev) { in ata_eh_link_autopsy()
2209 ehc->i.dev_action[ehc->i.dev->devno] |= in ata_eh_link_autopsy()
2210 ehc->i.action & ATA_EH_PERDEV_MASK; in ata_eh_link_autopsy()
2211 ehc->i.action &= ~ATA_EH_PERDEV_MASK; in ata_eh_link_autopsy()
2219 dev = ehc->i.dev; in ata_eh_link_autopsy()
2227 ehc->i.action |= ata_eh_speed_down(dev, eflags, all_err_mask); in ata_eh_link_autopsy()
2228 trace_ata_eh_link_autopsy(dev, ehc->i.action, all_err_mask); in ata_eh_link_autopsy()
2413 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_link_report() local
2419 if (ehc->i.flags & ATA_EHI_QUIET) in ata_eh_link_report()
2423 if (ehc->i.desc[0] != '\0') in ata_eh_link_report()
2424 desc = ehc->i.desc; in ata_eh_link_report()
2438 if (!nr_failed && !ehc->i.err_mask) in ata_eh_link_report()
2449 if (ehc->i.dev) { in ata_eh_link_report()
2450 ata_dev_err(ehc->i.dev, "exception Emask 0x%x " in ata_eh_link_report()
2452 ehc->i.err_mask, link->sactive, ehc->i.serror, in ata_eh_link_report()
2453 ehc->i.action, frozen, tries_buf); in ata_eh_link_report()
2455 ata_dev_err(ehc->i.dev, "%s\n", desc); in ata_eh_link_report()
2459 ehc->i.err_mask, link->sactive, ehc->i.serror, in ata_eh_link_report()
2460 ehc->i.action, frozen, tries_buf); in ata_eh_link_report()
2466 if (ehc->i.serror) in ata_eh_link_report()
2469 ehc->i.serror & SERR_DATA_RECOVERED ? "RecovData " : "", in ata_eh_link_report()
2470 ehc->i.serror & SERR_COMM_RECOVERED ? "RecovComm " : "", in ata_eh_link_report()
2471 ehc->i.serror & SERR_DATA ? "UnrecovData " : "", in ata_eh_link_report()
2472 ehc->i.serror & SERR_PERSISTENT ? "Persist " : "", in ata_eh_link_report()
2473 ehc->i.serror & SERR_PROTOCOL ? "Proto " : "", in ata_eh_link_report()
2474 ehc->i.serror & SERR_INTERNAL ? "HostInt " : "", in ata_eh_link_report()
2475 ehc->i.serror & SERR_PHYRDY_CHG ? "PHYRdyChg " : "", in ata_eh_link_report()
2476 ehc->i.serror & SERR_PHY_INT_ERR ? "PHYInt " : "", in ata_eh_link_report()
2477 ehc->i.serror & SERR_COMM_WAKE ? "CommWake " : "", in ata_eh_link_report()
2478 ehc->i.serror & SERR_10B_8B_ERR ? "10B8B " : "", in ata_eh_link_report()
2479 ehc->i.serror & SERR_DISPARITY ? "Dispar " : "", in ata_eh_link_report()
2480 ehc->i.serror & SERR_CRC ? "BadCRC " : "", in ata_eh_link_report()
2481 ehc->i.serror & SERR_HANDSHAKE ? "Handshk " : "", in ata_eh_link_report()
2482 ehc->i.serror & SERR_LINK_SEQ_ERR ? "LinkSeq " : "", in ata_eh_link_report()
2483 ehc->i.serror & SERR_TRANS_ST_ERROR ? "TrStaTrns " : "", in ata_eh_link_report()
2484 ehc->i.serror & SERR_UNRECOG_FIS ? "UnrecFIS " : "", in ata_eh_link_report()
2485 ehc->i.serror & SERR_DEV_XCHG ? "DevExch " : ""); in ata_eh_link_report()
2646 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_reset() local
2648 unsigned int *classes = ehc->classes; in ata_eh_reset()
2650 int verbose = !(ehc->i.flags & ATA_EHI_QUIET); in ata_eh_reset()
2673 if (ehc->i.flags & ATA_EHI_DID_RESET) { in ata_eh_reset()
2675 WARN_ON(time_after(ehc->last_reset, now)); in ata_eh_reset()
2676 deadline = ata_deadline(ehc->last_reset, in ata_eh_reset()
2710 ehc->i.action &= ~ATA_EH_RESET; in ata_eh_reset()
2713 ehc->i.action |= ATA_EH_HARDRESET; in ata_eh_reset()
2716 ehc->i.action |= ATA_EH_SOFTRESET; in ata_eh_reset()
2725 sehc->i.action |= ehc->i.action; in ata_eh_reset()
2741 ehc->i.action |= sehc->i.action; in ata_eh_reset()
2747 ehc->i.action &= ~ATA_EH_RESET; in ata_eh_reset()
2763 if (reset && !(ehc->i.action & ATA_EH_RESET)) { in ata_eh_reset()
2789 ehc->last_reset = jiffies; in ata_eh_reset()
2791 ehc->i.flags |= ATA_EHI_DID_HARDRESET; in ata_eh_reset()
2793 ehc->i.flags |= ATA_EHI_DID_SOFTRESET; in ata_eh_reset()
2959 ehc->last_reset = jiffies; /* update to completion time */ in ata_eh_reset()
2960 ehc->i.action |= ATA_EH_REVALIDATE; in ata_eh_reset()
2966 ehc->i.flags &= ~ATA_EHI_HOTPLUGGED; in ata_eh_reset()
3078 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_park_issue_cmd() local
3084 ehc->unloaded_mask |= 1 << dev->devno; in ata_eh_park_issue_cmd()
3091 ehc->unloaded_mask &= ~(1 << dev->devno); in ata_eh_park_issue_cmd()
3100 ehc->unloaded_mask &= ~(1 << dev->devno); in ata_eh_park_issue_cmd()
3108 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_revalidate_and_attach() local
3124 if (ehc->i.flags & ATA_EHI_DID_RESET) in ata_eh_revalidate_and_attach()
3136 rc = ata_dev_revalidate(dev, ehc->classes[dev->devno], in ata_eh_revalidate_and_attach()
3146 ehc->i.flags |= ATA_EHI_SETMODE; in ata_eh_revalidate_and_attach()
3151 ehc->tries[dev->devno] && in ata_eh_revalidate_and_attach()
3152 ata_class_enabled(ehc->classes[dev->devno])) { in ata_eh_revalidate_and_attach()
3159 dev->class = ehc->classes[dev->devno]; in ata_eh_revalidate_and_attach()
3168 ehc->classes[dev->devno] = dev->class; in ata_eh_revalidate_and_attach()
3191 if ((ehc->i.flags & ATA_EHI_DID_RESET) && ata_is_host_link(link)) { in ata_eh_revalidate_and_attach()
3204 dev->class = ehc->classes[dev->devno]; in ata_eh_revalidate_and_attach()
3209 ehc->i.flags |= ATA_EHI_PRINTINFO; in ata_eh_revalidate_and_attach()
3211 ehc->i.flags &= ~ATA_EHI_PRINTINFO; in ata_eh_revalidate_and_attach()
3222 ehc->i.flags |= ATA_EHI_SETMODE; in ata_eh_revalidate_and_attach()
3273 struct ata_eh_context *ehc = &link->eh_context; in ata_set_mode() local
3274 u8 saved_xfer_mode = ehc->saved_xfer_mode[dev->devno]; in ata_set_mode()
3275 u8 saved_ncq = !!(ehc->saved_ncq_enabled & (1 << dev->devno)); in ata_set_mode()
3430 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_set_lpm() local
3533 if (!dev || ehc->tries[dev->devno] <= 2) { in ata_eh_set_lpm()
3566 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_skip_recovery() local
3574 if (ehc->i.flags & ATA_EHI_NO_RECOVERY) in ata_eh_skip_recovery()
3582 if ((ehc->i.action & ATA_EH_RESET) && in ata_eh_skip_recovery()
3583 !(ehc->i.flags & ATA_EHI_DID_RESET)) in ata_eh_skip_recovery()
3589 ehc->classes[dev->devno] != ATA_DEV_NONE) in ata_eh_skip_recovery()
3612 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_schedule_probe() local
3616 if (!(ehc->i.probe_mask & (1 << dev->devno)) || in ata_eh_schedule_probe()
3617 (ehc->did_probe_mask & (1 << dev->devno))) in ata_eh_schedule_probe()
3622 ehc->did_probe_mask |= (1 << dev->devno); in ata_eh_schedule_probe()
3623 ehc->i.action |= ATA_EH_RESET; in ata_eh_schedule_probe()
3624 ehc->saved_xfer_mode[dev->devno] = 0; in ata_eh_schedule_probe()
3625 ehc->saved_ncq_enabled &= ~(1 << dev->devno); in ata_eh_schedule_probe()
3661 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_handle_dev_fail() local
3667 ehc->tries[dev->devno]--; in ata_eh_handle_dev_fail()
3672 ehc->i.probe_mask |= (1 << dev->devno); in ata_eh_handle_dev_fail()
3676 ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1); in ata_eh_handle_dev_fail()
3679 if (ehc->tries[dev->devno] == 1) { in ata_eh_handle_dev_fail()
3689 if (ata_dev_enabled(dev) && !ehc->tries[dev->devno]) { in ata_eh_handle_dev_fail()
3699 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; in ata_eh_handle_dev_fail()
3700 memset(ehc->cmd_timeout_idx[dev->devno], 0, in ata_eh_handle_dev_fail()
3701 sizeof(ehc->cmd_timeout_idx[dev->devno])); in ata_eh_handle_dev_fail()
3706 ehc->i.action |= ATA_EH_RESET; in ata_eh_handle_dev_fail()
3747 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3750 if (ehc->i.action & ATA_EH_ENABLE_LINK) { in ata_eh_recover()
3760 ehc->tries[dev->devno] = 1; in ata_eh_recover()
3762 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; in ata_eh_recover()
3765 ehc->i.action |= ehc->i.dev_action[dev->devno] & in ata_eh_recover()
3767 ehc->i.dev_action[dev->devno] &= ATA_EH_PERDEV_MASK; in ata_eh_recover()
3788 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3792 ehc->i.action = 0; in ata_eh_recover()
3795 ehc->classes[dev->devno] = ATA_DEV_UNKNOWN; in ata_eh_recover()
3800 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3802 if (!(ehc->i.action & ATA_EH_RESET)) in ata_eh_recover()
3825 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3831 if (!(ehc->i.dev_action[dev->devno] & in ata_eh_recover()
3839 if (ehc->unloaded_mask & (1 << dev->devno)) in ata_eh_recover()
3869 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3881 ehc->i.action = 0; in ata_eh_recover()
3886 if (ehc->i.flags & ATA_EHI_SETMODE) { in ata_eh_recover()
3890 ehc->i.flags &= ~ATA_EHI_SETMODE; in ata_eh_recover()
3896 if (ehc->i.flags & ATA_EHI_DID_RESET) { in ata_eh_recover()
3927 ehc->i.flags = 0; in ata_eh_recover()