Commit Graph

10 Commits

Author SHA1 Message Date
Philippe Charnier
7f94b8deee Use `The .Nm utility' 2002-04-20 12:27:18 +00:00
Joerg Wunsch
1a6bed6863 Long promised major enhancement set for the floppy disk driver:
. The main device node now supports automatic density selection for
  commonly used media densities.  So you can stuff your 1.44 MB and
  720 KB media into your drive and just access /dev/fd0, no questions
  asked.  It's all that easy, isn't it? :)

. Device density handling has been completely overhauled.  The old way
  of hardwired kernel density knowledge is no longer there.  Instead,
  the kernel now implements 16 subdevices per drive.  The first
  subdevice uses automatic density selection, while the remaining 15
  devices are freely programmable.  They can be assigned an arbitrary
  name of the form /dev/fd[:digit]+.[:digit:]{1,4}, where the second
  number is meant to either implement device names that are mnemonic
  for their raw capacity (as it used to be), or they can alternatively
  be created as "anonymous" devices like fd0.1 through fd0.15,
  depending on the taste of the administrator.  After creating a
  subdevice, it is initialized to the maximal native density of the
  respective drive type, so it needs to be customized for other
  densities by using fdcontrol(8).  Pseudo-partition devices (fd0a
  through fd0h) are still supported as symlinks.

. The old hack to use flags 0x1 to always assume drive 0 were there is
  no longer supported; this is now supposed to be done by wiring the
  devices down from the loader via device flags.  On IA32
  architectures, the first two drives are looked up in the CMOS
  configuration records though.  On PCMCIA (i. e., the Y-E Data
  controller of the Toshiba Libretto), a single drive is always
  assumed.

. Other specialities like disabling the FIFO and not probing the drive
  at boot-time are selected by per-controller or per-drive flags, too.

. Unit attentions (media has been changed) are supposed to be detected
  now; density autoselection only occurs after a unit attention.  (Can
  be turned off by a per-drive flag, this will cause each Fdopen() to
  perform the autoselection.)

. FM floppies can be handled now (on controllers that actually support
  it -- not all do these days).

. Fdopen() can be told to avoid density selection by setting
  O_NONBLOCK; this leaves the descriptor in a half-opened state where
  only a few ioctls are accepted.  This is necessary to run fdformat
  on a device that uses automatic density selection (since you cannot
  autoselect on an unformatted medium, obviously).

. Just differentiate between a plain old NE765 and the enhanced chips,
  but don't try more; the existing code was wrong and only misdetected
  the chips anyway.

BUGS and TODOs:

. All documentation update still needs to be done.

. Formatting not-so-standard format yields unpredictable results; i
  have yet to figure out why this happens.  "Standard" formats like
  720 and 1440 KB do work, however.

. rc scripts are needed to setup device nodes with nonstandard
  densities (like the old /dev/fdN.MMM we used to have).

. Obtaining device flags from the kernel environment doesn't work yet,
  thus currently only drives that are present in (IA32) CMOS are
  really detected.  Someone who knows the odds and ends about device
  flags is needed here, i can't figure out what i'm doing wrong.

. 2.88 MB still needs to be done.
2001-12-15 19:09:04 +00:00
David E. O'Brien
ac24b049cc Remove GCC'isms in CFLAGS. 2001-07-20 04:23:13 +00:00
Ruslan Ermilov
dbc58dea9d mdoc(7) police: use plain text parentheses with plain text blocks. 2001-07-05 07:21:28 +00:00
Joerg Wunsch
65217f13ff Break out the function to print the FDC error information into
fdutil.c so it can be used elsewhere.
2001-07-02 21:21:58 +00:00
Joerg Wunsch
8a5f4c1290 Implement the -I option that uses the FD_READID ioctl in order to read
sector ID fields from a floppy, and display them.
2001-06-26 22:17:21 +00:00
Joerg Wunsch
d137c337ae Part #2 of the <machine/ioctl_fd.h> => <sys/fdcio.h> move: handle the
tools in usr.sbin/fd*.
2001-06-06 06:16:19 +00:00
Joerg Wunsch
ba44060da7 Now that we've got the ne765.h file installed under <dev/ic/>, use it
here instead of the old "/sys/isa/ic/..." hack.  This should fix
building the world for machines that don't have a /sys symlink,
finally.
2001-06-04 21:16:28 +00:00
Joerg Wunsch
f23229f905 Fix man page markup.
Submitted by:	ru
2001-05-16 17:09:00 +00:00
Joerg Wunsch
b97809a770 Initial import of fdread(1), a logical counterpart to fdwrite(1).
Its main purpose is to adapt automatically to the floppy parameters
(in particular the track size for efficient reading), and to allow a
simple error recovery for CRC-errored sectors.  Requires the newly
added fdc(4) options.
2001-05-14 20:22:49 +00:00