Date: Mon, 25 Jan 1999 18:03:15 +1100 From: Bruce Evans <bde@zeta.org.au> To: bde@zeta.org.au, grog@lemis.com, lcremean@tidalwave.net Cc: current@FreeBSD.ORG, dillon@apollo.backplane.com Subject: Re: IDE DMA works, I'll be a... Message-ID: <199901250703.SAA29745@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> 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. 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. Bruce 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?199901250703.SAA29745>