Help wanted re formatting USB floppies.

From: Bruce M Simpson <bms_at_spc.org>
Date: Wed, 6 Oct 2004 02:21:56 -0700
I am working on a hack to allow us to format floppies in USB drives.
Could willing volunteers do the following:

1) Apply the attached patch to your umass driver, rebuild, and reboot.
   The patch is relative to /usr i.e. above the src directory, and is
   against RELENG_5.

2) Plug in your USB floppy drive.

3) Repeat the following command with the new driver loaded, for various
   combinations of:
     a) No disk in the drive
     b) Unformatted disk in the drive
     c) Formatted disk in the drive (even better if you can do this
        for multiple combinations of 360KB, 720KB, 1.44MB)
   and report the results back to me:

	camcontrol cmd ${DEVNAME} -v \
	-c "23 00 00 00 00 00 00 00 20 00 00 00" \
	-i 0x20 "{} *i3 {Len} i1 {Blocks} i4 {} *b6 {Code} b2 {Blocklen} i3"

where ${DEVNAME} is the device name of your USB floppy (often da0 on laptops).
You should get 4 numbers returned from this command, probably along the lines
of: 32 2880 2 512.

4) Please do report the kind of disk, if you know what it is, that you got the
   result from, and the make/model of your USB floppy which you should be
   able to see from "usbdevs -v" as root.

Now I have a feeling what Windows does, when it encounters a USB floppy
device, is to use the READ_FORMAT_CAPACITY SCSI command to determine
which format(s) such a device supports; then read the flexible disk
geometry page to determine 

Regards,
BMS

P.S. I did hack a diff for forcing camcontrol(8) to use a MODE_SENSE_10 or
MODE_SELECT_10 but it doesn't appear to do the right thing... the pages
have different layouts/sizes, so e.g. "Data bytes per sector" is actually
reported as "Starting cylinder-write precompensation". Could someone
more knowledgable with CAM or SCSI than I suggest a better way of looking
at the Flexible Disk Page?

Received on Wed Oct 06 2004 - 07:22:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:15 UTC