Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42111
b: refs/heads/master
c: 39599a5
h: refs/heads/master
i:
  42109: bc8c6f8
  42107: dad53ec
  42103: 54c57a0
  42095: 896420a
  42079: 23c15fb
  42047: 51fb840
  41983: 132395c
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Dec 2, 2006
1 parent 03a1a87 commit 7dad468
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 61c0596c5fbef99df5518ae449be4ab49a2c2233
refs/heads/master: 39599a5334decc2669ba794fb0ccd2b112ef1ba4
14 changes: 11 additions & 3 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4536,6 +4536,14 @@ void __ata_qc_complete(struct ata_queued_cmd *qc)
qc->complete_fn(qc);
}

static void fill_result_tf(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;

ap->ops->tf_read(ap, &qc->result_tf);
qc->result_tf.flags = qc->tf.flags;
}

/**
* ata_qc_complete - Complete an active ATA command
* @qc: Command to complete
Expand Down Expand Up @@ -4573,15 +4581,15 @@ void ata_qc_complete(struct ata_queued_cmd *qc)
if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
if (!ata_tag_internal(qc->tag)) {
/* always fill result TF for failed qc */
ap->ops->tf_read(ap, &qc->result_tf);
fill_result_tf(qc);
ata_qc_schedule_eh(qc);
return;
}
}

/* read result TF if requested */
if (qc->flags & ATA_QCFLAG_RESULT_TF)
ap->ops->tf_read(ap, &qc->result_tf);
fill_result_tf(qc);

__ata_qc_complete(qc);
} else {
Expand All @@ -4590,7 +4598,7 @@ void ata_qc_complete(struct ata_queued_cmd *qc)

/* read result TF if failed or requested */
if (qc->err_mask || qc->flags & ATA_QCFLAG_RESULT_TF)
ap->ops->tf_read(ap, &qc->result_tf);
fill_result_tf(qc);

__ata_qc_complete(qc);
}
Expand Down

0 comments on commit 7dad468

Please sign in to comment.