NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-amd64/42980: satalink DMA fails under amd64

The following reply was made to PR port-amd64/42980; it has been noted by GNATS.

From: Julian Bourne <>
Subject: Re: port-amd64/42980: satalink DMA fails under amd64
Date: Wed, 17 Mar 2010 16:14:34 -0400

 I found this morning that the EINVAL is due
 to boundary (8192) being less than size (65536).
 I've forced the boundary up to the size, as an experiment - metacode:
 (boundary > 0 ? MAX(boundary, size) : boundary)
 and now satalink DMA works.  That correction was made to
 pciide_common.c on line 597 where the
 call uses the constant MAXPHYS (65536) for the
 size of the allocation.
 But it looks to me like the root cause is actually
 here in satalink.c (line 480):
          * Rev. <= 0x01 of the 3112 have a bug that can cause data
          * corruption if DMA transfers cross an 8K boundary.  This is
          * apparently hard to tickle, but we'll go ahead and play it
          * safe.
         if (PCI_REVISION(pa->pa_class) <= 0x01) {
                 sc->sc_dma_maxsegsz = 8192;
                 sc->sc_dma_boundary = 8192;
 Given that the 3512 uses the 3112 code, that's
 probably not applicable; however, it would still
 be good if 3112 DMA worked on AMDs - so what
 should change to make that work?
 Should pciide_common be using
 sc_dma_maxsegsz instead of MAXPHYS?

Home | Main Index | Thread Index | Old Index