Subject: Re: device names

From: [email-masked] (Werner Almesberger)
Date: Tue, 7 Apr 1992 18:25:58 +0000

Bruce Varney writes:
> Why do you need /dev/fd0.5 and /dev/fd0.3?? Do you have a 3.5" drive and
> a 5.25" drive that are both assigned as drive 0???? Of course not!

Well, I don't like to have more than one name for the same physical
device (or part of one) myself. But there seems to be no way around
it :-(

> The driver will know what to do with the drive based on the major an minor
> numbers. The driver DOESN'T CARE WHAT THE NAME IS!!

Right, the minor numbers should be different. This is what the driver IMHO
should do:

   /dev/fn?.5:   - try to set the drive up to use high density disks
		 - access the disk
		 - if this works, we have a 1.2 MB disk
		 - if it doesn't, switch to low density
		 - try accessing the disk
		 - if it works, it's an old 360k disk
		 - if it doesn't, repeat the whole procedure a few
                   times, then return an error

   /dev/fn?.3:   the same procedure, but the values are 1.44 MB and
		 720k

An auto-detection mechanism for all four formats would be more compli-
cated, slower and unreliable, especially in the presence of media
errors.

Of course it's one of the flaws of this proposal, that it requires
changes to the floppy driver.

- Werner

-- 
   _________________________________________________________________________
  / Werner Almesberger, ETH Zuerich, CH      [email-masked] /
 / IFW A44  Tel. +41 1 254 7213                 [email-masked] /
/_BITNET:_ALMESBER@CZHETH5A__HEPNET/CHADNET:_[20579::]57414::ALMESBERGER_/

---

From: [email-masked] (Bruce Varney)
Date: Wed, 8 Apr 92 17:11:39 EST

In the unforgettable words of  Werner Almesberger:
->
->> The driver will know what to do with the drive based on the major an minor
->> numbers. The driver DOESN'T CARE WHAT THE NAME IS!!
->
->Right, the minor numbers should be different. This is what the driver IMHO
->should do:
->
->An auto-detection mechanism for all four formats would be more compli-
->cated, slower and unreliable, especially in the presence of media
->errors.
->

	But you wouldn't need an autodetection mechanism for all four
formats. The major and minor numbers of the device would tell it what
formats to try. Why do you want to base a driver, located in the kernel
on device names instead of numbers???

			Bruce