Looks like a bug in the 7300 disk driver

a.b.sherman andys at genesis.ATT.COM
Fri Jan 13 08:06:31 AEST 1989


In article <5660 at cbmvax.UUCP> ditto at cbmvax.UUCP (Michael "Ford" Ditto) writes:
>In article <513 at genesis.ATT.COM> andys at 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".


Most of this is true.  However, I disagree with the assertion that
most computers' disk controllers require you to DMA in sector
multiples.  I believe that most or all disk controllers will require
that you begin your I/O *on a sector boundary*, because you can only
seek to a sector.  However, the transfer length is generally given
as a word count, not a sector count.  If you give a word count of 2
on a 16-bit controller, you will get 4 bytes.  I *have* seen the
restriction that the transfer must be a multiple of the word size,
because you DMA words, not bytes, on most busses.
-- 
andy sherman / at&t bell laboratories (medical diagnostic systems)
room 2e-108 / 185 monmouth pkwy / west long branch, nj 07764-1394
(201) 870-7018 / andys at shlepper.ATT.COM
...The views and opinions are my own.  Who else would want them?



More information about the Comp.sys.att mailing list