libata-eh.c (b8e162f9e7e2da6e823a4984d6aa0523e278babf) libata-eh.c (e06abcc68cb555377efd5aa781c014d3d68498b6)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * libata-eh.c - libata error handling
4 *
5 * Copyright 2006 Tejun Heo <htejun@gmail.com>
6 *
7 * libata documentation is available via 'make {ps|pdf}docs',
8 * as Documentation/driver-api/libata.rst

--- 1585 unchanged lines hidden (view full) ---

1594 if (!tmp)
1595 qc->flags |= ATA_QCFLAG_SENSE_VALID;
1596 else
1597 qc->err_mask |= tmp;
1598 }
1599 }
1600
1601 if (qc->flags & ATA_QCFLAG_SENSE_VALID) {
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * libata-eh.c - libata error handling
4 *
5 * Copyright 2006 Tejun Heo <htejun@gmail.com>
6 *
7 * libata documentation is available via 'make {ps|pdf}docs',
8 * as Documentation/driver-api/libata.rst

--- 1585 unchanged lines hidden (view full) ---

1594 if (!tmp)
1595 qc->flags |= ATA_QCFLAG_SENSE_VALID;
1596 else
1597 qc->err_mask |= tmp;
1598 }
1599 }
1600
1601 if (qc->flags & ATA_QCFLAG_SENSE_VALID) {
1602 enum scsi_disposition ret = scsi_check_sense(qc->scsicmd);
1602 int ret = scsi_check_sense(qc->scsicmd);
1603 /*
1604 * SUCCESS here means that the sense code could be
1605 * evaluated and should be passed to the upper layers
1606 * for correct evaluation.
1607 * FAILED means the sense code could not be interpreted
1608 * and the device would need to be reset.
1609 * NEEDS_RETRY and ADD_TO_MLQUEUE means that the
1610 * command would need to be retried.

--- 997 unchanged lines hidden (view full) ---

2608 ata_link_info(slave, "hard resetting link\n");
2609
2610 ata_eh_about_to_do(slave, NULL, ATA_EH_RESET);
2611 tmp = ata_do_reset(slave, reset, classes, deadline,
2612 false);
2613 switch (tmp) {
2614 case -EAGAIN:
2615 rc = -EAGAIN;
1603 /*
1604 * SUCCESS here means that the sense code could be
1605 * evaluated and should be passed to the upper layers
1606 * for correct evaluation.
1607 * FAILED means the sense code could not be interpreted
1608 * and the device would need to be reset.
1609 * NEEDS_RETRY and ADD_TO_MLQUEUE means that the
1610 * command would need to be retried.

--- 997 unchanged lines hidden (view full) ---

2608 ata_link_info(slave, "hard resetting link\n");
2609
2610 ata_eh_about_to_do(slave, NULL, ATA_EH_RESET);
2611 tmp = ata_do_reset(slave, reset, classes, deadline,
2612 false);
2613 switch (tmp) {
2614 case -EAGAIN:
2615 rc = -EAGAIN;
2616 break;
2616 case 0:
2617 break;
2618 default:
2619 failed_link = slave;
2620 rc = tmp;
2621 goto fail;
2622 }
2623 }

--- 1353 unchanged lines hidden ---
2617 case 0:
2618 break;
2619 default:
2620 failed_link = slave;
2621 rc = tmp;
2622 goto fail;
2623 }
2624 }

--- 1353 unchanged lines hidden ---