Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15855
b: refs/heads/master
c: 1c84898
h: refs/heads/master
i:
  15853: db19154
  15851: e9966bc
  15847: b3878a4
  15839: b93263b
v: v3
  • Loading branch information
Albert Lee authored and Jeff Garzik committed Dec 6, 2005
1 parent 16686a2 commit e3e6309
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 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: a22e2eb0710798009b8e696ae911aef745089dd6
refs/heads/master: 1c8489840e6b080e810e588423c1b6dd5913cf18
10 changes: 9 additions & 1 deletion trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2830,6 +2830,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;
ap->hsm_task_state = HSM_ST_TMOUT;
return 0;
}
Expand Down Expand Up @@ -2880,6 +2881,7 @@ static int ata_pio_complete (struct ata_port *ap)

drv_stat = ata_wait_idle(ap);
if (!ata_ok(drv_stat)) {
qc->err_mask |= __ac_err_mask(drv_stat);
ap->hsm_task_state = HSM_ST_ERR;
return 0;
}
Expand Down Expand Up @@ -3195,6 +3197,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;
ap->hsm_task_state = HSM_ST_ERR;
}

Expand Down Expand Up @@ -3244,6 +3247,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;
ap->hsm_task_state = HSM_ST_ERR;
return;
}
Expand All @@ -3261,9 +3265,13 @@ static void ata_pio_error(struct ata_port *ap)
qc = ata_qc_from_tag(ap, ap->active_tag);
assert(qc != NULL);

/* make sure qc->err_mask is available to
* know what's wrong and recover
*/
assert(qc->err_mask);

ap->hsm_task_state = HSM_ST_IDLE;

qc->err_mask |= AC_ERR_ATA_BUS;
ata_poll_qc_complete(qc);
}

Expand Down

0 comments on commit e3e6309

Please sign in to comment.