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()
680 struct ata_eh_context *ehc = &link->eh_context; in ata_scsi_port_error_handler() local
690 ehc->saved_xfer_mode[devno] = dev->xfer_mode; in ata_scsi_port_error_handler()
692 ehc->saved_ncq_enabled |= 1 << devno; in ata_scsi_port_error_handler()
1244 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_detach_dev() local
1261 ehc->saved_xfer_mode[dev->devno] = 0; in ata_eh_detach_dev()
1262 ehc->saved_ncq_enabled &= ~(1 << dev->devno); in ata_eh_detach_dev()
1285 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_about_to_do() local
1297 if (!(ehc->i.flags & ATA_EHI_QUIET) && link != ap->slave_link) in ata_eh_about_to_do()
1318 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_done() local
1322 ata_eh_clear_action(link, dev, &ehc->i, action); in ata_eh_done()
1507 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_analyze_serror() local
1508 u32 serror = ehc->i.serror; in ata_eh_analyze_serror()
1538 ata_ehi_hotplugged(&ehc->i); in ata_eh_analyze_serror()
1540 ehc->i.err_mask |= err_mask; in ata_eh_analyze_serror()
1541 ehc->i.action |= action; in ata_eh_analyze_serror()
1927 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_link_autopsy() local
1935 if (ehc->i.flags & ATA_EHI_NO_AUTOPSY) in ata_eh_link_autopsy()
1941 ehc->i.serror |= serror; in ata_eh_link_autopsy()
1945 ehc->i.probe_mask |= ATA_ALL_DEVICES; in ata_eh_link_autopsy()
1946 ehc->i.action |= ATA_EH_RESET; in ata_eh_link_autopsy()
1947 ehc->i.err_mask |= AC_ERR_OTHER; in ata_eh_link_autopsy()
1954 if (ehc->i.err_mask & ~AC_ERR_OTHER) in ata_eh_link_autopsy()
1955 ehc->i.err_mask &= ~AC_ERR_OTHER; in ata_eh_link_autopsy()
1957 all_err_mask |= ehc->i.err_mask; in ata_eh_link_autopsy()
1966 qc->err_mask |= ehc->i.err_mask; in ata_eh_link_autopsy()
1969 ehc->i.action |= ata_eh_analyze_tf(qc); in ata_eh_link_autopsy()
1993 ehc->i.dev = qc->dev; in ata_eh_link_autopsy()
2007 ehc->i.flags |= ATA_EHI_QUIET; in ata_eh_link_autopsy()
2012 ehc->i.action |= ATA_EH_RESET; in ata_eh_link_autopsy()
2015 ehc->i.action |= ATA_EH_REVALIDATE; in ata_eh_link_autopsy()
2020 if (ehc->i.dev) { in ata_eh_link_autopsy()
2021 ehc->i.dev_action[ehc->i.dev->devno] |= in ata_eh_link_autopsy()
2022 ehc->i.action & ATA_EH_PERDEV_MASK; in ata_eh_link_autopsy()
2023 ehc->i.action &= ~ATA_EH_PERDEV_MASK; in ata_eh_link_autopsy()
2031 dev = ehc->i.dev; in ata_eh_link_autopsy()
2039 ehc->i.action |= ata_eh_speed_down(dev, eflags, all_err_mask); in ata_eh_link_autopsy()
2040 trace_ata_eh_link_autopsy(dev, ehc->i.action, all_err_mask); in ata_eh_link_autopsy()
2224 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_link_report() local
2230 if (ehc->i.flags & ATA_EHI_QUIET) in ata_eh_link_report()
2234 if (ehc->i.desc[0] != '\0') in ata_eh_link_report()
2235 desc = ehc->i.desc; in ata_eh_link_report()
2249 if (!nr_failed && !ehc->i.err_mask) in ata_eh_link_report()
2260 if (ehc->i.dev) { in ata_eh_link_report()
2261 ata_dev_err(ehc->i.dev, "exception Emask 0x%x " in ata_eh_link_report()
2263 ehc->i.err_mask, link->sactive, ehc->i.serror, in ata_eh_link_report()
2264 ehc->i.action, frozen, tries_buf); in ata_eh_link_report()
2266 ata_dev_err(ehc->i.dev, "%s\n", desc); in ata_eh_link_report()
2270 ehc->i.err_mask, link->sactive, ehc->i.serror, in ata_eh_link_report()
2271 ehc->i.action, frozen, tries_buf); in ata_eh_link_report()
2277 if (ehc->i.serror) in ata_eh_link_report()
2280 ehc->i.serror & SERR_DATA_RECOVERED ? "RecovData " : "", in ata_eh_link_report()
2281 ehc->i.serror & SERR_COMM_RECOVERED ? "RecovComm " : "", in ata_eh_link_report()
2282 ehc->i.serror & SERR_DATA ? "UnrecovData " : "", in ata_eh_link_report()
2283 ehc->i.serror & SERR_PERSISTENT ? "Persist " : "", in ata_eh_link_report()
2284 ehc->i.serror & SERR_PROTOCOL ? "Proto " : "", in ata_eh_link_report()
2285 ehc->i.serror & SERR_INTERNAL ? "HostInt " : "", in ata_eh_link_report()
2286 ehc->i.serror & SERR_PHYRDY_CHG ? "PHYRdyChg " : "", in ata_eh_link_report()
2287 ehc->i.serror & SERR_PHY_INT_ERR ? "PHYInt " : "", in ata_eh_link_report()
2288 ehc->i.serror & SERR_COMM_WAKE ? "CommWake " : "", in ata_eh_link_report()
2289 ehc->i.serror & SERR_10B_8B_ERR ? "10B8B " : "", in ata_eh_link_report()
2290 ehc->i.serror & SERR_DISPARITY ? "Dispar " : "", in ata_eh_link_report()
2291 ehc->i.serror & SERR_CRC ? "BadCRC " : "", in ata_eh_link_report()
2292 ehc->i.serror & SERR_HANDSHAKE ? "Handshk " : "", in ata_eh_link_report()
2293 ehc->i.serror & SERR_LINK_SEQ_ERR ? "LinkSeq " : "", in ata_eh_link_report()
2294 ehc->i.serror & SERR_TRANS_ST_ERROR ? "TrStaTrns " : "", in ata_eh_link_report()
2295 ehc->i.serror & SERR_UNRECOG_FIS ? "UnrecFIS " : "", in ata_eh_link_report()
2296 ehc->i.serror & SERR_DEV_XCHG ? "DevExch " : ""); in ata_eh_link_report()
2454 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_reset() local
2456 unsigned int *classes = ehc->classes; in ata_eh_reset()
2458 int verbose = !(ehc->i.flags & ATA_EHI_QUIET); in ata_eh_reset()
2481 if (ehc->i.flags & ATA_EHI_DID_RESET) { in ata_eh_reset()
2483 WARN_ON(time_after(ehc->last_reset, now)); in ata_eh_reset()
2484 deadline = ata_deadline(ehc->last_reset, in ata_eh_reset()
2518 ehc->i.action &= ~ATA_EH_RESET; in ata_eh_reset()
2521 ehc->i.action |= ATA_EH_HARDRESET; in ata_eh_reset()
2524 ehc->i.action |= ATA_EH_SOFTRESET; in ata_eh_reset()
2533 sehc->i.action |= ehc->i.action; in ata_eh_reset()
2549 ehc->i.action |= sehc->i.action; in ata_eh_reset()
2555 ehc->i.action &= ~ATA_EH_RESET; in ata_eh_reset()
2571 if (reset && !(ehc->i.action & ATA_EH_RESET)) { in ata_eh_reset()
2596 ehc->last_reset = jiffies; in ata_eh_reset()
2598 ehc->i.flags |= ATA_EHI_DID_HARDRESET; in ata_eh_reset()
2601 ehc->i.flags |= ATA_EHI_DID_SOFTRESET; in ata_eh_reset()
2782 ehc->last_reset = jiffies; /* update to completion time */ in ata_eh_reset()
2783 ehc->i.action |= ATA_EH_REVALIDATE; in ata_eh_reset()
2789 ehc->i.flags &= ~ATA_EHI_HOTPLUGGED; in ata_eh_reset()
2901 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_park_issue_cmd() local
2907 ehc->unloaded_mask |= 1 << dev->devno; in ata_eh_park_issue_cmd()
2914 ehc->unloaded_mask &= ~(1 << dev->devno); in ata_eh_park_issue_cmd()
2923 ehc->unloaded_mask &= ~(1 << dev->devno); in ata_eh_park_issue_cmd()
2931 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_revalidate_and_attach() local
2945 if (ehc->i.flags & ATA_EHI_DID_RESET) in ata_eh_revalidate_and_attach()
2974 rc = ata_dev_revalidate(dev, ehc->classes[dev->devno], in ata_eh_revalidate_and_attach()
2984 ehc->i.flags |= ATA_EHI_SETMODE; in ata_eh_revalidate_and_attach()
2989 ehc->tries[dev->devno] && in ata_eh_revalidate_and_attach()
2990 ata_class_enabled(ehc->classes[dev->devno])) { in ata_eh_revalidate_and_attach()
2997 dev->class = ehc->classes[dev->devno]; in ata_eh_revalidate_and_attach()
3006 ehc->classes[dev->devno] = dev->class; in ata_eh_revalidate_and_attach()
3029 if ((ehc->i.flags & ATA_EHI_DID_RESET) && ata_is_host_link(link)) { in ata_eh_revalidate_and_attach()
3042 dev->class = ehc->classes[dev->devno]; in ata_eh_revalidate_and_attach()
3047 ehc->i.flags |= ATA_EHI_PRINTINFO; in ata_eh_revalidate_and_attach()
3049 ehc->i.flags &= ~ATA_EHI_PRINTINFO; in ata_eh_revalidate_and_attach()
3060 ehc->i.flags |= ATA_EHI_SETMODE; in ata_eh_revalidate_and_attach()
3110 struct ata_eh_context *ehc = &link->eh_context; in ata_set_mode() local
3111 u8 saved_xfer_mode = ehc->saved_xfer_mode[dev->devno]; in ata_set_mode()
3112 u8 saved_ncq = !!(ehc->saved_ncq_enabled & (1 << dev->devno)); in ata_set_mode()
3267 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_set_lpm() local
3371 if (!dev || ehc->tries[dev->devno] <= 2) { in ata_eh_set_lpm()
3404 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_skip_recovery() local
3412 if (ehc->i.flags & ATA_EHI_NO_RECOVERY) in ata_eh_skip_recovery()
3420 if ((ehc->i.action & ATA_EH_RESET) && in ata_eh_skip_recovery()
3421 !(ehc->i.flags & ATA_EHI_DID_RESET)) in ata_eh_skip_recovery()
3427 ehc->classes[dev->devno] != ATA_DEV_NONE) in ata_eh_skip_recovery()
3450 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_schedule_probe() local
3454 if (!(ehc->i.probe_mask & (1 << dev->devno)) || in ata_eh_schedule_probe()
3455 (ehc->did_probe_mask & (1 << dev->devno))) in ata_eh_schedule_probe()
3460 ehc->did_probe_mask |= (1 << dev->devno); in ata_eh_schedule_probe()
3461 ehc->i.action |= ATA_EH_RESET; in ata_eh_schedule_probe()
3462 ehc->saved_xfer_mode[dev->devno] = 0; in ata_eh_schedule_probe()
3463 ehc->saved_ncq_enabled &= ~(1 << dev->devno); in ata_eh_schedule_probe()
3499 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_handle_dev_fail() local
3505 ehc->tries[dev->devno]--; in ata_eh_handle_dev_fail()
3510 ehc->i.probe_mask |= (1 << dev->devno); in ata_eh_handle_dev_fail()
3514 ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1); in ata_eh_handle_dev_fail()
3517 if (ehc->tries[dev->devno] == 1) { in ata_eh_handle_dev_fail()
3527 if (ata_dev_enabled(dev) && !ehc->tries[dev->devno]) { in ata_eh_handle_dev_fail()
3537 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; in ata_eh_handle_dev_fail()
3538 memset(ehc->cmd_timeout_idx[dev->devno], 0, in ata_eh_handle_dev_fail()
3539 sizeof(ehc->cmd_timeout_idx[dev->devno])); in ata_eh_handle_dev_fail()
3544 ehc->i.action |= ATA_EH_RESET; in ata_eh_handle_dev_fail()
3583 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3586 if (ehc->i.action & ATA_EH_ENABLE_LINK) { in ata_eh_recover()
3596 ehc->tries[dev->devno] = 1; in ata_eh_recover()
3598 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; in ata_eh_recover()
3601 ehc->i.action |= ehc->i.dev_action[dev->devno] & in ata_eh_recover()
3603 ehc->i.dev_action[dev->devno] &= ATA_EH_PERDEV_MASK; in ata_eh_recover()
3624 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3628 ehc->i.action = 0; in ata_eh_recover()
3631 ehc->classes[dev->devno] = ATA_DEV_UNKNOWN; in ata_eh_recover()
3636 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3638 if (!(ehc->i.action & ATA_EH_RESET)) in ata_eh_recover()
3661 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3667 if (!(ehc->i.dev_action[dev->devno] & in ata_eh_recover()
3675 if (ehc->unloaded_mask & (1 << dev->devno)) in ata_eh_recover()
3705 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3717 ehc->i.action = 0; in ata_eh_recover()
3722 if (ehc->i.flags & ATA_EHI_SETMODE) { in ata_eh_recover()
3726 ehc->i.flags &= ~ATA_EHI_SETMODE; in ata_eh_recover()
3732 if (ehc->i.flags & ATA_EHI_DID_RESET) { in ata_eh_recover()
3763 ehc->i.flags = 0; in ata_eh_recover()