Lines Matching refs:ehc

323 	struct ata_eh_context *ehc = &dev->link->eh_context;  in ata_internal_cmd_timeout()  local
330 idx = ehc->cmd_timeout_idx[dev->devno][ent]; in ata_internal_cmd_timeout()
348 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_internal_cmd_timed_out() local
355 idx = ehc->cmd_timeout_idx[dev->devno][ent]; in ata_internal_cmd_timed_out()
357 ehc->cmd_timeout_idx[dev->devno][ent]++; in ata_internal_cmd_timed_out()
419 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_dev_action() local
421 return ehc->i.action | ehc->i.dev_action[dev->devno]; in ata_eh_dev_action()
670 struct ata_eh_context *ehc = &link->eh_context; in ata_scsi_port_error_handler() local
680 ehc->saved_xfer_mode[devno] = dev->xfer_mode; in ata_scsi_port_error_handler()
682 ehc->saved_ncq_enabled |= 1 << devno; in ata_scsi_port_error_handler()
1238 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_detach_dev() local
1255 ehc->saved_xfer_mode[dev->devno] = 0; in ata_eh_detach_dev()
1256 ehc->saved_ncq_enabled &= ~(1 << dev->devno); in ata_eh_detach_dev()
1279 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_about_to_do() local
1289 if (!(ehc->i.flags & ATA_EHI_QUIET) && link != ap->slave_link) in ata_eh_about_to_do()
1310 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_done() local
1312 ata_eh_clear_action(link, dev, &ehc->i, action); in ata_eh_done()
1500 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_analyze_serror() local
1501 u32 serror = ehc->i.serror; in ata_eh_analyze_serror()
1531 ata_ehi_hotplugged(&ehc->i); in ata_eh_analyze_serror()
1533 ehc->i.err_mask |= err_mask; in ata_eh_analyze_serror()
1534 ehc->i.action |= action; in ata_eh_analyze_serror()
1916 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_link_autopsy() local
1926 if (ehc->i.flags & ATA_EHI_NO_AUTOPSY) in ata_eh_link_autopsy()
1932 ehc->i.serror |= serror; in ata_eh_link_autopsy()
1936 ehc->i.probe_mask |= ATA_ALL_DEVICES; in ata_eh_link_autopsy()
1937 ehc->i.action |= ATA_EH_RESET; in ata_eh_link_autopsy()
1938 ehc->i.err_mask |= AC_ERR_OTHER; in ata_eh_link_autopsy()
1945 if (ehc->i.err_mask & ~AC_ERR_OTHER) in ata_eh_link_autopsy()
1946 ehc->i.err_mask &= ~AC_ERR_OTHER; in ata_eh_link_autopsy()
1948 all_err_mask |= ehc->i.err_mask; in ata_eh_link_autopsy()
1956 qc->err_mask |= ehc->i.err_mask; in ata_eh_link_autopsy()
1959 ehc->i.action |= ata_eh_analyze_tf(qc, &qc->result_tf); in ata_eh_link_autopsy()
1983 ehc->i.dev = qc->dev; in ata_eh_link_autopsy()
1997 ehc->i.flags |= ATA_EHI_QUIET; in ata_eh_link_autopsy()
2002 ehc->i.action |= ATA_EH_RESET; in ata_eh_link_autopsy()
2005 ehc->i.action |= ATA_EH_REVALIDATE; in ata_eh_link_autopsy()
2010 if (ehc->i.dev) { in ata_eh_link_autopsy()
2011 ehc->i.dev_action[ehc->i.dev->devno] |= in ata_eh_link_autopsy()
2012 ehc->i.action & ATA_EH_PERDEV_MASK; in ata_eh_link_autopsy()
2013 ehc->i.action &= ~ATA_EH_PERDEV_MASK; in ata_eh_link_autopsy()
2021 dev = ehc->i.dev; in ata_eh_link_autopsy()
2029 ehc->i.action |= ata_eh_speed_down(dev, eflags, all_err_mask); in ata_eh_link_autopsy()
2030 trace_ata_eh_link_autopsy(dev, ehc->i.action, all_err_mask); in ata_eh_link_autopsy()
2215 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_link_report() local
2221 if (ehc->i.flags & ATA_EHI_QUIET) in ata_eh_link_report()
2225 if (ehc->i.desc[0] != '\0') in ata_eh_link_report()
2226 desc = ehc->i.desc; in ata_eh_link_report()
2240 if (!nr_failed && !ehc->i.err_mask) in ata_eh_link_report()
2251 if (ehc->i.dev) { in ata_eh_link_report()
2252 ata_dev_err(ehc->i.dev, "exception Emask 0x%x " in ata_eh_link_report()
2254 ehc->i.err_mask, link->sactive, ehc->i.serror, in ata_eh_link_report()
2255 ehc->i.action, frozen, tries_buf); in ata_eh_link_report()
2257 ata_dev_err(ehc->i.dev, "%s\n", desc); in ata_eh_link_report()
2261 ehc->i.err_mask, link->sactive, ehc->i.serror, in ata_eh_link_report()
2262 ehc->i.action, frozen, tries_buf); in ata_eh_link_report()
2268 if (ehc->i.serror) in ata_eh_link_report()
2271 ehc->i.serror & SERR_DATA_RECOVERED ? "RecovData " : "", in ata_eh_link_report()
2272 ehc->i.serror & SERR_COMM_RECOVERED ? "RecovComm " : "", in ata_eh_link_report()
2273 ehc->i.serror & SERR_DATA ? "UnrecovData " : "", in ata_eh_link_report()
2274 ehc->i.serror & SERR_PERSISTENT ? "Persist " : "", in ata_eh_link_report()
2275 ehc->i.serror & SERR_PROTOCOL ? "Proto " : "", in ata_eh_link_report()
2276 ehc->i.serror & SERR_INTERNAL ? "HostInt " : "", in ata_eh_link_report()
2277 ehc->i.serror & SERR_PHYRDY_CHG ? "PHYRdyChg " : "", in ata_eh_link_report()
2278 ehc->i.serror & SERR_PHY_INT_ERR ? "PHYInt " : "", in ata_eh_link_report()
2279 ehc->i.serror & SERR_COMM_WAKE ? "CommWake " : "", in ata_eh_link_report()
2280 ehc->i.serror & SERR_10B_8B_ERR ? "10B8B " : "", in ata_eh_link_report()
2281 ehc->i.serror & SERR_DISPARITY ? "Dispar " : "", in ata_eh_link_report()
2282 ehc->i.serror & SERR_CRC ? "BadCRC " : "", in ata_eh_link_report()
2283 ehc->i.serror & SERR_HANDSHAKE ? "Handshk " : "", in ata_eh_link_report()
2284 ehc->i.serror & SERR_LINK_SEQ_ERR ? "LinkSeq " : "", in ata_eh_link_report()
2285 ehc->i.serror & SERR_TRANS_ST_ERROR ? "TrStaTrns " : "", in ata_eh_link_report()
2286 ehc->i.serror & SERR_UNRECOG_FIS ? "UnrecFIS " : "", in ata_eh_link_report()
2287 ehc->i.serror & SERR_DEV_XCHG ? "DevExch " : ""); in ata_eh_link_report()
2448 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_reset() local
2450 unsigned int *classes = ehc->classes; in ata_eh_reset()
2452 int verbose = !(ehc->i.flags & ATA_EHI_QUIET); in ata_eh_reset()
2475 if (ehc->i.flags & ATA_EHI_DID_RESET) { in ata_eh_reset()
2477 WARN_ON(time_after(ehc->last_reset, now)); in ata_eh_reset()
2478 deadline = ata_deadline(ehc->last_reset, in ata_eh_reset()
2512 ehc->i.action &= ~ATA_EH_RESET; in ata_eh_reset()
2515 ehc->i.action |= ATA_EH_HARDRESET; in ata_eh_reset()
2518 ehc->i.action |= ATA_EH_SOFTRESET; in ata_eh_reset()
2527 sehc->i.action |= ehc->i.action; in ata_eh_reset()
2543 ehc->i.action |= sehc->i.action; in ata_eh_reset()
2549 ehc->i.action &= ~ATA_EH_RESET; in ata_eh_reset()
2565 if (reset && !(ehc->i.action & ATA_EH_RESET)) { in ata_eh_reset()
2591 ehc->last_reset = jiffies; in ata_eh_reset()
2593 ehc->i.flags |= ATA_EHI_DID_HARDRESET; in ata_eh_reset()
2595 ehc->i.flags |= ATA_EHI_DID_SOFTRESET; in ata_eh_reset()
2761 ehc->last_reset = jiffies; /* update to completion time */ in ata_eh_reset()
2762 ehc->i.action |= ATA_EH_REVALIDATE; in ata_eh_reset()
2768 ehc->i.flags &= ~ATA_EHI_HOTPLUGGED; in ata_eh_reset()
2880 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_park_issue_cmd() local
2886 ehc->unloaded_mask |= 1 << dev->devno; in ata_eh_park_issue_cmd()
2893 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()
2910 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_revalidate_and_attach() local
2926 if (ehc->i.flags & ATA_EHI_DID_RESET) in ata_eh_revalidate_and_attach()
2938 rc = ata_dev_revalidate(dev, ehc->classes[dev->devno], in ata_eh_revalidate_and_attach()
2948 ehc->i.flags |= ATA_EHI_SETMODE; in ata_eh_revalidate_and_attach()
2953 ehc->tries[dev->devno] && in ata_eh_revalidate_and_attach()
2954 ata_class_enabled(ehc->classes[dev->devno])) { in ata_eh_revalidate_and_attach()
2961 dev->class = ehc->classes[dev->devno]; in ata_eh_revalidate_and_attach()
2970 ehc->classes[dev->devno] = dev->class; in ata_eh_revalidate_and_attach()
2993 if ((ehc->i.flags & ATA_EHI_DID_RESET) && ata_is_host_link(link)) { in ata_eh_revalidate_and_attach()
3006 dev->class = ehc->classes[dev->devno]; in ata_eh_revalidate_and_attach()
3011 ehc->i.flags |= ATA_EHI_PRINTINFO; in ata_eh_revalidate_and_attach()
3013 ehc->i.flags &= ~ATA_EHI_PRINTINFO; in ata_eh_revalidate_and_attach()
3024 ehc->i.flags |= ATA_EHI_SETMODE; in ata_eh_revalidate_and_attach()
3075 struct ata_eh_context *ehc = &link->eh_context; in ata_set_mode() local
3076 u8 saved_xfer_mode = ehc->saved_xfer_mode[dev->devno]; in ata_set_mode()
3077 u8 saved_ncq = !!(ehc->saved_ncq_enabled & (1 << dev->devno)); in ata_set_mode()
3232 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_set_lpm() local
3336 if (!dev || ehc->tries[dev->devno] <= 2) { in ata_eh_set_lpm()
3369 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_skip_recovery() local
3377 if (ehc->i.flags & ATA_EHI_NO_RECOVERY) in ata_eh_skip_recovery()
3385 if ((ehc->i.action & ATA_EH_RESET) && in ata_eh_skip_recovery()
3386 !(ehc->i.flags & ATA_EHI_DID_RESET)) in ata_eh_skip_recovery()
3392 ehc->classes[dev->devno] != ATA_DEV_NONE) in ata_eh_skip_recovery()
3415 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_schedule_probe() local
3419 if (!(ehc->i.probe_mask & (1 << dev->devno)) || in ata_eh_schedule_probe()
3420 (ehc->did_probe_mask & (1 << dev->devno))) in ata_eh_schedule_probe()
3425 ehc->did_probe_mask |= (1 << dev->devno); in ata_eh_schedule_probe()
3426 ehc->i.action |= ATA_EH_RESET; in ata_eh_schedule_probe()
3427 ehc->saved_xfer_mode[dev->devno] = 0; in ata_eh_schedule_probe()
3428 ehc->saved_ncq_enabled &= ~(1 << dev->devno); in ata_eh_schedule_probe()
3464 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_handle_dev_fail() local
3470 ehc->tries[dev->devno]--; in ata_eh_handle_dev_fail()
3475 ehc->i.probe_mask |= (1 << dev->devno); in ata_eh_handle_dev_fail()
3479 ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1); in ata_eh_handle_dev_fail()
3482 if (ehc->tries[dev->devno] == 1) { in ata_eh_handle_dev_fail()
3492 if (ata_dev_enabled(dev) && !ehc->tries[dev->devno]) { in ata_eh_handle_dev_fail()
3502 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; in ata_eh_handle_dev_fail()
3503 memset(ehc->cmd_timeout_idx[dev->devno], 0, in ata_eh_handle_dev_fail()
3504 sizeof(ehc->cmd_timeout_idx[dev->devno])); in ata_eh_handle_dev_fail()
3509 ehc->i.action |= ATA_EH_RESET; in ata_eh_handle_dev_fail()
3550 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3553 if (ehc->i.action & ATA_EH_ENABLE_LINK) { in ata_eh_recover()
3563 ehc->tries[dev->devno] = 1; in ata_eh_recover()
3565 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; in ata_eh_recover()
3568 ehc->i.action |= ehc->i.dev_action[dev->devno] & in ata_eh_recover()
3570 ehc->i.dev_action[dev->devno] &= ATA_EH_PERDEV_MASK; in ata_eh_recover()
3591 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3595 ehc->i.action = 0; in ata_eh_recover()
3598 ehc->classes[dev->devno] = ATA_DEV_UNKNOWN; in ata_eh_recover()
3603 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3605 if (!(ehc->i.action & ATA_EH_RESET)) in ata_eh_recover()
3628 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3634 if (!(ehc->i.dev_action[dev->devno] & in ata_eh_recover()
3642 if (ehc->unloaded_mask & (1 << dev->devno)) in ata_eh_recover()
3672 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3684 ehc->i.action = 0; in ata_eh_recover()
3689 if (ehc->i.flags & ATA_EHI_SETMODE) { in ata_eh_recover()
3693 ehc->i.flags &= ~ATA_EHI_SETMODE; in ata_eh_recover()
3699 if (ehc->i.flags & ATA_EHI_DID_RESET) { in ata_eh_recover()
3730 ehc->i.flags = 0; in ata_eh_recover()