Lines Matching refs:ehc

331 	struct ata_eh_context *ehc = &dev->link->eh_context;  in ata_internal_cmd_timeout()  local
338 idx = ehc->cmd_timeout_idx[dev->devno][ent]; in ata_internal_cmd_timeout()
356 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_internal_cmd_timed_out() local
363 idx = ehc->cmd_timeout_idx[dev->devno][ent]; in ata_internal_cmd_timed_out()
365 ehc->cmd_timeout_idx[dev->devno][ent]++; in ata_internal_cmd_timed_out()
427 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_dev_action() local
429 return ehc->i.action | ehc->i.dev_action[dev->devno]; in ata_eh_dev_action()
678 struct ata_eh_context *ehc = &link->eh_context; in ata_scsi_port_error_handler() local
688 ehc->saved_xfer_mode[devno] = dev->xfer_mode; in ata_scsi_port_error_handler()
690 ehc->saved_ncq_enabled |= 1 << devno; in ata_scsi_port_error_handler()
1246 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_detach_dev() local
1263 ehc->saved_xfer_mode[dev->devno] = 0; in ata_eh_detach_dev()
1264 ehc->saved_ncq_enabled &= ~(1 << dev->devno); in ata_eh_detach_dev()
1287 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
1320 ata_eh_clear_action(link, dev, &ehc->i, action); in ata_eh_done()
1508 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_analyze_serror() local
1509 u32 serror = ehc->i.serror; in ata_eh_analyze_serror()
1539 ata_ehi_hotplugged(&ehc->i); in ata_eh_analyze_serror()
1541 ehc->i.err_mask |= err_mask; in ata_eh_analyze_serror()
1542 ehc->i.action |= action; in ata_eh_analyze_serror()
1924 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_link_autopsy() local
1934 if (ehc->i.flags & ATA_EHI_NO_AUTOPSY) in ata_eh_link_autopsy()
1940 ehc->i.serror |= serror; in ata_eh_link_autopsy()
1944 ehc->i.probe_mask |= ATA_ALL_DEVICES; in ata_eh_link_autopsy()
1945 ehc->i.action |= ATA_EH_RESET; in ata_eh_link_autopsy()
1946 ehc->i.err_mask |= AC_ERR_OTHER; in ata_eh_link_autopsy()
1953 if (ehc->i.err_mask & ~AC_ERR_OTHER) in ata_eh_link_autopsy()
1954 ehc->i.err_mask &= ~AC_ERR_OTHER; in ata_eh_link_autopsy()
1956 all_err_mask |= ehc->i.err_mask; in ata_eh_link_autopsy()
1964 qc->err_mask |= ehc->i.err_mask; in ata_eh_link_autopsy()
1967 ehc->i.action |= ata_eh_analyze_tf(qc, &qc->result_tf); in ata_eh_link_autopsy()
1991 ehc->i.dev = qc->dev; in ata_eh_link_autopsy()
2005 ehc->i.flags |= ATA_EHI_QUIET; in ata_eh_link_autopsy()
2010 ehc->i.action |= ATA_EH_RESET; in ata_eh_link_autopsy()
2013 ehc->i.action |= ATA_EH_REVALIDATE; in ata_eh_link_autopsy()
2018 if (ehc->i.dev) { in ata_eh_link_autopsy()
2019 ehc->i.dev_action[ehc->i.dev->devno] |= in ata_eh_link_autopsy()
2020 ehc->i.action & ATA_EH_PERDEV_MASK; in ata_eh_link_autopsy()
2021 ehc->i.action &= ~ATA_EH_PERDEV_MASK; in ata_eh_link_autopsy()
2029 dev = ehc->i.dev; in ata_eh_link_autopsy()
2037 ehc->i.action |= ata_eh_speed_down(dev, eflags, all_err_mask); in ata_eh_link_autopsy()
2038 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()
2457 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_reset() local
2459 unsigned int *classes = ehc->classes; in ata_eh_reset()
2461 int verbose = !(ehc->i.flags & ATA_EHI_QUIET); in ata_eh_reset()
2484 if (ehc->i.flags & ATA_EHI_DID_RESET) { in ata_eh_reset()
2486 WARN_ON(time_after(ehc->last_reset, now)); in ata_eh_reset()
2487 deadline = ata_deadline(ehc->last_reset, in ata_eh_reset()
2521 ehc->i.action &= ~ATA_EH_RESET; in ata_eh_reset()
2524 ehc->i.action |= ATA_EH_HARDRESET; in ata_eh_reset()
2527 ehc->i.action |= ATA_EH_SOFTRESET; in ata_eh_reset()
2536 sehc->i.action |= ehc->i.action; in ata_eh_reset()
2552 ehc->i.action |= sehc->i.action; in ata_eh_reset()
2558 ehc->i.action &= ~ATA_EH_RESET; in ata_eh_reset()
2574 if (reset && !(ehc->i.action & ATA_EH_RESET)) { in ata_eh_reset()
2600 ehc->last_reset = jiffies; in ata_eh_reset()
2602 ehc->i.flags |= ATA_EHI_DID_HARDRESET; in ata_eh_reset()
2604 ehc->i.flags |= ATA_EHI_DID_SOFTRESET; in ata_eh_reset()
2770 ehc->last_reset = jiffies; /* update to completion time */ in ata_eh_reset()
2771 ehc->i.action |= ATA_EH_REVALIDATE; in ata_eh_reset()
2777 ehc->i.flags &= ~ATA_EHI_HOTPLUGGED; in ata_eh_reset()
2889 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_park_issue_cmd() local
2895 ehc->unloaded_mask |= 1 << dev->devno; in ata_eh_park_issue_cmd()
2902 ehc->unloaded_mask &= ~(1 << dev->devno); in ata_eh_park_issue_cmd()
2911 ehc->unloaded_mask &= ~(1 << dev->devno); in ata_eh_park_issue_cmd()
2919 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_revalidate_and_attach() local
2935 if (ehc->i.flags & ATA_EHI_DID_RESET) in ata_eh_revalidate_and_attach()
2947 rc = ata_dev_revalidate(dev, ehc->classes[dev->devno], in ata_eh_revalidate_and_attach()
2957 ehc->i.flags |= ATA_EHI_SETMODE; in ata_eh_revalidate_and_attach()
2962 ehc->tries[dev->devno] && in ata_eh_revalidate_and_attach()
2963 ata_class_enabled(ehc->classes[dev->devno])) { in ata_eh_revalidate_and_attach()
2970 dev->class = ehc->classes[dev->devno]; in ata_eh_revalidate_and_attach()
2979 ehc->classes[dev->devno] = dev->class; in ata_eh_revalidate_and_attach()
3002 if ((ehc->i.flags & ATA_EHI_DID_RESET) && ata_is_host_link(link)) { in ata_eh_revalidate_and_attach()
3015 dev->class = ehc->classes[dev->devno]; in ata_eh_revalidate_and_attach()
3020 ehc->i.flags |= ATA_EHI_PRINTINFO; in ata_eh_revalidate_and_attach()
3022 ehc->i.flags &= ~ATA_EHI_PRINTINFO; in ata_eh_revalidate_and_attach()
3033 ehc->i.flags |= ATA_EHI_SETMODE; in ata_eh_revalidate_and_attach()
3084 struct ata_eh_context *ehc = &link->eh_context; in ata_set_mode() local
3085 u8 saved_xfer_mode = ehc->saved_xfer_mode[dev->devno]; in ata_set_mode()
3086 u8 saved_ncq = !!(ehc->saved_ncq_enabled & (1 << dev->devno)); in ata_set_mode()
3241 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_set_lpm() local
3345 if (!dev || ehc->tries[dev->devno] <= 2) { in ata_eh_set_lpm()
3378 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_skip_recovery() local
3386 if (ehc->i.flags & ATA_EHI_NO_RECOVERY) in ata_eh_skip_recovery()
3394 if ((ehc->i.action & ATA_EH_RESET) && in ata_eh_skip_recovery()
3395 !(ehc->i.flags & ATA_EHI_DID_RESET)) in ata_eh_skip_recovery()
3401 ehc->classes[dev->devno] != ATA_DEV_NONE) in ata_eh_skip_recovery()
3424 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_schedule_probe() local
3428 if (!(ehc->i.probe_mask & (1 << dev->devno)) || in ata_eh_schedule_probe()
3429 (ehc->did_probe_mask & (1 << dev->devno))) in ata_eh_schedule_probe()
3434 ehc->did_probe_mask |= (1 << dev->devno); in ata_eh_schedule_probe()
3435 ehc->i.action |= ATA_EH_RESET; in ata_eh_schedule_probe()
3436 ehc->saved_xfer_mode[dev->devno] = 0; in ata_eh_schedule_probe()
3437 ehc->saved_ncq_enabled &= ~(1 << dev->devno); in ata_eh_schedule_probe()
3473 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_handle_dev_fail() local
3479 ehc->tries[dev->devno]--; in ata_eh_handle_dev_fail()
3484 ehc->i.probe_mask |= (1 << dev->devno); in ata_eh_handle_dev_fail()
3488 ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1); in ata_eh_handle_dev_fail()
3491 if (ehc->tries[dev->devno] == 1) { in ata_eh_handle_dev_fail()
3501 if (ata_dev_enabled(dev) && !ehc->tries[dev->devno]) { in ata_eh_handle_dev_fail()
3511 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; in ata_eh_handle_dev_fail()
3512 memset(ehc->cmd_timeout_idx[dev->devno], 0, in ata_eh_handle_dev_fail()
3513 sizeof(ehc->cmd_timeout_idx[dev->devno])); in ata_eh_handle_dev_fail()
3518 ehc->i.action |= ATA_EH_RESET; in ata_eh_handle_dev_fail()
3559 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3562 if (ehc->i.action & ATA_EH_ENABLE_LINK) { in ata_eh_recover()
3572 ehc->tries[dev->devno] = 1; in ata_eh_recover()
3574 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; in ata_eh_recover()
3577 ehc->i.action |= ehc->i.dev_action[dev->devno] & in ata_eh_recover()
3579 ehc->i.dev_action[dev->devno] &= ATA_EH_PERDEV_MASK; in ata_eh_recover()
3600 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3604 ehc->i.action = 0; in ata_eh_recover()
3607 ehc->classes[dev->devno] = ATA_DEV_UNKNOWN; in ata_eh_recover()
3612 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3614 if (!(ehc->i.action & ATA_EH_RESET)) in ata_eh_recover()
3637 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3643 if (!(ehc->i.dev_action[dev->devno] & in ata_eh_recover()
3651 if (ehc->unloaded_mask & (1 << dev->devno)) in ata_eh_recover()
3681 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3693 ehc->i.action = 0; in ata_eh_recover()
3698 if (ehc->i.flags & ATA_EHI_SETMODE) { in ata_eh_recover()
3702 ehc->i.flags &= ~ATA_EHI_SETMODE; in ata_eh_recover()
3708 if (ehc->i.flags & ATA_EHI_DID_RESET) { in ata_eh_recover()
3739 ehc->i.flags = 0; in ata_eh_recover()