#: 17197 S12/OS9/68000 (OSK)
02-Dec-92 07:19:44
Sb: #MM/1 floppy driver
Fm: Carl Kreider 71076,76
To: all
I just solved a nagging 'problem' with the MM/1 floppy driver. In some
cases, a timeout on an access to an empty drive would prevent access to
any drive until reset.
From my distributed documentation:
> Currently there are only two valid choices for PD_Trys, 0 and 1, with the
> same meanings as in section B-2.
Perhaps some of you didn't get this file, perhaps you didn't get the
descriptors I provided, perhaps you think you know better. In any case,
take the above as gospel. It will fix the 'problem'.
For the techies, this is because the new MW convention is to treat the
pd_trys field as a bit field. If it is 0, the default pattern (0xb6) is
used. If it is 1, retry is disabled. Otherwise, it is a user specified
bit pattern. In C, the algorithm looks like this:
if ((x = pd_trys) == 0)
x = 0xb6;
do {
if (disk_op() == OK)
break;
if ((x & 1) == 0)
restore();
} while ((x >> 1) != 0);
The shift is actually done first so that it will not restore on values
for pd_trys of 1, 3, 7, 15, 31, 63, 127, or 255. Without a restore, it
will never recover from the error.
Carl
There is 1 Reply.
|