Merge branch 'upstream'
This commit is contained in:
@@ -2750,7 +2750,7 @@ static int ata_sg_setup(struct ata_queued_cmd *qc)
|
||||
* None. (grabs host lock)
|
||||
*/
|
||||
|
||||
void ata_poll_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat)
|
||||
void ata_poll_qc_complete(struct ata_queued_cmd *qc, unsigned int err_mask)
|
||||
{
|
||||
struct ata_port *ap = qc->ap;
|
||||
unsigned long flags;
|
||||
@@ -2758,7 +2758,7 @@ void ata_poll_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat)
|
||||
spin_lock_irqsave(&ap->host_set->lock, flags);
|
||||
ap->flags &= ~ATA_FLAG_NOINTR;
|
||||
ata_irq_on(ap);
|
||||
ata_qc_complete(qc, drv_stat);
|
||||
ata_qc_complete(qc, err_mask);
|
||||
spin_unlock_irqrestore(&ap->host_set->lock, flags);
|
||||
}
|
||||
|
||||
@@ -2855,7 +2855,7 @@ static int ata_pio_complete (struct ata_port *ap)
|
||||
|
||||
ap->hsm_task_state = HSM_ST_IDLE;
|
||||
|
||||
ata_poll_qc_complete(qc, drv_stat);
|
||||
ata_poll_qc_complete(qc, 0);
|
||||
|
||||
/* another command may start at this point */
|
||||
|
||||
@@ -3223,18 +3223,15 @@ static void ata_pio_block(struct ata_port *ap)
|
||||
static void ata_pio_error(struct ata_port *ap)
|
||||
{
|
||||
struct ata_queued_cmd *qc;
|
||||
u8 drv_stat;
|
||||
|
||||
printk(KERN_WARNING "ata%u: PIO error\n", ap->id);
|
||||
|
||||
qc = ata_qc_from_tag(ap, ap->active_tag);
|
||||
assert(qc != NULL);
|
||||
|
||||
drv_stat = ata_chk_status(ap);
|
||||
printk(KERN_WARNING "ata%u: PIO error, drv_stat 0x%x\n",
|
||||
ap->id, drv_stat);
|
||||
|
||||
ap->hsm_task_state = HSM_ST_IDLE;
|
||||
|
||||
ata_poll_qc_complete(qc, drv_stat | ATA_ERR);
|
||||
ata_poll_qc_complete(qc, AC_ERR_ATA_BUS);
|
||||
}
|
||||
|
||||
static void ata_pio_task(void *_data)
|
||||
@@ -3357,7 +3354,7 @@ static void ata_qc_timeout(struct ata_queued_cmd *qc)
|
||||
ap->id, qc->tf.command, drv_stat, host_stat);
|
||||
|
||||
/* complete taskfile transaction */
|
||||
ata_qc_complete(qc, drv_stat);
|
||||
ata_qc_complete(qc, ac_err_mask(drv_stat));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -3462,7 +3459,7 @@ struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap,
|
||||
return qc;
|
||||
}
|
||||
|
||||
int ata_qc_complete_noop(struct ata_queued_cmd *qc, u8 drv_stat)
|
||||
int ata_qc_complete_noop(struct ata_queued_cmd *qc, unsigned int err_mask)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -3521,7 +3518,7 @@ void ata_qc_free(struct ata_queued_cmd *qc)
|
||||
* spin_lock_irqsave(host_set lock)
|
||||
*/
|
||||
|
||||
void ata_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat)
|
||||
void ata_qc_complete(struct ata_queued_cmd *qc, unsigned int err_mask)
|
||||
{
|
||||
int rc;
|
||||
|
||||
@@ -3538,7 +3535,7 @@ void ata_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat)
|
||||
qc->flags &= ~ATA_QCFLAG_ACTIVE;
|
||||
|
||||
/* call completion callback */
|
||||
rc = qc->complete_fn(qc, drv_stat);
|
||||
rc = qc->complete_fn(qc, err_mask);
|
||||
|
||||
/* if callback indicates not to complete command (non-zero),
|
||||
* return immediately
|
||||
@@ -3976,7 +3973,7 @@ inline unsigned int ata_host_intr (struct ata_port *ap,
|
||||
ap->ops->irq_clear(ap);
|
||||
|
||||
/* complete taskfile transaction */
|
||||
ata_qc_complete(qc, status);
|
||||
ata_qc_complete(qc, ac_err_mask(status));
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -4071,7 +4068,7 @@ static void atapi_packet_task(void *_data)
|
||||
/* sleep-wait for BSY to clear */
|
||||
DPRINTK("busy wait\n");
|
||||
if (ata_busy_sleep(ap, ATA_TMOUT_CDB_QUICK, ATA_TMOUT_CDB))
|
||||
goto err_out;
|
||||
goto err_out_status;
|
||||
|
||||
/* make sure DRQ is set */
|
||||
status = ata_chk_status(ap);
|
||||
@@ -4108,8 +4105,10 @@ static void atapi_packet_task(void *_data)
|
||||
|
||||
return;
|
||||
|
||||
err_out_status:
|
||||
status = ata_chk_status(ap);
|
||||
err_out:
|
||||
ata_poll_qc_complete(qc, ATA_ERR);
|
||||
ata_poll_qc_complete(qc, __ac_err_mask(status));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user