Path: utzoo!attcan!uunet!husc6!cmcl2!nrl-cmf!ames!killer!tness7!bellcore!faline!thumper!karn From: karn@thumper.bellcore.com (Phil R. Karn) Newsgroups: comp.protocols.tcp-ip.ibmpc Subject: Re: Western Digital board Summary: DMA on the PC Message-ID: <1075@thumper.bellcore.com> Date: 11 May 88 22:15:21 GMT References: <21523@amdcad.AMD.COM> Organization: Bell Communications Research, Inc Lines: 36 > I was looking at the WD Ethernet literature and they make a big deal > out of NOT having DMA... I agree. I haven't written a driver for the WD board, but I have for the 3C501, which provides a choice of using a "DMA" facility to load the buffer or an auto-incrementing window into the board's buffer memory that is accessed through an I/O port. On the 286, the INS/OUTS instructions really move data -- 4 clock cycles per byte (or word, depending on the instruction), after an initial startup of 5 clocks. Some boards simply can't keep up with this instruction on the faster ATs. Note that even if you use DMA, it's not inherently "faster" than direct I/O when dealing with very fast (bus speed) transfers. Even though the CPU is theoretically able to do other things while the DMA operation runs, it will be slowed by heavy bus contention. And just as it's getting ready to do something else, it'll get the DMA completion interrupt. So I've never seen any reason to bother with the 3C501's "DMA" feature. (Needless to say, it's also harder to use than the I/O copy). Even though the PC/XT lacks INS/OUTS, you can still move data pretty fast through an I/O port with an unwound assembler loop. Or you can replace your 8088 with a V20, which does have INS/OUTS. As far as I'm concerned, the PC might as well not even have DMA. It's a shame, because it would be very useful with medium speed transfers (e.g., with HDLC packet radio interfaces operating in the tens-of-kilobits range). These peripherals are too fast for one-byte-per-interrupt operation, but are not so fast that the processor can easily afford to busy wait with interrupts disabled (to prevent lost data) during each transfer. So once again people will have to circumvent the PC's failings with yet more hardware (buffering, etc) on specially-designed peripheral cards. Sigh. Phil