Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21789
b: refs/heads/master
c: 8e436af
h: refs/heads/master
i:
  21787: ef46f72
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Jan 27, 2006
1 parent 191108c commit 264e258
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 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: 77853bf2b48e34449e826a9ef4df5ea0dbe947f4
refs/heads/master: 8e436af9326f5cc2e07d76505154ffddfb04b485
18 changes: 8 additions & 10 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1125,8 +1125,10 @@ ata_exec_internal(struct ata_port *ap, struct ata_device *dev,
qc->private_data = &wait;
qc->complete_fn = ata_qc_complete_internal;

if (ata_qc_issue(qc))
goto issue_fail;
if (ata_qc_issue(qc)) {
qc->err_mask = AC_ERR_OTHER;
ata_qc_complete(qc);
}

spin_unlock_irqrestore(&ap->host_set->lock, flags);

Expand Down Expand Up @@ -1155,11 +1157,6 @@ ata_exec_internal(struct ata_port *ap, struct ata_device *dev,
ata_qc_free(qc);

return err_mask;

issue_fail:
ata_qc_free(qc);
spin_unlock_irqrestore(&ap->host_set->lock, flags);
return AC_ERR_OTHER;
}

/**
Expand Down Expand Up @@ -3687,10 +3684,10 @@ int ata_qc_issue(struct ata_queued_cmd *qc)
if (ata_should_dma_map(qc)) {
if (qc->flags & ATA_QCFLAG_SG) {
if (ata_sg_setup(qc))
goto err_out;
goto sg_err;
} else if (qc->flags & ATA_QCFLAG_SINGLE) {
if (ata_sg_setup_one(qc))
goto err_out;
goto sg_err;
}
} else {
qc->flags &= ~ATA_QCFLAG_DMAMAP;
Expand All @@ -3703,7 +3700,8 @@ int ata_qc_issue(struct ata_queued_cmd *qc)

return ap->ops->qc_issue(qc);

err_out:
sg_err:
qc->flags &= ~ATA_QCFLAG_DMAMAP;
return -1;
}

Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/scsi/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1322,8 +1322,10 @@ static void ata_scsi_translate(struct ata_port *ap, struct ata_device *dev,
goto early_finish;

/* select device, send command to hardware */
if (ata_qc_issue(qc))
goto err_did;
if (ata_qc_issue(qc)) {
qc->err_mask |= AC_ERR_OTHER;
ata_qc_complete(qc);
}

VPRINTK("EXIT\n");
return;
Expand Down

0 comments on commit 264e258

Please sign in to comment.