Lines Matching refs:ehc

338 	struct ata_eh_context *ehc = &dev->link->eh_context;  in ata_internal_cmd_timeout()  local
345 idx = ehc->cmd_timeout_idx[dev->devno][ent]; in ata_internal_cmd_timeout()
363 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_internal_cmd_timed_out() local
370 idx = ehc->cmd_timeout_idx[dev->devno][ent]; in ata_internal_cmd_timed_out()
372 ehc->cmd_timeout_idx[dev->devno][ent]++; in ata_internal_cmd_timed_out()
434 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_dev_action() local
436 return ehc->i.action | ehc->i.dev_action[dev->devno]; in ata_eh_dev_action()
738 struct ata_eh_context *ehc = &link->eh_context; in ata_scsi_port_error_handler() local
748 ehc->saved_xfer_mode[devno] = dev->xfer_mode; in ata_scsi_port_error_handler()
750 ehc->saved_ncq_enabled |= 1 << devno; in ata_scsi_port_error_handler()
1337 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_detach_dev() local
1354 ehc->saved_xfer_mode[dev->devno] = 0; in ata_eh_detach_dev()
1355 ehc->saved_ncq_enabled &= ~(1 << dev->devno); in ata_eh_detach_dev()
1378 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_about_to_do() local
1388 if (!(ehc->i.flags & ATA_EHI_QUIET) && link != ap->slave_link) in ata_eh_about_to_do()
1409 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_done() local
1411 ata_eh_clear_action(link, dev, &ehc->i, action); in ata_eh_done()
1638 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_analyze_serror() local
1639 u32 serror = ehc->i.serror; in ata_eh_analyze_serror()
1669 ata_ehi_hotplugged(&ehc->i); in ata_eh_analyze_serror()
1671 ehc->i.err_mask |= err_mask; in ata_eh_analyze_serror()
1672 ehc->i.action |= action; in ata_eh_analyze_serror()
1690 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_analyze_ncq_error() local
1701 if (!link->sactive || !(ehc->i.err_mask & AC_ERR_DEV)) in ata_eh_analyze_ncq_error()
1735 ehc->i.err_mask &= ~AC_ERR_DEV; in ata_eh_analyze_ncq_error()
2061 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_link_autopsy() local
2070 if (ehc->i.flags & ATA_EHI_NO_AUTOPSY) in ata_eh_link_autopsy()
2076 ehc->i.serror |= serror; in ata_eh_link_autopsy()
2080 ehc->i.probe_mask |= ATA_ALL_DEVICES; in ata_eh_link_autopsy()
2081 ehc->i.action |= ATA_EH_RESET; in ata_eh_link_autopsy()
2082 ehc->i.err_mask |= AC_ERR_OTHER; in ata_eh_link_autopsy()
2089 if (ehc->i.err_mask & ~AC_ERR_OTHER) in ata_eh_link_autopsy()
2090 ehc->i.err_mask &= ~AC_ERR_OTHER; in ata_eh_link_autopsy()
2092 all_err_mask |= ehc->i.err_mask; in ata_eh_link_autopsy()
2102 qc->err_mask |= ehc->i.err_mask; in ata_eh_link_autopsy()
2105 ehc->i.action |= ata_eh_analyze_tf(qc, &qc->result_tf); in ata_eh_link_autopsy()
2127 ehc->i.dev = qc->dev; in ata_eh_link_autopsy()
2136 ehc->i.action |= ATA_EH_RESET; in ata_eh_link_autopsy()
2139 ehc->i.action |= ATA_EH_REVALIDATE; in ata_eh_link_autopsy()
2144 if (ehc->i.dev) { in ata_eh_link_autopsy()
2145 ehc->i.dev_action[ehc->i.dev->devno] |= in ata_eh_link_autopsy()
2146 ehc->i.action & ATA_EH_PERDEV_MASK; in ata_eh_link_autopsy()
2147 ehc->i.action &= ~ATA_EH_PERDEV_MASK; in ata_eh_link_autopsy()
2155 dev = ehc->i.dev; in ata_eh_link_autopsy()
2163 ehc->i.action |= ata_eh_speed_down(dev, eflags, all_err_mask); in ata_eh_link_autopsy()
2338 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_link_report() local
2343 if (ehc->i.flags & ATA_EHI_QUIET) in ata_eh_link_report()
2347 if (ehc->i.desc[0] != '\0') in ata_eh_link_report()
2348 desc = ehc->i.desc; in ata_eh_link_report()
2364 if (!nr_failed && !ehc->i.err_mask) in ata_eh_link_report()
2376 if (ehc->i.dev) { in ata_eh_link_report()
2377 ata_dev_printk(ehc->i.dev, KERN_ERR, "exception Emask 0x%x " in ata_eh_link_report()
2379 ehc->i.err_mask, link->sactive, ehc->i.serror, in ata_eh_link_report()
2380 ehc->i.action, frozen, tries_buf); in ata_eh_link_report()
2382 ata_dev_printk(ehc->i.dev, KERN_ERR, "%s\n", desc); in ata_eh_link_report()
2386 ehc->i.err_mask, link->sactive, ehc->i.serror, in ata_eh_link_report()
2387 ehc->i.action, frozen, tries_buf); in ata_eh_link_report()
2393 if (ehc->i.serror) in ata_eh_link_report()
2396 ehc->i.serror & SERR_DATA_RECOVERED ? "RecovData " : "", in ata_eh_link_report()
2397 ehc->i.serror & SERR_COMM_RECOVERED ? "RecovComm " : "", in ata_eh_link_report()
2398 ehc->i.serror & SERR_DATA ? "UnrecovData " : "", in ata_eh_link_report()
2399 ehc->i.serror & SERR_PERSISTENT ? "Persist " : "", in ata_eh_link_report()
2400 ehc->i.serror & SERR_PROTOCOL ? "Proto " : "", in ata_eh_link_report()
2401 ehc->i.serror & SERR_INTERNAL ? "HostInt " : "", in ata_eh_link_report()
2402 ehc->i.serror & SERR_PHYRDY_CHG ? "PHYRdyChg " : "", in ata_eh_link_report()
2403 ehc->i.serror & SERR_PHY_INT_ERR ? "PHYInt " : "", in ata_eh_link_report()
2404 ehc->i.serror & SERR_COMM_WAKE ? "CommWake " : "", in ata_eh_link_report()
2405 ehc->i.serror & SERR_10B_8B_ERR ? "10B8B " : "", in ata_eh_link_report()
2406 ehc->i.serror & SERR_DISPARITY ? "Dispar " : "", in ata_eh_link_report()
2407 ehc->i.serror & SERR_CRC ? "BadCRC " : "", in ata_eh_link_report()
2408 ehc->i.serror & SERR_HANDSHAKE ? "Handshk " : "", in ata_eh_link_report()
2409 ehc->i.serror & SERR_LINK_SEQ_ERR ? "LinkSeq " : "", in ata_eh_link_report()
2410 ehc->i.serror & SERR_TRANS_ST_ERROR ? "TrStaTrns " : "", in ata_eh_link_report()
2411 ehc->i.serror & SERR_UNRECOG_FIS ? "UnrecFIS " : "", in ata_eh_link_report()
2412 ehc->i.serror & SERR_DEV_XCHG ? "DevExch " : ""); in ata_eh_link_report()
2556 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_reset() local
2558 unsigned int *classes = ehc->classes; in ata_eh_reset()
2560 int verbose = !(ehc->i.flags & ATA_EHI_QUIET); in ata_eh_reset()
2581 if (ehc->i.flags & ATA_EHI_DID_RESET) { in ata_eh_reset()
2583 WARN_ON(time_after(ehc->last_reset, now)); in ata_eh_reset()
2584 deadline = ata_deadline(ehc->last_reset, in ata_eh_reset()
2617 ehc->i.action &= ~ATA_EH_RESET; in ata_eh_reset()
2620 ehc->i.action |= ATA_EH_HARDRESET; in ata_eh_reset()
2623 ehc->i.action |= ATA_EH_SOFTRESET; in ata_eh_reset()
2632 sehc->i.action |= ehc->i.action; in ata_eh_reset()
2648 ehc->i.action |= sehc->i.action; in ata_eh_reset()
2655 ehc->i.action &= ~ATA_EH_RESET; in ata_eh_reset()
2670 if (reset && !(ehc->i.action & ATA_EH_RESET)) { in ata_eh_reset()
2696 ehc->last_reset = jiffies; in ata_eh_reset()
2698 ehc->i.flags |= ATA_EHI_DID_HARDRESET; in ata_eh_reset()
2700 ehc->i.flags |= ATA_EHI_DID_SOFTRESET; in ata_eh_reset()
2865 ehc->last_reset = jiffies; /* update to completion time */ in ata_eh_reset()
2866 ehc->i.action |= ATA_EH_REVALIDATE; in ata_eh_reset()
2872 ehc->i.flags &= ~ATA_EHI_HOTPLUGGED; in ata_eh_reset()
2965 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_park_issue_cmd() local
2971 ehc->unloaded_mask |= 1 << dev->devno; in ata_eh_park_issue_cmd()
2978 ehc->unloaded_mask &= ~(1 << dev->devno); in ata_eh_park_issue_cmd()
2987 ehc->unloaded_mask &= ~(1 << dev->devno); in ata_eh_park_issue_cmd()
2995 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_revalidate_and_attach() local
3011 if (ehc->i.flags & ATA_EHI_DID_RESET) in ata_eh_revalidate_and_attach()
3023 rc = ata_dev_revalidate(dev, ehc->classes[dev->devno], in ata_eh_revalidate_and_attach()
3033 ehc->i.flags |= ATA_EHI_SETMODE; in ata_eh_revalidate_and_attach()
3038 ehc->tries[dev->devno] && in ata_eh_revalidate_and_attach()
3039 ata_class_enabled(ehc->classes[dev->devno])) { in ata_eh_revalidate_and_attach()
3046 dev->class = ehc->classes[dev->devno]; in ata_eh_revalidate_and_attach()
3055 ehc->classes[dev->devno] = dev->class; in ata_eh_revalidate_and_attach()
3078 if ((ehc->i.flags & ATA_EHI_DID_RESET) && ata_is_host_link(link)) { in ata_eh_revalidate_and_attach()
3091 dev->class = ehc->classes[dev->devno]; in ata_eh_revalidate_and_attach()
3096 ehc->i.flags |= ATA_EHI_PRINTINFO; in ata_eh_revalidate_and_attach()
3098 ehc->i.flags &= ~ATA_EHI_PRINTINFO; in ata_eh_revalidate_and_attach()
3109 ehc->i.flags |= ATA_EHI_SETMODE; in ata_eh_revalidate_and_attach()
3160 struct ata_eh_context *ehc = &link->eh_context; in ata_set_mode() local
3161 u8 saved_xfer_mode = ehc->saved_xfer_mode[dev->devno]; in ata_set_mode()
3162 u8 saved_ncq = !!(ehc->saved_ncq_enabled & (1 << dev->devno)); in ata_set_mode()
3316 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_set_lpm() local
3416 if (!dev || ehc->tries[dev->devno] <= 2) { in ata_eh_set_lpm()
3450 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_skip_recovery() local
3458 if (ehc->i.flags & ATA_EHI_NO_RECOVERY) in ata_eh_skip_recovery()
3466 if ((ehc->i.action & ATA_EH_RESET) && in ata_eh_skip_recovery()
3467 !(ehc->i.flags & ATA_EHI_DID_RESET)) in ata_eh_skip_recovery()
3473 ehc->classes[dev->devno] != ATA_DEV_NONE) in ata_eh_skip_recovery()
3495 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_schedule_probe() local
3499 if (!(ehc->i.probe_mask & (1 << dev->devno)) || in ata_eh_schedule_probe()
3500 (ehc->did_probe_mask & (1 << dev->devno))) in ata_eh_schedule_probe()
3505 ehc->did_probe_mask |= (1 << dev->devno); in ata_eh_schedule_probe()
3506 ehc->i.action |= ATA_EH_RESET; in ata_eh_schedule_probe()
3507 ehc->saved_xfer_mode[dev->devno] = 0; in ata_eh_schedule_probe()
3508 ehc->saved_ncq_enabled &= ~(1 << dev->devno); in ata_eh_schedule_probe()
3544 struct ata_eh_context *ehc = &dev->link->eh_context; in ata_eh_handle_dev_fail() local
3550 ehc->tries[dev->devno]--; in ata_eh_handle_dev_fail()
3555 ehc->i.probe_mask |= (1 << dev->devno); in ata_eh_handle_dev_fail()
3558 ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1); in ata_eh_handle_dev_fail()
3560 if (ehc->tries[dev->devno] == 1) { in ata_eh_handle_dev_fail()
3570 if (ata_dev_enabled(dev) && !ehc->tries[dev->devno]) { in ata_eh_handle_dev_fail()
3580 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; in ata_eh_handle_dev_fail()
3581 memset(ehc->cmd_timeout_idx[dev->devno], 0, in ata_eh_handle_dev_fail()
3582 sizeof(ehc->cmd_timeout_idx[dev->devno])); in ata_eh_handle_dev_fail()
3587 ehc->i.action |= ATA_EH_RESET; in ata_eh_handle_dev_fail()
3628 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3631 if (ehc->i.action & ATA_EH_ENABLE_LINK) { in ata_eh_recover()
3641 ehc->tries[dev->devno] = 1; in ata_eh_recover()
3643 ehc->tries[dev->devno] = ATA_EH_DEV_TRIES; in ata_eh_recover()
3646 ehc->i.action |= ehc->i.dev_action[dev->devno] & in ata_eh_recover()
3648 ehc->i.dev_action[dev->devno] &= ATA_EH_PERDEV_MASK; in ata_eh_recover()
3669 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3673 ehc->i.action = 0; in ata_eh_recover()
3676 ehc->classes[dev->devno] = ATA_DEV_UNKNOWN; in ata_eh_recover()
3681 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3683 if (!(ehc->i.action & ATA_EH_RESET)) in ata_eh_recover()
3707 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3712 if (!(ehc->i.dev_action[dev->devno] & in ata_eh_recover()
3720 if (ehc->unloaded_mask & (1 << dev->devno)) in ata_eh_recover()
3750 struct ata_eh_context *ehc = &link->eh_context; in ata_eh_recover() local
3762 ehc->i.action = 0; in ata_eh_recover()
3767 if (ehc->i.flags & ATA_EHI_SETMODE) { in ata_eh_recover()
3771 ehc->i.flags &= ~ATA_EHI_SETMODE; in ata_eh_recover()
3777 if (ehc->i.flags & ATA_EHI_DID_RESET) { in ata_eh_recover()
3805 ehc->i.flags = 0; in ata_eh_recover()