[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: SunFire v100 / Acer M5229 IDE DMA error workaround
On Wed, Oct 29, 2008 at 02:19:04PM -0500, David Young wrote:
> On Wed, Oct 29, 2008 at 01:57:11PM -0400, Rafal Boni wrote:
> > On Wed, Oct 29, 2008 at 12:22:13PM -0500, David Young wrote:
> > > I may be missing something, but by my reading of a PCI IDE controller
> > > spec that I scrounged off the web, it is important to acknowledge the
> > > interrupt in this way. ISTM that the code should already acknowledge
> > > the interrupt by calling pciide_irqack(). Not so?
> > It probably is; as I said, I noticed that both Free- and OpenBSD do it
> > in both places, so I thought it was worth trying. I'll double-check to
> > make sure this change isn't necessary for things to work with the above
> > change.
> Ok. I'm curious what you find out.
In fact, as I speculated, removing the clearing of the DMA control register
I added to pciide_dma_finish() is wholly un-necessary, and as long as I keep
the test for DMA not being active before stopping it, the driver works just
fine and doesn't report any DMA errors on the system.
> > > Note that this write may not be flushed to the device, and the
> > > interrupt deasserted, until a second call to pciide_dma_finish() calls
> > > bus_space_read_1(, cp->dma_iohs[IDEDMA_CTL], ). In other words, you
> > > may take two interrupts per DMA completed.
> > Hmm, this is a theory that's worth exploring more, however, I would expect
> > the bus_space calls to handle any necessary flushing.
> I'm guessing that they do not. :-(
I'll take Martin's suggestion and test the bus_space_barrier()s next, and
see if I can get rid of the pretend-like-we-didn't-get-an-interrupt-as-long-
as-DMA-is-still-active hack by adding some bus_space_barrier()s.
It's still quite possible the controller really doesn't have two fully
independent channels (or channel register sets), but if that were the
case I'd expect a data corruption and not just harmless / recoverable
Time is an illusion; lunchtime, doubly so. |/\/\| Rafal Boni
-- Ford Prefect |\/\/|
Main Index |
Thread Index |