Detecting 'floppy' like umass devices

Daniel O'Connor doconnor at gsoft.com.au
Tue Apr 20 21:00:31 PDT 2004


On Tue, 20 Apr 2004 18:28, Bernd Walter wrote:
> > I am wondering if there is any way of telling if a given umass device is
> > a floppy drive (or wants to look like one) - eg I have a USB FDD which
> > I imagine should fall into the same basket.
>
> What do do you mean with "wants to look like one".
> In which way does a floppy look different from other direct access
> drives?
> They all read and store direct access data.

Partially to handle things like fdformat, and density selection, but also from 
a user point of view, ie it would be nice if it appeared as /dev/fdX.

IMHO it's not obvious (and dangerous) to tell mtools that a: = /dev/da0 but 
that's what I have to do if I want to use my USB FDD with it.

> > I note that you get wacky values from fdisk when you try and read
> > partition table from them too..
> >
> > On another note my USB floppy drive does 2k/sec in FreeBSD :(
>
> Sound like another instance of msdosfs does no clustering and drive
> is too stupid to get speed without.
> IIRC there were some work on this point, but I don't now the state.
> Check the speed with dd and different blocksizes.

This IS with dd :)

I did a few tests..
Block Size | Speed
===========+===========
 0.5k      |  2.2k/sec
 1  k      |  4.4k/sec
 2  k      |  8.0k/sec
 4  k      | 12.6k/sec
 8  k      | 17.7k/sec
 16 k      | 21.8k/sec
 32 k      | 23.9k/sec
 64 k      | 26.2k/sec

Bleh :(

> > I have a Dell Inspiron 8600 with a
> > uhci0: <Intel 82801DB (ICH4) USB controller USB-A> port 0xbf80-0xbf9f irq
> > 11 at device 29.0 on pci0
> >
> > I have tried a USB flash card reader which gets ~500k/sec.
>
> If a drive doesn't preread blocks then each access has to wait for the
> media - undoubly flash has a faster access time than floppies...

Yeah, I just meant that "it's not my USB port" :)

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 9A8C 569F 685A D928 5140  AE4B 319B 41F4 5D17 FDD5



More information about the freebsd-hackers mailing list