Lines Matching refs:err_mask
373 unsigned int err_mask)
377 WARN_ON(!err_mask);
384 ent->err_mask = err_mask;
392 if (ent->err_mask)
407 if (!ent->err_mask)
631 qc->err_mask |= AC_ERR_TIMEOUT;
858 qc->err_mask |= AC_ERR_TIMEOUT;
1189 * due to unrelated failures (qc->err_mask is zero).
1194 if (!qc->err_mask)
1327 * ata_err_string - convert err_mask to descriptive string
1328 * @err_mask: error mask to convert to string
1330 * Convert @err_mask to descriptive string. Errors are
1338 * Descriptive string for @err_mask
1340 static const char *ata_err_string(unsigned int err_mask)
1342 if (err_mask & AC_ERR_HOST_BUS)
1344 if (err_mask & AC_ERR_ATA_BUS)
1346 if (err_mask & AC_ERR_TIMEOUT)
1348 if (err_mask & AC_ERR_HSM)
1350 if (err_mask & AC_ERR_SYSTEM)
1352 if (err_mask & AC_ERR_MEDIA)
1354 if (err_mask & AC_ERR_INVALID)
1356 if (err_mask & AC_ERR_DEV)
1358 if (err_mask & AC_ERR_NCQ)
1360 if (err_mask & AC_ERR_NODEV_HINT)
1382 unsigned int err_mask;
1390 err_mask = ata_exec_internal(dev, &tf, cdb, DMA_NONE, NULL, 0, 0);
1391 if (err_mask == AC_ERR_DEV)
1393 return err_mask;
1414 unsigned int err_mask;
1432 err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0);
1433 /* Ignore err_mask; ATA_ERR might be set */
1445 tf.status, err_mask);
1516 unsigned int err_mask = 0, action = 0;
1520 err_mask |= AC_ERR_ATA_BUS;
1524 err_mask |= AC_ERR_HSM;
1528 err_mask |= AC_ERR_SYSTEM;
1547 ehc->i.err_mask |= err_mask;
1572 qc->err_mask |= AC_ERR_HSM;
1577 qc->err_mask |= AC_ERR_DEV;
1602 qc->err_mask |= AC_ERR_ATA_BUS;
1604 qc->err_mask |= AC_ERR_MEDIA;
1606 qc->err_mask |= AC_ERR_INVALID;
1617 qc->err_mask |= tmp;
1634 qc->err_mask |= AC_ERR_OTHER;
1636 qc->err_mask |= AC_ERR_HSM;
1639 if (qc->err_mask & (AC_ERR_HSM | AC_ERR_TIMEOUT | AC_ERR_ATA_BUS))
1645 static int ata_eh_categorize_error(unsigned int eflags, unsigned int err_mask,
1656 if (err_mask & AC_ERR_ATA_BUS)
1659 if (err_mask & AC_ERR_TIMEOUT)
1663 if (err_mask & AC_ERR_HSM)
1665 if ((err_mask &
1687 cat = ata_eh_categorize_error(ent->eflags, ent->err_mask,
1798 * @err_mask: err_mask of the error
1812 unsigned int eflags, unsigned int err_mask)
1820 if (ata_eh_categorize_error(eflags, err_mask, &xfer_ok) == 0)
1824 ata_ering_record(&dev->ering, eflags, err_mask);
1896 if (qc->err_mask & AC_ERR_MEDIA)
1900 if (qc->err_mask & AC_ERR_INVALID)
1902 return qc->err_mask != AC_ERR_DEV; /* retry if not dev error */
1930 qc->err_mask)
1993 qc->err_mask ||
2046 ehc->i.err_mask |= AC_ERR_OTHER;
2061 if (ehc->i.err_mask & ~AC_ERR_OTHER)
2062 ehc->i.err_mask &= ~AC_ERR_OTHER;
2064 all_err_mask |= ehc->i.err_mask;
2073 /* inherit upper level err_mask */
2074 qc->err_mask |= ehc->i.err_mask;
2080 if (qc->err_mask & AC_ERR_ATA_BUS)
2081 qc->err_mask &= ~(AC_ERR_DEV | AC_ERR_MEDIA |
2085 if (qc->err_mask & ~AC_ERR_OTHER)
2086 qc->err_mask &= ~AC_ERR_OTHER;
2096 qc->err_mask &= ~(AC_ERR_DEV | AC_ERR_OTHER);
2102 all_err_mask |= qc->err_mask;
2136 ap->link.eh_context.i.err_mask |= AC_ERR_TIMEOUT;
2349 qc->err_mask == AC_ERR_DEV))
2351 if (qc->flags & ATA_QCFLAG_SENSE_VALID && !qc->err_mask)
2357 if (!nr_failed && !ehc->i.err_mask)
2371 ehc->i.err_mask, link->sactive, ehc->i.serror,
2378 ehc->i.err_mask, link->sactive, ehc->i.serror,
2413 ata_dev_phys_link(qc->dev) != link || !qc->err_mask)
2485 res->device, qc->err_mask, ata_err_string(qc->err_mask),
2486 qc->err_mask & AC_ERR_NCQ ? " <F>" : "");
3001 unsigned int err_mask;
3018 err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0);
3019 if (park && (err_mask || tf.lbal != 0xc4)) {
3250 unsigned int err_mask;
3252 err_mask = atapi_eh_tur(dev, &sense_key);
3253 if (err_mask != 0 && err_mask != AC_ERR_DEV) {
3255 "TEST_UNIT_READY failed (err_mask=0x%x)\n",
3256 err_mask);
3260 if (!err_mask || sense_key != UNIT_ATTENTION)
3263 err_mask = atapi_eh_request_sense(dev, sense_buffer, sense_key);
3264 if (err_mask) {
3266 "UNIT ATTENTION (err_mask=0x%x)\n", err_mask);
3300 unsigned int err_mask;
3313 if (qc->err_mask & AC_ERR_DEV)
3324 tf.command, qc->err_mask);
3326 err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0);
3327 if (!err_mask) {
3339 err_mask);
3343 if (err_mask & AC_ERR_DEV) {
3344 qc->err_mask |= AC_ERR_DEV;
3379 unsigned int err_mask;
3410 err_mask = ata_dev_set_feature(dev,
3412 if (err_mask && err_mask != AC_ERR_DEV) {
3415 err_mask);
3454 err_mask = ata_dev_set_feature(dev,
3456 if (err_mask && err_mask != AC_ERR_DEV) {
3459 err_mask);
3918 if (qc->err_mask) {
3921 * considering both err_mask and tf.
3925 * Since qc->err_mask is set, ata_eh_qc_retry()
3942 * Since qc->err_mask is not set,