problems with magtape driver between Sun OS 3.x and 4.x

Steve Dyer dyer at ursa-major.spdcc.com
Sat Apr 7 02:04:53 AEST 1990


In article <2337 at ursa-major.SPDCC.COM> dyer at ursa-major.spdcc.COM (Steve Dyer) writes:
>I have written a magtape driver for a Multibus controller board which runs on a
>Sun 3 using a Multibus/VME converter board.  The device driver runs just fine
>under Sun OS 3.x, and I believed that it worked OK under Sun OS 4.x...However,
>I now am getting some reports that the system will crash on certain programs,
>but not all.  The crash is always "panic: hat_unload - pmg not kept".

The problem appears to be a bug in Sun OS 4.x's support for the MDR_SWAB
flag in the flags field of the "struct mb_driver" data structure.
MDR_SWAB is an indication to mbgo() that data in a buffer must have its
bytes swapped before and after DMA data transfers.  These days, most
Multibus controllers support such byteswapping on the controller itself,
eliminating the need for such support in software.  I can only guess that
the dwindling need for this feature led to its being poorly tested before
being part of the Sun OS 4 kernel.  Luckily, I am told by my controller
manufacturer (two years later!) that the controller DOES support
byteswapped transfers, so I think I can avoid the problem entirely.

Steve Dyer dyer at ursa-major.spdcc.com 
{ima,harvard,rayssd,linus,m2c}!spdcc!dyer 
dyer at arktouros.mit.edu, dyer at hstbme.mit.edu



More information about the Comp.sys.sun mailing list