Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: SunFire v100 / Acer M5229 IDE DMA error workaround
On Thu, Oct 30, 2008 at 03:42:00PM -0400, Rafal Boni wrote:
> > As you guessed, this won't work for ATAPI. For ATAPI devices, we may have
> > short xfers, where we interrupt with the DMA channels still active.
>
> Let me ask a couple potentially stupid questions:
>
> 1. How does one differentiate between a succesfull (completed)
> transfer and short xfer? In other words, is there a status
> bit that indicates short xfer?
A for a successull xfer the DMA active bit will be cleared at interrupt time.
For a short xfer it will not.
> Should IDEDMA_CTL_ERR be
> set in that case?
Not, it's not an error in the sense that all transfered bits have been
successfully transfered from/to device. It just means the device
sent/requested less bytes than what was programmed in the DMA engine.
>
> 2. Presumably we know if this is an ATA or ATAPI DMA request;
> would this be any less bothersome to you if we only did
> this for pure ATA requests? (and obviously made it chip-
> specific).
Yes.
>
> 3. Can you give me a good way to try and provoke short xfers
> with ATAPI?
I think it happens on regular usage of a CD drive (mounting it
for example).
> I suspect that on this controller / machine
> that ATAPI DMA is in general broken, see below:
>
> aceride0:0:0: lost interrupt
> type: atapi tc_bcount: 32 tc_skip: 0
> aceride0:0:0: bus-master DMA error: missing interrupt, status=0x21
> cd0: transfer error, downgrading to Ultra-DMA mode 1
> cd0(aceride0:0:0): using PIO mode 4, Ultra-DMA mode 1 (using DMA)
> aceride0:0:0: lost interrupt
> type: atapi tc_bcount: 32 tc_skip: 0
> aceride0:0:0: bus-master DMA error: missing interrupt, status=0x21
> cd0: transfer error, downgrading to PIO mode 4
> cd0(aceride0:0:0): using PIO mode 4
Quite possible; not all controllers support DMA for non-ATA commands, and
I don't have a definitive list ...
> > > + bus_space_write_1(sc->sc_dma_iot, cp->dma_iohs[IDEDMA_CTL], 0, status);
> > > +
> > > if ((status & IDEDMA_CTL_ERR) != 0 && force != WDC_DMAEND_ABRT_QUIET) {
> > > aprint_error("%s:%d:%d: bus-master DMA error: status=0x%x\n",
> > > device_xname(sc->sc_wdcdev.sc_atac.atac_dev), channel,
> >
> > this is done by pciide_irqack(). It should not be done there.
>
> Yeah, I removed this; it didn't help without the above change and with the
> above change present, the absence/presence of this change didn't make any
> difference.
good.
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index