Subject: DQ656 fix
To: None <port-vax@NetBSD.ORG>
From: Jeffrey D. McMahill <jma7+@andrew.cmu.edu>
List: port-vax
Date: 12/06/1997 17:21:10
As mentioned on the web page, the DQ656 hard drive controller doesn't
quite work due to buggy hardware. The problem seems to be that it
reports the sectors per cylinder to be 0. The MSCP code currently
checks for this case, but sets ra_isafloppy. From line 516 of mscp_disk.c:
if (dl->d_secpercyl != 0)
dl->d_ncylinders = dl->d_secperunit/dl->d_secpercyl;
else
ra->ra_isafloppy = 1;
As a test, I changed the last line to:
if (dl->d_secperunit <= 4096) ra->ra_isafloppy = 1;
In other words, if this disk is less than 4096 sectors (2MB), call it a
floppy, else assume it is (buggy) hard drive. This seems to work
just fine, although it doesn't really seem to be the best solution...
Is there perhaps some other way to determine if it is a floppy?
-Jeff