diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2001-03-25 18:25:01 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2001-03-25 18:25:01 +0000 |
commit | 57900b6f76449c7d7b5c35e4aee38b36776bc3d8 (patch) | |
tree | e31b934b6b87b8ce2e0ae2a2bff9b5a0245d7f77 /sys/dev | |
parent | 11f43eb75fd5268b3b0f492a16b518d6f3a1c582 (diff) |
Missing irqack, cleanup DMA error handling
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ata/ata_wdc.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/dev/ata/ata_wdc.c b/sys/dev/ata/ata_wdc.c index 2b5101fd9c4..31a93134f43 100644 --- a/sys/dev/ata/ata_wdc.c +++ b/sys/dev/ata/ata_wdc.c @@ -281,7 +281,6 @@ again: ata_bio->nbytes = xfer->c_bcount; cmd = (ata_bio->flags & ATA_READ) ? WDCC_READDMA : WDCC_WRITEDMA; - nblks = ata_bio->nblks; /* Init the DMA channel. */ if ((*chp->wdc->dma_init)(chp->wdc->dma_arg, chp->channel, xfer->drive, @@ -514,7 +513,6 @@ end: return 1; } - void wdc_ata_bio_kill_xfer(chp, xfer) struct channel_softc *chp; @@ -541,8 +539,6 @@ wdc_ata_bio_done(chp, xfer) struct wdc_xfer *xfer; { struct ata_bio *ata_bio = xfer->cmd; - int drive = xfer->drive; - struct ata_drive_datas *drvp = &chp->ch_drive[drive]; WDCDEBUG_PRINT(("wdc_ata_bio_done %s:%d:%d: flags 0x%x\n", chp->wdc->sc_dev.dv_xname, chp->channel, xfer->drive, @@ -550,11 +546,6 @@ wdc_ata_bio_done(chp, xfer) DEBUG_XFERS); timeout_del(&chp->ch_timo); - if (ata_bio->error == NOERROR) - drvp->n_dmaerrs = 0; - else if (drvp->n_dmaerrs >= NERRS_MAX) { - wdc_downgrade_mode(drvp); - } /* feed back residual bcount to our caller */ ata_bio->bcount = xfer->c_bcount; @@ -599,6 +590,8 @@ again: errstring = "recal"; if (wdcwait(chp, WDCS_DRDY, WDCS_DRDY, delay)) goto timeout; + if (chp->wdc->cap & WDC_CAPABILITY_IRQACK) + chp->wdc->irqack(chp); if (chp->ch_status & (WDCS_ERR | WDCS_DWF)) goto error; /* fall through */ |