Seth Woolley's Man Viewer

floppycontrol(1) - floppycontrol - floppy driver configuration utility - man 1 floppycontrol

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

floppycontrol(1)                                              floppycontrol(1)



Name
       floppycontrol - floppy driver configuration utility



Note
       This  manpage  has  been automatically generated from fdutils's texinfo
       documentation.  However, this process is only approximative,  and  some
       items,  such as crossreferences, footnotes and indices are lost in(1,8) this
       translation process.  Indeed, this items have no appropriate  represen-
       tation  in(1,8)  the  manpage  format.  Moreover, only the items specific to
       each command have been translated, and the  general  information  about
       fdutils  has  been  dropped  in(1,8)  the  manpage version.  Thus I strongly
       advise you to use the original texinfo doc.

       *      To generate a printable copy from the texinfo doc, run the  fol-
              lowing commands:

                     ./configure; make dvi; dvips fdutils.dvi



       *      To generate a html copy,  run:

                     ./configure; make html

              A       premade       html       can      be      found      at:
              `http://www.tux.org/pub/knaff/fdutils'

       *      To generate an info(1,5,n) copy (browsable  using  emacs'  info(1,5,n)  mode),
              run:

                     ./configure; make info(1,5,n)



       The  texinfo doc looks most pretty when printed or as html.  Indeed, in(1,8)
       the info(1,5,n) version(1,3,5) certain examples are difficult  to  read(2,n,1 builtins)  due  to  the
       quoting conventions used in(1,8) info.

Description
          floppycontrol [-p] [--pollstate] [--printfdstate]
          [-a operation-abort-threshold] [-c read-track-threshold]
          [-r recalibrate-threshold] [-R reset-threshold]
          [-e reporting-threshold] [-f] [-x] [-d drive][-F] [-T]
          [-reset condition] [--debug] [--nodebug] [--messages]
          [--nomessages] [--broken_dcl] [--working_dcl] [--inverted_dcl]
          [--no_inverted_dcl] [--silent_dcl_clear] [--noisy_dcl_clear]
          [-ccmos-type] [-hlt hlt] [-hut hut] [-srt srt] [-o spindown]
          [-u spinup] [-s select-delay] [-rps rotations-per-second]
          [-O spindown-offset] [-track max-tracks] [-timeout seconds]
          [-C check-interval] [-n native-format]
          [-autodetect autodetection-sequence] [-P] [--clrwerror]
          [--printwerror] [-h]



       The floppycontrol program is used to configure the floppy driver.


General Options
       -h
       --help Print a help screen.

       -d drive
       --drive  drive
              Selects   the  drive  to  configure.  The  default  is  drive  0
              (`/dev/fd0').


One time(1,2,n) actions
       The following floppycontrol options don't set(7,n,1 builtins) a  configuration  parame-
       ter,  but  perform a one-time action. They are available to anybody who
       has write(1,2) access(2,5) to the drive

       -f
       --flush
              Flushes (throws away) the dirty  data  buffers  associated  with
              this drive.

       -x
       --eject
              Ejects  the disk out of the drive (Sparc). The dirty buffers are
              first committed to disk before ejecting it. Fails if(3,n) the disk is
              mounted.

       --reset  condition
              Resets  the  FDC  under  condition . Condition may be one of the
              following:

              0      resets the FDC only if(3,n) a reset(1,7,1 tput) is needed anyways,

              1      resets the FDC also if(3,n) a raw(3x,7,8,3x cbreak) command has  been  performed
                     since the last reset(1,7,1 tput), and

              2      resets the FDC unconditionally.

              This  command  may be needed after some failed raw(3x,7,8,3x cbreak) commands (see
              section  fdrawcmd).


       -F
       --formatend
              Issues an end format ioctl. This might be needed after exiting a
              fdformat  in(1,8) an unclean way. superformat is not subject to this.


Printing current settings
       -T
       --type Print out the drive name of a floppy device. This is used by the
              MAKEFLOPPIES  script. The drive name is a letter (describing the
              drive type) followed by the capacity of the format in(1,8) bytes. The
              letter is E for 3.5 ED drives, H for 3.5 HD drives, D for 3.5 DD
              drives, h for 5.25 HD drives and d for 5.25 DD drives. The drive
              type  letter corresponds to the oldest drive type supporting the
              format of this device node (not  necessarily  the  type  of  the
              drive  refered  by  this  node.)   For  the generic format nodes
              (/dev/fd0 et al.)  the name of "native format" of the  drive  is
              printed,  and  for  the default formats, if(3,n) a generic format has
              been redefined, its name becomes (null).

       -p
       --print
              Prints out the configuration of the drive. The names of the var-
              ious fields are the same as the names of the option to set(7,n,1 builtins) them,
              see below.

       -P
       --printstate
              Prints out the cached internal state of the  driver.  The  first
              line lists various attributes about the disk:

              drive present
              disk present
              disk writable
                     These are only updated when the drive is accessed.

              spinup
                     is  the  time(1,2,n)  when  the motor became switched on for the
                     last time.

              select(2,7,2 select_tut)
                     is the time(1,2,n) when the drive became selected for  the  last
                     time(1,2,n)

              first_read
                     is  the  time(1,2,n)  when the first read(2,n,1 builtins) request after the last
                     spin up completed.

              probed_fmt
                     is the the  index  of  the  autodetected  format  in(1,8)  the
                     autodetection sequence for this drive.

              cylinder
                     is  the cylinder where the drive head currently sits.  If
                     this number is negative, it has the following meaning:

                     *      -1 means that the driver  doesn't  know,  but  the
                            controller does (a seek command must be issued).

                     *      -2  means that the controller doesn't know either,
                            but is sure that it not  beyond  the  80th  track.
                            The drive needs a recalibration.

                     *      -3  means  that  the  head  may be beyond the 80th
                            track.  The drive needs two successive  recalibra-
                            tions,  because  at  each  recalibration, the con-
                            troller only issues  80  move(3x,7,3x curs_move)  head  commands  per
                            recalibration.

              maxblock
                     is the highest block number that has been read.

              maxcylinder
                     is  a  boolean  which is set(7,n,1 builtins) when a sector that is not on
                     cylinder 0/head 0 has been  read.   These  are  used  for
                     smart  invalidation  of  the  buffer  cache  on  geometry
                     change.  The buffer cache of the drive  is  only  invali-
                     dated  on  geometry  change  when  this  change  actually
                     implies that a block that has already been  read(2,n,1 builtins)  changes
                     position.  This  optimization  is useful for mtools(1,5) which
                     changes the geometry after reading the boot sector.

              generation
                     is roughly the number of disk changes noticed since boot.
                     Disk changes are noticed if(3,n) the disk is actually changed,
                     or if(3,n) a flush(8,n) command is issued and for both cases if(3,n) any
                     I/O  to/from the disk occurs. (i.e. if(3,n) you insert several
                     disks, but don't do any I/O to them, the generation  num-
                     ber stays the same.)

              refs   is  number of open(2,3,n) file(1,n) descriptors for this drive. It is
                     always  at  least  one,  because   floppycontrol's   file(1,n)
                     descriptor is counted too.

              device
                     is  format type (as derived from the minor device number)
                     which is currently being used.

              last_checked
                     is date (in(1,8) jiffies) when the drive was last checked  for
                     a disk change, and a disk was actually in(1,8) the drive.


       --pollstate
              Polls  the  drive  and then prints out the internal state of the
              driver.(--Printstate only  prints  out  the  cached  information
              without actually polling the drive for a disk change.)

       --printfdcstate
              Prints out the state of the controller where the target drive is
              attached to.

              spec1
              spec2  are the current values of those registers.

              rate   is current data transfer rate

              rawcmd
                     is true if(3,n) a raw(3x,7,8,3x cbreak) command has been executed since the last
                     reset.  If  this  is  the case, a reset(1,7,1 tput) will be triggered
                     when a drive on the same FDC is next opened.

              dor    is the value of the digital output register. The  4  high
                     bits are a bit mask describing which drives are spinning,
                     the 2 low bits describe the selected drive, bit 2 is used
                     to  reset(1,7,1 tput)  the  FDC, and bit 3 describes whether this FDC
                     has hold of the interrupt and the DMA. If  you  have  two
                     FDCs, bit 3 is only set(7,n,1 builtins) on one of them.

              version(1,3,5)
                     is      the      version(1,3,5)      of     the     FDC.     See
                     `linux/include/linux/fdreg.h' for a listing  of  the  FDC
                     version(1,3,5) numbers.

              reset(1,7,1 tput)  is  true  if(3,n) a reset(1,7,1 tput) needs to be issued to the FDC before
                     processing the next request.

              need_configure
                     is true if(3,n) this FDC needs configuration by the FD_CONFIG-
                     URE command.

              has_fifo
                     is set(7,n,1 builtins) if(3,n) the FDC understands the FD_CONFIGURE command.

              perp_mode
                     describes  the  perpendicular mode of this FDC. 0 is non-
                     perpendicular mode, 2 is HD perpendicular mode, 3  is  ED
                     perpendicular mode, and 1 is unknown.

              address
                     is  the  address  of the first I/O port of the FDC.  Nor-
                     mally, this is 0x3f0 for the first FDC and 0x370 for  the
                     second.


Drive type configuration and autodetection
       The  following options handle the different available drive types, such
       as double density vs. high density vs. extra density drives, and 5  1/4
       drives  vs  3  1/2  drives.  Usually the drive type is stored in(1,8) a non-
       volatile memory, called CMOS, under the form of an integer ranging from
       1 to 6.

       Different  drive types are able to handle and autodetect different for-
       mats (different autodetection lists). They also have different  "native
       format  name". The native format is the "usual" format with the highest
       capacity supported by the drive. (For example 720KB on a double density
       3 1/2 drive, and 1.2MB on a high density 5 1/4 drive.)

       These settings are only changeable by the super user.

       -c cmos-type
       --cmos  cmos-type
              Set the virtual(5,8) CMOS type of the floppy drive. This is useful if(3,n)

              *      the physical CMOS type is wrong  (this  may  happen  with
                     BIOSes which use a non-standard mapping),

              *      you have more than two drives (the physical CMOS may only
                     describe up to two drives).

              *      you have a BIOS that allows swapping drives A: and B: for
                     DOS.

       Right  now,  this  CMOS parameter is not used by the kernel, except for
       feeding it back to other applications (for instance superformat,  flop-
       pymeter or MAKEFLOPPIES).  It is also possible to supply a virtual(5,8) CMOS
       type with the cmos boot option (see section   Boottime  configuration).
       If  possible,  I recommend you use the boot option, rather than floppy-
       control, because the boot option also sets any parameters derived  from
       the  CMOS  type,  such as the autodetection list and the native format,
       whereas floppycontrol does not.

       -A  autodetect-seq
       --autodetect  autodetect-seq
              Set the autodetection sequence (see section  Autodetection)  The
              autodetection  sequence  is  a  comma-separated  list of at most
              eight format descriptors. Each format  descriptor  is  a  format
              number  optionally  followed  by the letter t.  For drive 0, the
              format number is the minor device  number  divided  by  4.   The
              autodetection  sequence  is  used  by the driver to find out the
              format of a newly inserted disk. The formats are tried one after
              the  other,  and  the first matching format is retained. To test
              the format, the driver tries to read(2,n,1 builtins) the  first  sector  on  the
              first  track on the first head when t is not given, or the whole
              first track when t is given. Thus, autodetection  cannot  detect
              the  number of tracks. However, this information is contained in(1,8)
              the boot sector, which is now accessible. The  boot  sector  can
              then  be  used  by  mtools(1,5)  to  configure  the correct number of
              tracks.

              Example:

                 7,4,24t,25

              means to try out the formats whose minor device numbers  are  28
              (1.44M),  16  (720KB),  96  (1.76MB),  and 100 (1.92MB), in(1,8) this
              order. For the 1.76MB format, try to read(2,n,1 builtins)  the  whole  track  at
              once.

              Reading  the  whole  track  at  once  allows  you to distinguish
              between two formats which differ only in(1,8) the number of  sectors.
              (The  format with the most sectors must be tried first.)  If you
              use mtools(1,5), you do not need this feature, as mtools(1,5)  can  figure
              out  the  number  of  sectors  without  any help from the floppy
              driver, by looking at the boot sector.

              Reading the whole track at once may also speed up the first read(2,n,1 builtins)
              by  200 milliseconds. However, if(3,n), on the other hand, you try to
              read(2,n,1 builtins) a disk which has less(1,3) sectors than  the  format,  you  lose
              some time.

              I  suggest  that you put the most often used format in(1,8) the first
              place (barring other constraints), as each format that is  tried
              out takes 400 milliseconds.

       -n native-format
       --native_format  native-format
              Set  the  native  format  of  this drive. The native format of a
              drive is the highest standard format available for  this  drive.
              (Example:  For  a  5 1/4 HD drive it is the usual 1200K format.)
              This is format is used to  make  up  the  format  name  for  the
              generic  device  (which  is the name of the native format). This
              drive name is read(2,n,1 builtins) back from  the  kernel  by  the  MAKEFLOPPIES
              script which uses it to decide which device nodes to create.


Configuration of the disk change line
       --broken_dcl
              Assumes  that  the  disk change line of the drive is broken.  If
              this is set(7,n,1 builtins), disk changes are assumed  to  happen  whenever  the
              device  node  is  first opened. The physical disk change line is
              ignored.

              This option should be  used  if(3,n)  disk  changes  are  either  not
              detected  at  all, or if(3,n) disk changes are detected when the disk
              was actually not changed.  If this option fixes the problem, I'd
              recommend  that  you try to trace(3x,n,3x _nc_tracebits) the root cause of the problem.
              Indeed, this options results in(1,8) reduced performance due to  spu-
              rious cache flushes.

              The  following  hardware  problems may lead to a bad disk change
              line:

              *      If the floppy cable is not inserted straight, or if(3,n) it is
                     kinked,  the  disk change line is likely to suffer, as it
                     is on the edge of the cable.  Gently press on  both  con-
                     nectors  of  the  cable  (drive and controller) to insure
                     that all wires make contact.  Visually inspect the cable,
                     and  if(3,n) it shows obvious traces of damage, get a new one.

              *      On some drives, the locations disk  change  line  may  be
                     chosen  by  jumper. Make sure that your floppy controller
                     and your drive agree on which line  is  the  disk  change
                     line.

              *      Some  older  drives  (mostly double density 5 1/4 drives)
                     don't have a disk change line.  In this case, you have no
                     choice other than to leave the broken_dcl option on.

       --working_dcl
              Assumes  that  the  disk  change line works all right. Switching
              from broken to working may lead to unexpected results after  the
              first disk change.

       --inverted_dcl
              Assumes  that this disk drive uses an inverted disk change line.
              Apparently this is the case for IBM thinkpads.

       --no_inverted_dcl
              Assumes that this drive follows the standard convention for  the
              disk change line.

       --noisy_dcl_clear
              Switches off silent disk change line clearing for this drive.


Timing Parameters
       This  section  describes  how to configure drive timings.  To set(7,n,1 builtins) these
       parameters, you need superuser privileges. All  times  are  in(1,8)  "jiffy"
       units(1,7) (10 milliseconds), unless otherwise specified.

       --hlt  hlt
              Set  the head load(7,n) time(1,2,n) (in(1,8) microseconds) for this floppy drive.
              The head load(7,n) time(1,2,n) describes  how  long  the  floppy  controller
              waits  after seeking or changing heads before allowing access(2,5) to
              a track.

       --hut  hut
              Set the head unload  time(1,2,n)  (in(1,8)  microseconds)  for  this  floppy
              drive.   The head unload time(1,2,n) describes how long the floppy con-
              troller waits after an access(2,5) before directing its attention  to
              the other head, or before seeking.

       --srt  srt
              Set  the step rate (in(1,8) microseconds) for this floppy drive.  The
              step rate describes how long the drive head stays on one  cylin-
              der  when  seeking.   Setting this value to low (too fast seeks)
              may make seeks fail,  because  the  motor  doesn't  follow  fast
              enough.

       -u spinup-time
       --spinup  spinup-time
              Set  the spinup time(1,2,n) of the floppy drive. In order to do read(2,n,1 builtins) or
              write(1,2) to the floppy disk, it must spin. It takes a certain  time(1,2,n)
              for  the  motor  to  reach  enough  speed to read(2,n,1 builtins) or write. This
              parameter describes this time. The floppy driver doesn't try  to
              access(2,5) the drive before the spinup time(1,2,n) has elapsed. With modern
              controllers, you may set(7,n,1 builtins) this time(1,2,n) to zero,  as  the  controller
              itself enforces the right delay.

       -o spindown-time
       --spindown  spindown-time
              Set  the  spindown  time(1,2,n)  of this floppy drive. The motor is not
              stopped immediately after the operation completes, because there
              might  be  more  operations  following. The spindown time(1,2,n) is the
              time(1,2,n) the driver waits before switching off the motor.

       -O spindown-offset
       --spindown_offset  spindown-offset
              Set the spindown offset of this floppy drive. This parameter  is
              used to set(7,n,1 builtins) the position in(1,8) which the disk stops. This is useful
              to minimize the next access(2,5) time. (If the first sector  is  just
              near  the  head at the very moment at which the disk has reached
              enough speed, you win 200 milliseconds against the most unfavor-
              able situation).

              This  is  done  by clocking the time(1,2,n) where the first I/O request
              completes, and using this time(1,2,n) to calculate the current position
              of the disk.

       -s select-delay
       --select_delay  select-delay
              Set  the  select(2,7,2 select_tut)  delay  of this floppy drive. This is the delay
              that the driver waits after selecting the drive and issuing  the
              first  command to it. For modern controllers/drives, you may set(7,n,1 builtins)
              this to zero.

       -C check-interval
       --checkfreq  check-interval
              Set the maximal disk change check  interval.   The  disk  change
              line  is  checked  whenever  a  read(2,n,1 builtins)  or  write(1,2) to the device is
              issued, and it has not  been  checked  for  more  than  interval
              jiffies.


Debugging messages
       This  subsection  describes  how to switch(1,n) the available debugging mes-
       sages on and off.


       --debug
              Switch debugging output on. The debugging  information  includes
              timing information. This option might be useful to fine-tune the
              timing options for your local setups. (But for most normal  pur-
              poses, the default values are good enough.)

       --nodebug
              Switch debugging output off.

       --messages
              Print   informational  messages  after  autodetection,  geometry
              parameter clearing and dma over/underruns.

       --nomessages
              Don't print informational messages after these events.


Error Handling Options
       The following options configure the behavior of the  floppy  driver  in(1,8)
       case  of  read(2,n,1 builtins)/write(1,2) errors. They may be used by any user who has write(1,2)
       privileges for the drive. Whenever  the  floppy  driver  encounters  an
       error(8,n),  a  retry  counter  is incremented. If the value of this counter
       gets(3,n) bigger than the  thresholds  described  below,  the  corresponding
       actions  are performed at the next retry. The counter is reset(1,7,1 tput) when the
       read(2,n,1 builtins) or write(1,2) finally terminates, whether successfully or not.

       -a operation-abort-trshld
       --abort  operation-abort-trshld
              Tell the floppy driver to stop trying  to  read(2,n,1 builtins)/write(1,2)  a  sector
              after  operation-abort-trshld  retries, and signal(2,7) the I/O error(8,n)
              to the user.

       -t read-track-trshld
       --readtrack  read-track-trshld
              Tell the floppy driver to switch(1,n) from track-reading mode to sec-
              tor-at-a-time-mode after read-track-trshld retries.

       -r recalibrate-trshld
       --recalibrate  recalibrate-trshld
              Tell  the  floppy  driver to recalibrate the drive after recali-
              brate-trshld retries.

       -R reset-treshold
       --reset  reset-threshold
              Tell the floppy driver to  reset(1,7,1 tput)  the  controller  after  reset-
              threshold  retries.  After a controller reset(1,7,1 tput), the floppy driver
              also recalibrates all drives connected to that controller.


       -e error-report-trshld
       --reporting  error-report-trshld
              Tell the floppy driver to start printing error(8,n) messages  to  the
              console(4,n) after error-report-trshld retries.


Write error(8,n) reporting
       Due  to the buffer cache, write(1,2) errors cannot always be reported to the
       writing user program as soon as the write(1,2) system call returns.  Indeed,
       the  actual  writing  may  take  place  much later. If a write(1,2) error(8,n) is
       encountered, the floppy driver stores information about it in(1,8)  its  per
       drive  write(1,2)  error(8,n)  structure.  This write(1,2) error(8,n) structure stays until
       explicitly cleared.  It can for example be queried by a backup  program
       which wants to make sure that the data has been written successfully.


       --clrwerror
              Clears the write(1,2) error(8,n) structure.

       --printwerror
              Prints the contents of the write(1,2) error(8,n) structure:

              write_errors
                     is  a  count of how many write(1,2) errors have occurred since
                     the structure was last cleared.

              badness
                     is the maximal number of retries that were needed to com-
                     plete an operation (reads, writes and formats).

              first_error_sector
                     is   where   the   first  (chronologically)  write(1,2)  error(8,n)
                     occurred.

              first_error_generation
                     is the disk change generation  in(1,8)  which  did  the  first
                     write(1,2)  error(8,n)  occurred.   The disk change generation is a
                     number which is incremented at each disk change.

              last_error_sector
                     and

              last_error_generation
                     are similar.


Other drive configuration options
       This subsection lists per drive configuration options, which don't  fit
       in(1,8) any other category.  They are available only to the superuser:


       --tracks  max-tracks
              Set  the  maximal numbers of physical tracks that this drive may
              handle. If you have a drive which is  only  able  to  handle  80
              tracks  (making  strange noises when you try to format or read(2,n,1 builtins) a
              disk with more than 80  tracks),  use  this  option  to  prevent
              unprivileged  users(1,5) of damaging your drive by repeatedly reading
              disks with more than 80 tracks.

              If you trust your users(1,5) and your disks,  you  don't  need  this.
              With  most  drives  you don't need to worry anyways. See section
              More cylinders, for details.

       -i sector-interleave
       --interleave sector-interleave
              Set the number of sectors beyond which sector interleaving  will
              be  used.   This option will only be used by the FDFMTTRK ioctl.
              The fdformat command, which is  now  considered  obsolete,  uses
              FDFMTTRK ioctl, but superformat does not.


See Also
       Fdutils' texinfo doc



fdutils-5.4                         02jun00                   floppycontrol(1)

References for this manual (incoming links)