summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/libata-eh.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 05df7ea6954a..29ec0f7fef4a 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1230,9 +1230,10 @@ static void __ata_eh_qc_complete(struct ata_queued_cmd *qc)
* Indicate to the mid and upper layers that an ATA command has
* completed. To be used from EH.
*/
-void ata_eh_qc_complete(struct ata_queued_cmd *qc)
+static void ata_eh_qc_complete(struct ata_queued_cmd *qc)
{
struct scsi_cmnd *scmd = qc->scsicmd;
+
scmd->retries = scmd->allowed;
__ata_eh_qc_complete(qc);
}
@@ -1248,9 +1249,10 @@ void ata_eh_qc_complete(struct ata_queued_cmd *qc)
* scmd->allowed is incremented for commands which get retried
* due to unrelated failures (qc->err_mask is zero).
*/
-void ata_eh_qc_retry(struct ata_queued_cmd *qc)
+static void ata_eh_qc_retry(struct ata_queued_cmd *qc)
{
struct scsi_cmnd *scmd = qc->scsicmd;
+
if (!qc->err_mask)
scmd->allowed++;
__ata_eh_qc_complete(qc);