Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223602
b: refs/heads/master
c: f08dc1a
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Dec 24, 2010
1 parent f24be61 commit d2ef661
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 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: 869934adfc8391ec2e198ed81260e1a42cd9c575
refs/heads/master: f08dc1ac6b15c681f4643d8da1700e06c3855608
24 changes: 15 additions & 9 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4807,9 +4807,6 @@ static void ata_verify_xfer(struct ata_queued_cmd *qc)
{
struct ata_device *dev = qc->dev;

if (ata_tag_internal(qc->tag))
return;

if (ata_is_nodata(qc->tf.protocol))
return;

Expand Down Expand Up @@ -4858,14 +4855,23 @@ void ata_qc_complete(struct ata_queued_cmd *qc)
if (unlikely(qc->err_mask))
qc->flags |= ATA_QCFLAG_FAILED;

if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
/* always fill result TF for failed qc */
/*
* Finish internal commands without any further processing
* and always with the result TF filled.
*/
if (unlikely(ata_tag_internal(qc->tag))) {
fill_result_tf(qc);
__ata_qc_complete(qc);
return;
}

if (!ata_tag_internal(qc->tag))
ata_qc_schedule_eh(qc);
else
__ata_qc_complete(qc);
/*
* Non-internal qc has failed. Fill the result TF and
* summon EH.
*/
if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
fill_result_tf(qc);
ata_qc_schedule_eh(qc);
return;
}

Expand Down

0 comments on commit d2ef661

Please sign in to comment.