aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-01-27 02:36:14 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-27 02:36:14 -0500
commit7dfb869c8e45e5863534f38fdac990829b22964a (patch)
treef36bbdba46b022356d05ac26d5073e395d2f8abd /drivers/scsi
parent628e386e27674906326455f01d87878a5f0cbce7 (diff)
parent11a56d2439259892319df81cf1582687d7e7fde5 (diff)
Merge branch 'tmp'
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ahci.c4
-rw-r--r--drivers/scsi/libata-core.c26
-rw-r--r--drivers/scsi/libata-scsi.c6
-rw-r--r--drivers/scsi/sata_mv.c2
-rw-r--r--drivers/scsi/sata_sil24.c2
5 files changed, 20 insertions, 20 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 30676b0eb36..bb3686ae188 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -680,7 +680,7 @@ static void ahci_eng_timeout(struct ata_port *ap)
* not being called from the SCSI EH.
*/
qc->scsidone = scsi_finish_command;
- qc->err_mask |= AC_ERR_OTHER;
+ qc->err_mask |= AC_ERR_TIMEOUT;
ata_qc_complete(qc);
}
@@ -721,7 +721,7 @@ static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc)
ahci_restart_port(ap, status);
if (qc) {
- qc->err_mask |= AC_ERR_OTHER;
+ qc->err_mask |= err_mask;
ata_qc_complete(qc);
}
}
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 20bccabb54f..5b6bc365506 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1126,8 +1126,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);
@@ -1141,7 +1143,7 @@ ata_exec_internal(struct ata_port *ap, struct ata_device *dev,
* spurious interrupt. We can live with that.
*/
if (qc->flags & ATA_QCFLAG_ACTIVE) {
- qc->err_mask = AC_ERR_OTHER;
+ qc->err_mask = AC_ERR_TIMEOUT;
ata_qc_complete(qc);
printk(KERN_WARNING "ata%u: qc timeout (cmd 0x%x)\n",
ap->id, command);
@@ -1156,11 +1158,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;
}
/**
@@ -2929,7 +2926,7 @@ static unsigned long ata_pio_poll(struct ata_port *ap)
status = ata_chk_status(ap);
if (status & ATA_BUSY) {
if (time_after(jiffies, ap->pio_task_timeout)) {
- qc->err_mask |= AC_ERR_ATA_BUS;
+ qc->err_mask |= AC_ERR_TIMEOUT;
ap->hsm_task_state = HSM_ST_TMOUT;
return 0;
}
@@ -3474,7 +3471,7 @@ static void atapi_pio_bytes(struct ata_queued_cmd *qc)
err_out:
printk(KERN_INFO "ata%u: dev %u: ATAPI check failed\n",
ap->id, dev->devno);
- qc->err_mask |= AC_ERR_ATA_BUS;
+ qc->err_mask |= AC_ERR_HSM;
ap->hsm_task_state = HSM_ST_ERR;
}
@@ -3532,7 +3529,7 @@ static void ata_pio_block(struct ata_port *ap)
} else {
/* handle BSY=0, DRQ=0 as error */
if ((status & ATA_DRQ) == 0) {
- qc->err_mask |= AC_ERR_ATA_BUS;
+ qc->err_mask |= AC_ERR_HSM;
ap->hsm_task_state = HSM_ST_ERR;
return;
}
@@ -3873,10 +3870,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;
@@ -3889,7 +3886,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;
}
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index ce3fe928a38..c496309f691 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -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;
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c
index e9bee1210c2..68d17791896 100644
--- a/drivers/scsi/sata_mv.c
+++ b/drivers/scsi/sata_mv.c
@@ -1865,7 +1865,7 @@ static void mv_eng_timeout(struct ata_port *ap)
*/
spin_lock_irqsave(&ap->host_set->lock, flags);
qc->scsidone = scsi_finish_command;
- qc->err_mask |= AC_ERR_OTHER;
+ qc->err_mask |= AC_ERR_TIMEOUT;
ata_qc_complete(qc);
spin_unlock_irqrestore(&ap->host_set->lock, flags);
}
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c
index 923130185a9..fb59012b9fb 100644
--- a/drivers/scsi/sata_sil24.c
+++ b/drivers/scsi/sata_sil24.c
@@ -653,7 +653,7 @@ static void sil24_eng_timeout(struct ata_port *ap)
*/
printk(KERN_ERR "ata%u: command timeout\n", ap->id);
qc->scsidone = scsi_finish_command;
- qc->err_mask |= AC_ERR_OTHER;
+ qc->err_mask |= AC_ERR_TIMEOUT;
ata_qc_complete(qc);
sil24_reset_controller(ap);