RX50 on RQDX3 on 2.11BSD

Steven M. Schultz sms at moe.2bsd.com
Wed Jun 7 08:45:02 AEST 2000


Hi --

	Wow, quite a bit of interest in 2.11 these days - I suppose I should
	get back into it (too many other projects, etc and so little time ;))

> From: "Jason T. Miller" <jasomill at shaffstall.com>
> Does anyone have experience using the RX50 floppy drive under 2.11BSD? I
> patched my FreeBSD kernel to handle RX50-format (80 cyl / 1 hd / 10 sec)

	Not for eons - the RX50 I had was so flakey (well, actually it finally
	got to the point it was declared broke) it was replaced with a 1.2mb
	5.25" Teac "PC" drive).

> 	$ dd if=testrx50.img of=/dev/ra12a
> 	800+0 records in
> 	800+0 records out
> 	$ dd if=/dev/ra12a of=test
> 	800+0 records in
> 	800+0 records out
> 	$ diff testrx50.img test
> 	Binary files testrx50.img and test differ
> 
> WHOA! This shouldn't happen, should it? In my late-night screwings-around,

	No, in fact I'd have expected an error on the first 'dd'.

	Using 'cmp -l' will show where the differences are.   If they are only
	in the first couple sectors but the rest compare ok then I think I
	know what the problem might be.

	I'd also, not that it would make any difference (I hope), use the
	raw device for speed purposes (RX50 is slow enough as it is ;)):

		dd if=testrx50.img of=/dev/rra12a

>   - The '11/2.11BSD never seem to write the first two sectors, although
> no error is returned to this effect; in fact, the data in sector three is
> from offset 1024 in the input data (0x0003 in the above example). Is this
> due to disk label support or something? The raw (character) device reports
> itself as read-only, even for root.

	Indeed it is related to disklabel support.  In the face of a missing
	or corrupt disklabel the kernel is supposed (and I think it is in this
	case) synthesize a label that spans the entire disk with the 'a'
	partition. 

	I do not know why the first two sectors are not being written if the
	synthetic label is being used.  It's probably a bug having to deal
	with not setting the "enable write for label area" when the fake label
	is being used.  Sigh.   I have a floppy drive on my 11/73 - I'll try
	to find time and play around before going on vacation in a couple weeks.

	The first sector should have been written (that's the boot block), the
	label sector is the 2nd sector and that's 'write protected' unless
	either an ioctl() is done or the 'disklabel' program is used to
	un-writeprotect it.

	Try doing a 

		disklabel -W /dev/rra12a

	to enable writing the label sector.  If that works then the problem
	lies in not setting that bit when a corrupt/missing label is seen.

	Normally this isn't necessary since filesystems are created on disks
	and they're not treated as raw output bitcontainers.  Floppies are
	special in that 'raw' device usage is more common.

> Finally, I noticed there is no floppy-specific code in the MSCP driver, so
> all the gory details of floppy control (along with the gory details of the
> above) must be dealt with by the RQDX3. Anybody got documentation for this

	Quite so.  To the driver the RX50 is just another MSCP disk.  

	Oh, for debugging purposes you can enable more or all of the MSCP
	messages with the 'sysctl' command:

		sysctl -w machdep.mscp.printf=X

		where X is a bitmask (at present only the first 4 bits are in
		use).   Setting X to 15 will enable every printf the driver
		has.  

 * Bit 0 = print/log all non successful response packets
 * Bit 1 = print/log datagram arrival
 * Bit 2 = print status of all response packets _except_ for datagrams
 * Bit 3 = enable debug/log statements not covered by one of the above

	See the pdpuba/ra.c sources for more details, and what printf/log
	statements are covered by which bit.

	Steven Schultz
	sms at moe.2bsd.com


Received: (from major at localhost)
	by minnie.cs.adfa.edu.au (8.9.3/8.9.3) id JAA17936
	for pups-liszt; Wed, 7 Jun 2000 09:41:44 +1000 (EST)
	(envelope-from owner-pups at minnie.cs.adfa.edu.au)


More information about the TUHS mailing list