Date: Mon, 25 Jan 1999 02:21:02 -0500 From: Lee Cremeans <lee@st-lcremean.tidalwave.net> To: Bruce Evans <bde@zeta.org.au>, grog@lemis.com Cc: current@FreeBSD.ORG, dillon@apollo.backplane.com Subject: Re: IDE DMA works, I'll be a... Message-ID: <19990125022102.A2244@tidalwave.net> In-Reply-To: <199901250703.SAA29745@godzilla.zeta.org.au>; from Bruce Evans on Mon, Jan 25, 1999 at 06:03:15PM %2B1100 References: <199901250703.SAA29745@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 25, 1999 at 06:03:15PM +1100, Bruce Evans wrote: > >> The driver doesn't have any special support for SiS. It uses generic > >> support in some cases, apparently including your case. Recent fixes > >> made it actually initialize DMA on the correct drive, but the > >> initialization in generic_dmainit() is buggy (it assumes multi-word > >> DMA mode 2 but your IDE timing is apparently incompatible with this). > > > >Originally, this was meant so that people with UDMA drives could use them in > >_some_ DMA mode on a chipset without explicit support (on the assumption > >that the controller will be all set up for MWDMA2 or a compatible mode; a > >hack, yes, but when you don't know anything about the controller, you can't > >very well fix it), but the code was written to assume that for _any_ > >DMA-capable drive on a generic controller. The patch I just posted limits > >the force-set to UDMA drives only, like it should have been in the first > >place. > > Not just any DMA-capable drive - only MWDMA2-capable ones. It seems > reasonable to set such drives to MWDMA2 mode. Whether this works depends > more on the controller's initialization than the drive. > > The forced-set (in via_571_dmainit()) doesn't work as well as skipping > the set for a VIA controller here. For the following drives: > > wd0 = SAMSUNG SHD-3212A 406MB, pio_mode() = mwdma_mode() = udmamode() = -1 > wd2 = QUANTUM FIREBALL ST6.4A, pio_mode() = 4, mwdma_mode() = udma_mode() = 2 > > I see the following behaviour: > - after pretending that wd0 supports mwdma2 or udma2, DMA mode actually > works (interrupt overhead is significantly reduced). Forcing MWDMA2 or > UDMA2 has no effect on the drive, but breaks the slave cdrom. > - forcing UDMA2 for wd2 has no effect on the drive IIRC, but breaks the > slave cdrom. Normally I don't notice the breakage because I don't > have a slave cdrom on the second controller. > - forcing MWDMA2 for wd2 seems to slightly increase interrupt overhead, > and breaks the slave cdrom. Hm. I did not see this at all here, but I also run with my Seagate being the only thing on the primary controller, and an LS-120 drive as master and a Toshiba 32X CD-ROM as slave on the second controller. What I did see when I got my drive was loads upon loads of interrupt timeout errors, which didn't happen on my previous drive (a JTS C4300-3AF, non UDMA); turning off DMA stopped it, and so did adding the forced MWDMA2 in generic_dmainit. This was months ago, like late last summer/early fall, long before your unit-number fixes were added, and that bogosity is what inspired me to write the Acer support. > Apparently my drives default to their best mode after reset, and UltraDMA > IDE timing works for old drives, and the setting DMA features on master > drives somehow affects slave cdroms. On another system with PIIX1 and > a MWDMA2 drive, I have no problems with the slave cdrom. Probably because PIIX1 can't set the timings for each device individually, and (I would assume) therefore goes with the lowest common denominator for both devices. -- +--------------------------------------------------------------------+ | Lee Cremeans -- Manassas, VA, USA (WakkyMouse on DALnet and WTnet)| | lcremean@tidalwave.net| http://st-lcremean.tidalwave.net/~lee | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990125022102.A2244>