Xref: utzoo unix-pc.general:2031 comp.sys.att:5188 Path: utzoo!utgpu!watmath!clyde!att!pacbell!ames!pasteur!ucbvax!hplabs!pyramid!cbmvax!ditto From: ditto@cbmvax.UUCP (Michael "Ford" Ditto) Newsgroups: unix-pc.general,comp.sys.att Subject: Re: Looks like a bug in the 7300 disk driver Summary: that's why they call it the RAW device interface Message-ID: <5660@cbmvax.UUCP> Date: 11 Jan 89 14:38:39 GMT References: <813@ttrde.UUCP> <1360@mtunb.ATT.COM> <513@genesis.ATT.COM> Reply-To: ditto@cbmvax.UUCP (Michael "Ford" Ditto) Organization: Commodore Technology, West Chester, PA Lines: 28 In article <813@ttrde.UUCP> pfales@ttrde.UUCP (Peter Fales) writes: >I have discovered what appears to be a bug in the hard disk device driver >for the unix-pc. In article <513@genesis.ATT.COM> andys@shlepper.ATT.COM (a.b.sherman) writes: >It is *NOT* a feature it's a bug. See below. [ ... ] >Why a CHARACTER device must program its DMA device in BLOCK >multiples escapes me. Regardless of the block size, you can always >tell a DMA controller to transfer X bytes or X words. Well, there's your problem: It's not a CHARACTER device. The /dev/r* devices are RAW device interfaces; that's what the 'r' stands for. When you access any raw device, you have to do it in accordance with that particular device's physical requirements. In the case of the Unix PC's hard disk interface (and those of most other computers), partial block transfers are not possible. The so-called "block" device can be used for more "structured" access (like 4 bytes at a time, etc.). According to the "Unix Implementation" paper by Ken Thompson, the term "character I/O" is "a complete misnomer". -- -=] Ford [=- "The number of Unix installations (In Real Life: Mike Ditto) has grown to 10, with more expected." ford@kenobi.cts.com - The Unix Programmer's Manual, ...!sdcsvax!crash!elgar!ford 2nd Edition, June, 1972. ditto@cbmvax.commodore.com