Go to the documentation of this file. 1 #ifndef _UAPI_LINUX_FD_H
2 #define _UAPI_LINUX_FD_H
5 #include <linux/compiler.h>
23 #define FD_SWAPSIDES 2
24 #define FD_ZEROBASED 4
25 #define FD_SECTBASEMASK 0x3FC
26 #define FD_MKSECTBASE(s) (((s) ^ 1) << 2)
27 #define FD_SECTBASE(floppy) ((((floppy)->stretch & FD_SECTBASEMASK) >> 2) ^ 1)
33 #define FD_SIZECODEMASK 0x38
34 #define FD_SIZECODE(floppy) (((((floppy)->rate&FD_SIZECODEMASK)>> 3)+ 2) %8)
35 #define FD_SECTSIZE(floppy) ( (floppy)->rate & FD_2M ? \
36 512 : 128 << FD_SIZECODE(floppy) )
48 #define FDCLRPRM _IO(2, 0x41)
51 #define FDSETPRM _IOW(2, 0x42, struct floppy_struct)
52 #define FDSETMEDIAPRM FDSETPRM
55 #define FDDEFPRM _IOW(2, 0x43, struct floppy_struct)
56 #define FDGETPRM _IOR(2, 0x04, struct floppy_struct)
57 #define FDDEFMEDIAPRM FDDEFPRM
58 #define FDGETMEDIAPRM FDGETPRM
62 #define FDMSGON _IO(2,0x45)
63 #define FDMSGOFF _IO(2,0x46)
70 #define FD_FILL_BYTE 0xF6
76 #define FDFMTBEG _IO(2,0x47)
78 #define FDFMTTRK _IOW(2,0x48, struct format_descr)
80 #define FDFMTEND _IO(2,0x49)
105 #define FDSETEMSGTRESH _IO(2,0x4a)
108 #define FDFLUSH _IO(2,0x4b)
112 #define FDSETMAXERRS _IOW(2, 0x4c, struct floppy_max_errors)
113 #define FDGETMAXERRS _IOR(2, 0x0e, struct floppy_max_errors)
119 #define FDGETDRVTYP _IOR(2, 0x0f, floppy_drive_name)
161 #define FD_BROKEN_DCL 0x20
162 #define FD_DEBUG 0x02
163 #define FD_SILENT_DCL_CLEAR 0x4
164 #define FD_INVERTED_DCL 0x80
191 #define FDSETDRVPRM _IOW(2, 0x90, struct floppy_drive_params)
192 #define FDGETDRVPRM _IOR(2, 0x11, struct floppy_drive_params)
202 #define FD_NEED_TWADDLE (1 << FD_NEED_TWADDLE_BIT)
203 #define FD_VERIFY (1 << FD_VERIFY_BIT)
204 #define FD_DISK_NEWCHANGE (1 << FD_DISK_NEWCHANGE_BIT)
205 #define FD_DISK_CHANGED (1 << FD_DISK_CHANGED_BIT)
206 #define FD_DISK_WRITABLE (1 << FD_DISK_WRITABLE_BIT)
234 #define FDGETDRVSTAT _IOR(2, 0x12, struct floppy_drive_struct)
235 #define FDPOLLDRVSTAT _IOR(2, 0x13, struct floppy_drive_struct)
247 #define FDRESET _IO(2, 0x54)
266 #define FD_DRIVER_VERSION 0x100
274 unsigned char track[4];
285 #define FDGETFDCSTAT _IOR(2, 0x15, struct floppy_fdc_state)
313 #define FDWERRORCLR _IO(2, 0x56)
315 #define FDWERRORGET _IOR(2, 0x17, struct floppy_write_errors)
323 #define FDHAVEBATCHEDRAWCMD
327 #define FD_RAW_READ 1
328 #define FD_RAW_WRITE 2
329 #define FD_RAW_NO_MOTOR 4
330 #define FD_RAW_DISK_CHANGE 4
331 #define FD_RAW_INTR 8
332 #define FD_RAW_SPIN 0x10
333 #define FD_RAW_NO_MOTOR_AFTER 0x20
335 #define FD_RAW_NEED_DISK 0x40
336 #define FD_RAW_NEED_SEEK 0x80
339 #define FD_RAW_MORE 0x100
340 #define FD_RAW_STOP_IF_FAILURE 0x200
341 #define FD_RAW_STOP_IF_SUCCESS 0x400
342 #define FD_RAW_SOFTFAILURE 0x800
346 #define FD_RAW_FAILURE 0x10000
347 #define FD_RAW_HARDFAILURE 0x20000
361 unsigned char reply[16];
369 #define FDRAWCMD _IO(2, 0x58)
373 #define FDTWADDLE _IO(2, 0x59)
377 #define FDEJECT _IO(2, 0x5a)