Date: Wed, 10 Sep 2008 11:17:58 -0500 From: Nathan Whitehorn <nwhitehorn@freebsd.org> To: Marco Trillo <marcotrillo@gmail.com> Cc: powerpc@freebsd.org Subject: Re: Call for testers: Apple ATA DMA Message-ID: <48C7F336.6060003@freebsd.org> In-Reply-To: <b9c23c9f0809100322n1659cb36oa05acf2f13f3c7e1@mail.gmail.com> References: <48C69864.3010208@freebsd.org> <b9c23c9f0809100322n1659cb36oa05acf2f13f3c7e1@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Marco Trillo wrote: > Hello, > > On Tue, Sep 9, 2008 at 5:38 PM, Nathan Whitehorn <nwhitehorn@freebsd.org> wrote: > >> I just finished a patch to the Apple built-in ATA drivers (ata_macio and >> ata_kauai) that adds DMA support. Due to lack of Kauai hardware (G4 >> machines), it has had only minimal testing, so I'd appreciate some more. >> >> The patch can be found here: >> http://people.freebsd.org/~nwhitehorn/apple-ata-dma.patch >> > > Regarding the Kauai mode setting: > > [snip] > > > The "DMA_CONFIG_REG" register is actually only for UDMA timings, not > for DMA+UDMA. DMA mode timings are ORed with PIO mode timings in the > "PIO_CONFIG_REG" register; as indicated with the masks: 0x00fff000 for > DMA and 0xff000fff for PIO. > > This can be verified by looking at Mac OS X's AppleKauaiATA.cpp > driver, in lines 985 and 986 and others [1] . > > Note that the NetBSD driver also contains this error, and there is a > patch for it on NetBSD PR 39176. OpenBSD driver doesn't have this > problem. > > In addition, to enable UDMA, you need to OR 1 to the UDMA timing mode. > So for example for UDMA2, you need to write 0x00004a61 and not simply > 0x00004a60 . > Thanks! I had just assumed that the NetBSD driver did the right thing, and only have a CD drive attached to a Shasta controller on which to test the Kauai driver. I'll change it to do things the right way. -Nathan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48C7F336.6060003>