Lines Matching refs:err_mask
369 unsigned int err_mask) in ata_ering_record() argument
373 WARN_ON(!err_mask); in ata_ering_record()
380 ent->err_mask = err_mask; in ata_ering_record()
388 if (ent->err_mask) in ata_ering_top()
403 if (!ent->err_mask) in ata_ering_map()
617 qc->err_mask |= AC_ERR_TIMEOUT; in ata_scsi_cmd_error_handler()
846 qc->err_mask |= AC_ERR_TIMEOUT; in ata_eh_fastdrain_timerfn()
1201 if (!qc->err_mask) in ata_eh_qc_retry()
1337 static const char *ata_err_string(unsigned int err_mask) in ata_err_string() argument
1339 if (err_mask & AC_ERR_HOST_BUS) in ata_err_string()
1341 if (err_mask & AC_ERR_ATA_BUS) in ata_err_string()
1343 if (err_mask & AC_ERR_TIMEOUT) in ata_err_string()
1345 if (err_mask & AC_ERR_HSM) in ata_err_string()
1347 if (err_mask & AC_ERR_SYSTEM) in ata_err_string()
1349 if (err_mask & AC_ERR_MEDIA) in ata_err_string()
1351 if (err_mask & AC_ERR_INVALID) in ata_err_string()
1353 if (err_mask & AC_ERR_DEV) in ata_err_string()
1355 if (err_mask & AC_ERR_NCQ) in ata_err_string()
1357 if (err_mask & AC_ERR_NODEV_HINT) in ata_err_string()
1379 unsigned int err_mask; in atapi_eh_tur() local
1387 err_mask = ata_exec_internal(dev, &tf, cdb, DMA_NONE, NULL, 0, 0); in atapi_eh_tur()
1388 if (err_mask == AC_ERR_DEV) in atapi_eh_tur()
1390 return err_mask; in atapi_eh_tur()
1409 unsigned int err_mask; in ata_eh_request_sense() local
1432 err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0); in ata_eh_request_sense()
1439 tf.command, err_mask); in ata_eh_request_sense()
1510 unsigned int err_mask = 0, action = 0; in ata_eh_analyze_serror() local
1514 err_mask |= AC_ERR_ATA_BUS; in ata_eh_analyze_serror()
1518 err_mask |= AC_ERR_HSM; in ata_eh_analyze_serror()
1522 err_mask |= AC_ERR_SYSTEM; in ata_eh_analyze_serror()
1541 ehc->i.err_mask |= err_mask; in ata_eh_analyze_serror()
1567 qc->err_mask |= AC_ERR_HSM; in ata_eh_analyze_tf()
1572 qc->err_mask |= AC_ERR_DEV; in ata_eh_analyze_tf()
1590 qc->err_mask |= AC_ERR_ATA_BUS; in ata_eh_analyze_tf()
1592 qc->err_mask |= AC_ERR_MEDIA; in ata_eh_analyze_tf()
1594 qc->err_mask |= AC_ERR_INVALID; in ata_eh_analyze_tf()
1605 qc->err_mask |= tmp; in ata_eh_analyze_tf()
1622 qc->err_mask |= AC_ERR_OTHER; in ata_eh_analyze_tf()
1624 qc->err_mask |= AC_ERR_HSM; in ata_eh_analyze_tf()
1627 if (qc->err_mask & (AC_ERR_HSM | AC_ERR_TIMEOUT | AC_ERR_ATA_BUS)) in ata_eh_analyze_tf()
1633 static int ata_eh_categorize_error(unsigned int eflags, unsigned int err_mask, in ata_eh_categorize_error() argument
1644 if (err_mask & AC_ERR_ATA_BUS) in ata_eh_categorize_error()
1647 if (err_mask & AC_ERR_TIMEOUT) in ata_eh_categorize_error()
1651 if (err_mask & AC_ERR_HSM) in ata_eh_categorize_error()
1653 if ((err_mask & in ata_eh_categorize_error()
1675 cat = ata_eh_categorize_error(ent->eflags, ent->err_mask, in speed_down_verdict_cb()
1800 unsigned int eflags, unsigned int err_mask) in ata_eh_speed_down() argument
1808 if (ata_eh_categorize_error(eflags, err_mask, &xfer_ok) == 0) in ata_eh_speed_down()
1812 ata_ering_record(&dev->ering, eflags, err_mask); in ata_eh_speed_down()
1886 if (qc->err_mask & AC_ERR_MEDIA) in ata_eh_worth_retry()
1890 if (qc->err_mask & AC_ERR_INVALID) in ata_eh_worth_retry()
1892 return qc->err_mask != AC_ERR_DEV; /* retry if not dev error */ in ata_eh_worth_retry()
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()
1970 if (qc->err_mask & AC_ERR_ATA_BUS) in ata_eh_link_autopsy()
1971 qc->err_mask &= ~(AC_ERR_DEV | AC_ERR_MEDIA | in ata_eh_link_autopsy()
1975 if (qc->err_mask & ~AC_ERR_OTHER) in ata_eh_link_autopsy()
1976 qc->err_mask &= ~AC_ERR_OTHER; in ata_eh_link_autopsy()
1986 qc->err_mask &= ~(AC_ERR_DEV | AC_ERR_OTHER); in ata_eh_link_autopsy()
1992 all_err_mask |= qc->err_mask; in ata_eh_link_autopsy()
2026 ap->link.eh_context.i.err_mask |= AC_ERR_TIMEOUT; in ata_eh_link_autopsy()
2241 qc->err_mask == AC_ERR_DEV)) in ata_eh_link_report()
2243 if (qc->flags & ATA_QCFLAG_SENSE_VALID && !qc->err_mask) in ata_eh_link_report()
2249 if (!nr_failed && !ehc->i.err_mask) in ata_eh_link_report()
2263 ehc->i.err_mask, link->sactive, ehc->i.serror, in ata_eh_link_report()
2270 ehc->i.err_mask, link->sactive, ehc->i.serror, in ata_eh_link_report()
2305 ata_dev_phys_link(qc->dev) != link || !qc->err_mask) in ata_eh_link_report()
2380 res->device, qc->err_mask, ata_err_string(qc->err_mask), in ata_eh_link_report()
2381 qc->err_mask & AC_ERR_NCQ ? " <F>" : ""); in ata_eh_link_report()
2891 unsigned int err_mask; in ata_eh_park_issue_cmd() local
2908 err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0); in ata_eh_park_issue_cmd()
2909 if (park && (err_mask || tf.lbal != 0xc4)) { in ata_eh_park_issue_cmd()
3117 unsigned int err_mask; in atapi_eh_clear_ua() local
3119 err_mask = atapi_eh_tur(dev, &sense_key); in atapi_eh_clear_ua()
3120 if (err_mask != 0 && err_mask != AC_ERR_DEV) { in atapi_eh_clear_ua()
3123 err_mask); in atapi_eh_clear_ua()
3127 if (!err_mask || sense_key != UNIT_ATTENTION) in atapi_eh_clear_ua()
3130 err_mask = atapi_eh_request_sense(dev, sense_buffer, sense_key); in atapi_eh_clear_ua()
3131 if (err_mask) { in atapi_eh_clear_ua()
3133 "UNIT ATTENTION (err_mask=0x%x)\n", err_mask); in atapi_eh_clear_ua()
3167 unsigned int err_mask; in ata_eh_maybe_retry_flush() local
3180 if (qc->err_mask & AC_ERR_DEV) in ata_eh_maybe_retry_flush()
3191 tf.command, qc->err_mask); in ata_eh_maybe_retry_flush()
3193 err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0); in ata_eh_maybe_retry_flush()
3194 if (!err_mask) { in ata_eh_maybe_retry_flush()
3206 err_mask); in ata_eh_maybe_retry_flush()
3210 if (err_mask & AC_ERR_DEV) { in ata_eh_maybe_retry_flush()
3211 qc->err_mask |= AC_ERR_DEV; in ata_eh_maybe_retry_flush()
3246 unsigned int err_mask; in ata_eh_set_lpm() local
3277 err_mask = ata_dev_set_feature(dev, in ata_eh_set_lpm()
3279 if (err_mask && err_mask != AC_ERR_DEV) { in ata_eh_set_lpm()
3282 err_mask); in ata_eh_set_lpm()
3321 err_mask = ata_dev_set_feature(dev, in ata_eh_set_lpm()
3323 if (err_mask && err_mask != AC_ERR_DEV) { in ata_eh_set_lpm()
3326 err_mask); in ata_eh_set_lpm()
3788 if (qc->err_mask) { in ata_eh_finish()