Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations
fd.h File Reference
#include <linux/ioctl.h>
#include <linux/compiler.h>

Go to the source code of this file.

Data Structures

struct  floppy_struct
 
struct  format_descr
 
struct  floppy_max_errors
 
struct  floppy_drive_params
 
struct  floppy_drive_struct
 
struct  floppy_fdc_state
 
struct  floppy_write_errors
 
struct  floppy_raw_cmd
 

Macros

#define FD_STRETCH   1
 
#define FD_SWAPSIDES   2
 
#define FD_ZEROBASED   4
 
#define FD_SECTBASEMASK   0x3FC
 
#define FD_MKSECTBASE(s)   (((s) ^ 1) << 2)
 
#define FD_SECTBASE(floppy)   ((((floppy)->stretch & FD_SECTBASEMASK) >> 2) ^ 1)
 
#define FD_2M   0x4
 
#define FD_SIZECODEMASK   0x38
 
#define FD_SIZECODE(floppy)   (((((floppy)->rate&FD_SIZECODEMASK)>> 3)+ 2) %8)
 
#define FD_SECTSIZE(floppy)
 
#define FD_PERP   0x40
 
#define FDCLRPRM   _IO(2, 0x41)
 
#define FDSETPRM   _IOW(2, 0x42, struct floppy_struct)
 
#define FDSETMEDIAPRM   FDSETPRM
 
#define FDDEFPRM   _IOW(2, 0x43, struct floppy_struct)
 
#define FDGETPRM   _IOR(2, 0x04, struct floppy_struct)
 
#define FDDEFMEDIAPRM   FDDEFPRM
 
#define FDGETMEDIAPRM   FDGETPRM
 
#define FDMSGON   _IO(2,0x45)
 
#define FDMSGOFF   _IO(2,0x46)
 
#define FD_FILL_BYTE   0xF6 /* format fill byte. */
 
#define FDFMTBEG   _IO(2,0x47)
 
#define FDFMTTRK   _IOW(2,0x48, struct format_descr)
 
#define FDFMTEND   _IO(2,0x49)
 
#define FDSETEMSGTRESH   _IO(2,0x4a)
 
#define FDFLUSH   _IO(2,0x4b)
 
#define FDSETMAXERRS   _IOW(2, 0x4c, struct floppy_max_errors)
 
#define FDGETMAXERRS   _IOR(2, 0x0e, struct floppy_max_errors)
 
#define FDGETDRVTYP   _IOR(2, 0x0f, floppy_drive_name)
 
#define FTD_MSG   0x10
 
#define FD_BROKEN_DCL   0x20
 
#define FD_DEBUG   0x02
 
#define FD_SILENT_DCL_CLEAR   0x4
 
#define FD_INVERTED_DCL
 
#define FDSETDRVPRM   _IOW(2, 0x90, struct floppy_drive_params)
 
#define FDGETDRVPRM   _IOR(2, 0x11, struct floppy_drive_params)
 
#define FD_NEED_TWADDLE   (1 << FD_NEED_TWADDLE_BIT)
 
#define FD_VERIFY   (1 << FD_VERIFY_BIT)
 
#define FD_DISK_NEWCHANGE   (1 << FD_DISK_NEWCHANGE_BIT)
 
#define FD_DISK_CHANGED   (1 << FD_DISK_CHANGED_BIT)
 
#define FD_DISK_WRITABLE   (1 << FD_DISK_WRITABLE_BIT)
 
#define FDGETDRVSTAT   _IOR(2, 0x12, struct floppy_drive_struct)
 
#define FDPOLLDRVSTAT   _IOR(2, 0x13, struct floppy_drive_struct)
 
#define FDRESET   _IO(2, 0x54)
 
#define FD_DRIVER_VERSION   0x100
 
#define FDGETFDCSTAT   _IOR(2, 0x15, struct floppy_fdc_state)
 
#define FDWERRORCLR   _IO(2, 0x56)
 
#define FDWERRORGET   _IOR(2, 0x17, struct floppy_write_errors)
 
#define FDHAVEBATCHEDRAWCMD
 
#define FD_RAW_READ   1
 
#define FD_RAW_WRITE   2
 
#define FD_RAW_NO_MOTOR   4
 
#define FD_RAW_DISK_CHANGE   4 /* out: disk change flag was set */
 
#define FD_RAW_INTR   8 /* wait for an interrupt */
 
#define FD_RAW_SPIN   0x10 /* spin up the disk for this command */
 
#define FD_RAW_NO_MOTOR_AFTER
 
#define FD_RAW_NEED_DISK   0x40 /* this command needs a disk to be present */
 
#define FD_RAW_NEED_SEEK   0x80 /* this command uses an implied seek (soft) */
 
#define FD_RAW_MORE   0x100 /* more records follow */
 
#define FD_RAW_STOP_IF_FAILURE   0x200 /* stop if we encounter a failure */
 
#define FD_RAW_STOP_IF_SUCCESS   0x400 /* stop if command successful */
 
#define FD_RAW_SOFTFAILURE
 
#define FD_RAW_FAILURE   0x10000 /* command sent to fdc, fdc returned error */
 
#define FD_RAW_HARDFAILURE   0x20000 /* fdc had to be reset, or timed out */
 
#define FDRAWCMD   _IO(2, 0x58)
 
#define FDTWADDLE   _IO(2, 0x59)
 
#define FDEJECT   _IO(2, 0x5a)
 

Typedefs

typedef char floppy_drive_name [16]
 

Enumerations

enum  {
  FD_NEED_TWADDLE_BIT, FD_VERIFY_BIT, FD_DISK_NEWCHANGE_BIT, FD_UNUSED_BIT,
  FD_DISK_CHANGED_BIT, FD_DISK_WRITABLE_BIT
}
 
enum  reset_mode { FD_RESET_IF_NEEDED, FD_RESET_IF_RAWCMD, FD_RESET_ALWAYS }
 

Macro Definition Documentation

#define FD_2M   0x4

Definition at line 32 of file fd.h.

#define FD_BROKEN_DCL   0x20

Definition at line 161 of file fd.h.

#define FD_DEBUG   0x02

Definition at line 162 of file fd.h.

#define FD_DISK_CHANGED   (1 << FD_DISK_CHANGED_BIT)

Definition at line 204 of file fd.h.

#define FD_DISK_NEWCHANGE   (1 << FD_DISK_NEWCHANGE_BIT)

Definition at line 203 of file fd.h.

#define FD_DISK_WRITABLE   (1 << FD_DISK_WRITABLE_BIT)

Definition at line 205 of file fd.h.

#define FD_DRIVER_VERSION   0x100

Definition at line 265 of file fd.h.

#define FD_FILL_BYTE   0xF6 /* format fill byte. */

Definition at line 70 of file fd.h.

#define FD_INVERTED_DCL
Value:
0x80 /* must be 0x80, because of hardware
considerations */

Definition at line 164 of file fd.h.

#define FD_MKSECTBASE (   s)    (((s) ^ 1) << 2)

Definition at line 26 of file fd.h.

#define FD_NEED_TWADDLE   (1 << FD_NEED_TWADDLE_BIT)

Definition at line 201 of file fd.h.

#define FD_PERP   0x40

Definition at line 37 of file fd.h.

#define FD_RAW_DISK_CHANGE   4 /* out: disk change flag was set */

Definition at line 329 of file fd.h.

#define FD_RAW_FAILURE   0x10000 /* command sent to fdc, fdc returned error */

Definition at line 343 of file fd.h.

#define FD_RAW_HARDFAILURE   0x20000 /* fdc had to be reset, or timed out */

Definition at line 344 of file fd.h.

#define FD_RAW_INTR   8 /* wait for an interrupt */

Definition at line 330 of file fd.h.

#define FD_RAW_MORE   0x100 /* more records follow */

Definition at line 337 of file fd.h.

#define FD_RAW_NEED_DISK   0x40 /* this command needs a disk to be present */

Definition at line 333 of file fd.h.

#define FD_RAW_NEED_SEEK   0x80 /* this command uses an implied seek (soft) */

Definition at line 334 of file fd.h.

#define FD_RAW_NO_MOTOR   4

Definition at line 328 of file fd.h.

#define FD_RAW_NO_MOTOR_AFTER
Value:
0x20 /* switch the motor off after command
* completion */

Definition at line 332 of file fd.h.

#define FD_RAW_READ   1

Definition at line 326 of file fd.h.

#define FD_RAW_SOFTFAILURE
Value:
0x800 /* consider the return value for failure
* detection too */

Definition at line 340 of file fd.h.

#define FD_RAW_SPIN   0x10 /* spin up the disk for this command */

Definition at line 331 of file fd.h.

#define FD_RAW_STOP_IF_FAILURE   0x200 /* stop if we encounter a failure */

Definition at line 338 of file fd.h.

#define FD_RAW_STOP_IF_SUCCESS   0x400 /* stop if command successful */

Definition at line 339 of file fd.h.

#define FD_RAW_WRITE   2

Definition at line 327 of file fd.h.

#define FD_SECTBASE (   floppy)    ((((floppy)->stretch & FD_SECTBASEMASK) >> 2) ^ 1)

Definition at line 27 of file fd.h.

#define FD_SECTBASEMASK   0x3FC

Definition at line 25 of file fd.h.

#define FD_SECTSIZE (   floppy)
Value:
( (floppy)->rate & FD_2M ? \
512 : 128 << FD_SIZECODE(floppy) )

Definition at line 35 of file fd.h.

#define FD_SILENT_DCL_CLEAR   0x4

Definition at line 163 of file fd.h.

#define FD_SIZECODE (   floppy)    (((((floppy)->rate&FD_SIZECODEMASK)>> 3)+ 2) %8)

Definition at line 34 of file fd.h.

#define FD_SIZECODEMASK   0x38

Definition at line 33 of file fd.h.

#define FD_STRETCH   1

Definition at line 22 of file fd.h.

#define FD_SWAPSIDES   2

Definition at line 23 of file fd.h.

#define FD_VERIFY   (1 << FD_VERIFY_BIT)

Definition at line 202 of file fd.h.

#define FD_ZEROBASED   4

Definition at line 24 of file fd.h.

#define FDCLRPRM   _IO(2, 0x41)

Definition at line 48 of file fd.h.

#define FDDEFMEDIAPRM   FDDEFPRM

Definition at line 57 of file fd.h.

#define FDDEFPRM   _IOW(2, 0x43, struct floppy_struct)

Definition at line 55 of file fd.h.

#define FDEJECT   _IO(2, 0x5a)

Definition at line 374 of file fd.h.

#define FDFLUSH   _IO(2,0x4b)

Definition at line 108 of file fd.h.

#define FDFMTBEG   _IO(2,0x47)

Definition at line 76 of file fd.h.

#define FDFMTEND   _IO(2,0x49)

Definition at line 80 of file fd.h.

#define FDFMTTRK   _IOW(2,0x48, struct format_descr)

Definition at line 78 of file fd.h.

#define FDGETDRVPRM   _IOR(2, 0x11, struct floppy_drive_params)

Definition at line 191 of file fd.h.

#define FDGETDRVSTAT   _IOR(2, 0x12, struct floppy_drive_struct)

Definition at line 233 of file fd.h.

#define FDGETDRVTYP   _IOR(2, 0x0f, floppy_drive_name)

Definition at line 119 of file fd.h.

#define FDGETFDCSTAT   _IOR(2, 0x15, struct floppy_fdc_state)

Definition at line 284 of file fd.h.

#define FDGETMAXERRS   _IOR(2, 0x0e, struct floppy_max_errors)

Definition at line 113 of file fd.h.

#define FDGETMEDIAPRM   FDGETPRM

Definition at line 58 of file fd.h.

#define FDGETPRM   _IOR(2, 0x04, struct floppy_struct)

Definition at line 56 of file fd.h.

#define FDHAVEBATCHEDRAWCMD

Definition at line 322 of file fd.h.

#define FDMSGOFF   _IO(2,0x46)

Definition at line 63 of file fd.h.

#define FDMSGON   _IO(2,0x45)

Definition at line 62 of file fd.h.

#define FDPOLLDRVSTAT   _IOR(2, 0x13, struct floppy_drive_struct)

Definition at line 234 of file fd.h.

#define FDRAWCMD   _IO(2, 0x58)

Definition at line 366 of file fd.h.

#define FDRESET   _IO(2, 0x54)

Definition at line 246 of file fd.h.

#define FDSETDRVPRM   _IOW(2, 0x90, struct floppy_drive_params)

Definition at line 190 of file fd.h.

#define FDSETEMSGTRESH   _IO(2,0x4a)

Definition at line 105 of file fd.h.

#define FDSETMAXERRS   _IOW(2, 0x4c, struct floppy_max_errors)

Definition at line 112 of file fd.h.

#define FDSETMEDIAPRM   FDSETPRM

Definition at line 52 of file fd.h.

#define FDSETPRM   _IOW(2, 0x42, struct floppy_struct)

Definition at line 51 of file fd.h.

#define FDTWADDLE   _IO(2, 0x59)

Definition at line 370 of file fd.h.

#define FDWERRORCLR   _IO(2, 0x56)

Definition at line 312 of file fd.h.

#define FDWERRORGET   _IOR(2, 0x17, struct floppy_write_errors)

Definition at line 314 of file fd.h.

#define FTD_MSG   0x10

Definition at line 160 of file fd.h.

Typedef Documentation

typedef char floppy_drive_name[16]

Definition at line 118 of file fd.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
FD_NEED_TWADDLE_BIT 
FD_VERIFY_BIT 
FD_DISK_NEWCHANGE_BIT 
FD_UNUSED_BIT 
FD_DISK_CHANGED_BIT 
FD_DISK_WRITABLE_BIT 

Definition at line 180 of file fd.h.

enum reset_mode
Enumerator:
FD_RESET_IF_NEEDED 
FD_RESET_IF_RAWCMD 
FD_RESET_ALWAYS 

Definition at line 241 of file fd.h.