11da177e4SLinus Torvalds #ifndef _LINUX_FD_H 21da177e4SLinus Torvalds #define _LINUX_FD_H 31da177e4SLinus Torvalds 41da177e4SLinus Torvalds #include <linux/ioctl.h> 51da177e4SLinus Torvalds #include <linux/compiler.h> 61da177e4SLinus Torvalds 71da177e4SLinus Torvalds /* New file layout: Now the ioctl definitions immediately follow the 81da177e4SLinus Torvalds * definitions of the structures that they use */ 91da177e4SLinus Torvalds 101da177e4SLinus Torvalds /* 111da177e4SLinus Torvalds * Geometry 121da177e4SLinus Torvalds */ 131da177e4SLinus Torvalds struct floppy_struct { 141da177e4SLinus Torvalds unsigned int size, /* nr of sectors total */ 151da177e4SLinus Torvalds sect, /* sectors per track */ 161da177e4SLinus Torvalds head, /* nr of heads */ 171da177e4SLinus Torvalds track, /* nr of tracks */ 181da177e4SLinus Torvalds stretch; /* !=0 means double track steps */ 191da177e4SLinus Torvalds #define FD_STRETCH 1 201da177e4SLinus Torvalds #define FD_SWAPSIDES 2 211da177e4SLinus Torvalds #define FD_ZEROBASED 4 221da177e4SLinus Torvalds 231da177e4SLinus Torvalds unsigned char gap, /* gap1 size */ 241da177e4SLinus Torvalds 251da177e4SLinus Torvalds rate, /* data rate. |= 0x40 for perpendicular */ 261da177e4SLinus Torvalds #define FD_2M 0x4 271da177e4SLinus Torvalds #define FD_SIZECODEMASK 0x38 281da177e4SLinus Torvalds #define FD_SIZECODE(floppy) (((((floppy)->rate&FD_SIZECODEMASK)>> 3)+ 2) %8) 291da177e4SLinus Torvalds #define FD_SECTSIZE(floppy) ( (floppy)->rate & FD_2M ? \ 301da177e4SLinus Torvalds 512 : 128 << FD_SIZECODE(floppy) ) 311da177e4SLinus Torvalds #define FD_PERP 0x40 321da177e4SLinus Torvalds 331da177e4SLinus Torvalds spec1, /* stepping rate, head unload time */ 341da177e4SLinus Torvalds fmt_gap; /* gap2 size */ 351da177e4SLinus Torvalds const char * name; /* used only for predefined formats */ 361da177e4SLinus Torvalds }; 371da177e4SLinus Torvalds 381da177e4SLinus Torvalds 391da177e4SLinus Torvalds /* commands needing write access have 0x40 set */ 401da177e4SLinus Torvalds /* commands needing super user access have 0x80 set */ 411da177e4SLinus Torvalds 421da177e4SLinus Torvalds #define FDCLRPRM _IO(2, 0x41) 431da177e4SLinus Torvalds /* clear user-defined parameters */ 441da177e4SLinus Torvalds 451da177e4SLinus Torvalds #define FDSETPRM _IOW(2, 0x42, struct floppy_struct) 461da177e4SLinus Torvalds #define FDSETMEDIAPRM FDSETPRM 471da177e4SLinus Torvalds /* set user-defined parameters for current media */ 481da177e4SLinus Torvalds 491da177e4SLinus Torvalds #define FDDEFPRM _IOW(2, 0x43, struct floppy_struct) 501da177e4SLinus Torvalds #define FDGETPRM _IOR(2, 0x04, struct floppy_struct) 511da177e4SLinus Torvalds #define FDDEFMEDIAPRM FDDEFPRM 521da177e4SLinus Torvalds #define FDGETMEDIAPRM FDGETPRM 531da177e4SLinus Torvalds /* set/get disk parameters */ 541da177e4SLinus Torvalds 551da177e4SLinus Torvalds 561da177e4SLinus Torvalds #define FDMSGON _IO(2,0x45) 571da177e4SLinus Torvalds #define FDMSGOFF _IO(2,0x46) 581da177e4SLinus Torvalds /* issue/don't issue kernel messages on media type change */ 591da177e4SLinus Torvalds 601da177e4SLinus Torvalds 611da177e4SLinus Torvalds /* 621da177e4SLinus Torvalds * Formatting (obsolete) 631da177e4SLinus Torvalds */ 641da177e4SLinus Torvalds #define FD_FILL_BYTE 0xF6 /* format fill byte. */ 651da177e4SLinus Torvalds 661da177e4SLinus Torvalds struct format_descr { 671da177e4SLinus Torvalds unsigned int device,head,track; 681da177e4SLinus Torvalds }; 691da177e4SLinus Torvalds 701da177e4SLinus Torvalds #define FDFMTBEG _IO(2,0x47) 711da177e4SLinus Torvalds /* begin formatting a disk */ 721da177e4SLinus Torvalds #define FDFMTTRK _IOW(2,0x48, struct format_descr) 731da177e4SLinus Torvalds /* format the specified track */ 741da177e4SLinus Torvalds #define FDFMTEND _IO(2,0x49) 751da177e4SLinus Torvalds /* end formatting a disk */ 761da177e4SLinus Torvalds 771da177e4SLinus Torvalds 781da177e4SLinus Torvalds /* 791da177e4SLinus Torvalds * Error thresholds 801da177e4SLinus Torvalds */ 811da177e4SLinus Torvalds struct floppy_max_errors { 821da177e4SLinus Torvalds unsigned int 831da177e4SLinus Torvalds abort, /* number of errors to be reached before aborting */ 841da177e4SLinus Torvalds read_track, /* maximal number of errors permitted to read an 851da177e4SLinus Torvalds * entire track at once */ 861da177e4SLinus Torvalds reset, /* maximal number of errors before a reset is tried */ 871da177e4SLinus Torvalds recal, /* maximal number of errors before a recalibrate is 881da177e4SLinus Torvalds * tried */ 891da177e4SLinus Torvalds 901da177e4SLinus Torvalds /* 911da177e4SLinus Torvalds * Threshold for reporting FDC errors to the console. 921da177e4SLinus Torvalds * Setting this to zero may flood your screen when using 931da177e4SLinus Torvalds * ultra cheap floppies ;-) 941da177e4SLinus Torvalds */ 951da177e4SLinus Torvalds reporting; 961da177e4SLinus Torvalds 971da177e4SLinus Torvalds }; 981da177e4SLinus Torvalds 991da177e4SLinus Torvalds #define FDSETEMSGTRESH _IO(2,0x4a) 1001da177e4SLinus Torvalds /* set fdc error reporting threshold */ 1011da177e4SLinus Torvalds 1021da177e4SLinus Torvalds #define FDFLUSH _IO(2,0x4b) 1031da177e4SLinus Torvalds /* flush buffers for media; either for verifying media, or for 1041da177e4SLinus Torvalds * handling a media change without closing the file descriptor */ 1051da177e4SLinus Torvalds 1061da177e4SLinus Torvalds #define FDSETMAXERRS _IOW(2, 0x4c, struct floppy_max_errors) 1071da177e4SLinus Torvalds #define FDGETMAXERRS _IOR(2, 0x0e, struct floppy_max_errors) 1081da177e4SLinus Torvalds /* set/get abortion and read_track threshold. See also floppy_drive_params 1091da177e4SLinus Torvalds * structure */ 1101da177e4SLinus Torvalds 1111da177e4SLinus Torvalds 1121da177e4SLinus Torvalds typedef char floppy_drive_name[16]; 1131da177e4SLinus Torvalds #define FDGETDRVTYP _IOR(2, 0x0f, floppy_drive_name) 1141da177e4SLinus Torvalds /* get drive type: 5 1/4 or 3 1/2 */ 1151da177e4SLinus Torvalds 1161da177e4SLinus Torvalds 1171da177e4SLinus Torvalds /* 1181da177e4SLinus Torvalds * Drive parameters (user modifiable) 1191da177e4SLinus Torvalds */ 1201da177e4SLinus Torvalds struct floppy_drive_params { 1211da177e4SLinus Torvalds signed char cmos; /* CMOS type */ 1221da177e4SLinus Torvalds 1231da177e4SLinus Torvalds /* Spec2 is (HLD<<1 | ND), where HLD is head load time (1=2ms, 2=4 ms 1241da177e4SLinus Torvalds * etc) and ND is set means no DMA. Hardcoded to 6 (HLD=6ms, use DMA). 1251da177e4SLinus Torvalds */ 1261da177e4SLinus Torvalds unsigned long max_dtr; /* Step rate, usec */ 1271da177e4SLinus Torvalds unsigned long hlt; /* Head load/settle time, msec */ 1281da177e4SLinus Torvalds unsigned long hut; /* Head unload time (remnant of 1291da177e4SLinus Torvalds * 8" drives) */ 1301da177e4SLinus Torvalds unsigned long srt; /* Step rate, usec */ 1311da177e4SLinus Torvalds 1321da177e4SLinus Torvalds unsigned long spinup; /* time needed for spinup (expressed 1331da177e4SLinus Torvalds * in jiffies) */ 1341da177e4SLinus Torvalds unsigned long spindown; /* timeout needed for spindown */ 1351da177e4SLinus Torvalds unsigned char spindown_offset; /* decides in which position the disk 1361da177e4SLinus Torvalds * will stop */ 1371da177e4SLinus Torvalds unsigned char select_delay; /* delay to wait after select */ 1381da177e4SLinus Torvalds unsigned char rps; /* rotations per second */ 1391da177e4SLinus Torvalds unsigned char tracks; /* maximum number of tracks */ 1401da177e4SLinus Torvalds unsigned long timeout; /* timeout for interrupt requests */ 1411da177e4SLinus Torvalds 1421da177e4SLinus Torvalds unsigned char interleave_sect; /* if there are more sectors, use 1431da177e4SLinus Torvalds * interleave */ 1441da177e4SLinus Torvalds 1451da177e4SLinus Torvalds struct floppy_max_errors max_errors; 1461da177e4SLinus Torvalds 1471da177e4SLinus Torvalds char flags; /* various flags, including ftd_msg */ 1481da177e4SLinus Torvalds /* 1491da177e4SLinus Torvalds * Announce successful media type detection and media information loss after 1501da177e4SLinus Torvalds * disk changes. 1511da177e4SLinus Torvalds * Also used to enable/disable printing of overrun warnings. 1521da177e4SLinus Torvalds */ 1531da177e4SLinus Torvalds 1541da177e4SLinus Torvalds #define FTD_MSG 0x10 1551da177e4SLinus Torvalds #define FD_BROKEN_DCL 0x20 1561da177e4SLinus Torvalds #define FD_DEBUG 0x02 1571da177e4SLinus Torvalds #define FD_SILENT_DCL_CLEAR 0x4 1581da177e4SLinus Torvalds #define FD_INVERTED_DCL 0x80 /* must be 0x80, because of hardware 1591da177e4SLinus Torvalds considerations */ 1601da177e4SLinus Torvalds 1611da177e4SLinus Torvalds char read_track; /* use readtrack during probing? */ 1621da177e4SLinus Torvalds 1631da177e4SLinus Torvalds /* 1641da177e4SLinus Torvalds * Auto-detection. Each drive type has eight formats which are 1651da177e4SLinus Torvalds * used in succession to try to read the disk. If the FDC cannot lock onto 1661da177e4SLinus Torvalds * the disk, the next format is tried. This uses the variable 'probing'. 1671da177e4SLinus Torvalds */ 1681da177e4SLinus Torvalds short autodetect[8]; /* autodetected formats */ 1691da177e4SLinus Torvalds 1701da177e4SLinus Torvalds int checkfreq; /* how often should the drive be checked for disk 1711da177e4SLinus Torvalds * changes */ 1721da177e4SLinus Torvalds int native_format; /* native format of this drive */ 1731da177e4SLinus Torvalds }; 1741da177e4SLinus Torvalds 1751da177e4SLinus Torvalds enum { 1761da177e4SLinus Torvalds FD_NEED_TWADDLE_BIT, /* more magic */ 1771da177e4SLinus Torvalds FD_VERIFY_BIT, /* inquire for write protection */ 1781da177e4SLinus Torvalds FD_DISK_NEWCHANGE_BIT, /* change detected, and no action undertaken yet 1791da177e4SLinus Torvalds * to clear media change status */ 1801da177e4SLinus Torvalds FD_UNUSED_BIT, 1811da177e4SLinus Torvalds FD_DISK_CHANGED_BIT, /* disk has been changed since last i/o */ 1821da177e4SLinus Torvalds FD_DISK_WRITABLE_BIT /* disk is writable */ 1831da177e4SLinus Torvalds }; 1841da177e4SLinus Torvalds 1851da177e4SLinus Torvalds #define FDSETDRVPRM _IOW(2, 0x90, struct floppy_drive_params) 1861da177e4SLinus Torvalds #define FDGETDRVPRM _IOR(2, 0x11, struct floppy_drive_params) 1871da177e4SLinus Torvalds /* set/get drive parameters */ 1881da177e4SLinus Torvalds 1891da177e4SLinus Torvalds 1901da177e4SLinus Torvalds /* 1911da177e4SLinus Torvalds * Current drive state (not directly modifiable by user, readonly) 1921da177e4SLinus Torvalds */ 1931da177e4SLinus Torvalds struct floppy_drive_struct { 1941da177e4SLinus Torvalds unsigned long flags; 1951da177e4SLinus Torvalds /* values for these flags */ 1961da177e4SLinus Torvalds #define FD_NEED_TWADDLE (1 << FD_NEED_TWADDLE_BIT) 1971da177e4SLinus Torvalds #define FD_VERIFY (1 << FD_VERIFY_BIT) 1981da177e4SLinus Torvalds #define FD_DISK_NEWCHANGE (1 << FD_DISK_NEWCHANGE_BIT) 1991da177e4SLinus Torvalds #define FD_DISK_CHANGED (1 << FD_DISK_CHANGED_BIT) 2001da177e4SLinus Torvalds #define FD_DISK_WRITABLE (1 << FD_DISK_WRITABLE_BIT) 2011da177e4SLinus Torvalds 2021da177e4SLinus Torvalds unsigned long spinup_date; 2031da177e4SLinus Torvalds unsigned long select_date; 2041da177e4SLinus Torvalds unsigned long first_read_date; 2051da177e4SLinus Torvalds short probed_format; 2061da177e4SLinus Torvalds short track; /* current track */ 2071da177e4SLinus Torvalds short maxblock; /* id of highest block read */ 2081da177e4SLinus Torvalds short maxtrack; /* id of highest half track read */ 2091da177e4SLinus Torvalds int generation; /* how many diskchanges? */ 2101da177e4SLinus Torvalds 2111da177e4SLinus Torvalds /* 2121da177e4SLinus Torvalds * (User-provided) media information is _not_ discarded after a media change 2131da177e4SLinus Torvalds * if the corresponding keep_data flag is non-zero. Positive values are 2141da177e4SLinus Torvalds * decremented after each probe. 2151da177e4SLinus Torvalds */ 2161da177e4SLinus Torvalds int keep_data; 2171da177e4SLinus Torvalds 2181da177e4SLinus Torvalds /* Prevent "aliased" accesses. */ 2191da177e4SLinus Torvalds int fd_ref; 2201da177e4SLinus Torvalds int fd_device; 2211da177e4SLinus Torvalds unsigned long last_checked; /* when was the drive last checked for a disk 2221da177e4SLinus Torvalds * change? */ 2231da177e4SLinus Torvalds 2241da177e4SLinus Torvalds char *dmabuf; 2251da177e4SLinus Torvalds int bufblocks; 2261da177e4SLinus Torvalds }; 2271da177e4SLinus Torvalds 2281da177e4SLinus Torvalds #define FDGETDRVSTAT _IOR(2, 0x12, struct floppy_drive_struct) 2291da177e4SLinus Torvalds #define FDPOLLDRVSTAT _IOR(2, 0x13, struct floppy_drive_struct) 2301da177e4SLinus Torvalds /* get drive state: GET returns the cached state, POLL polls for new state */ 2311da177e4SLinus Torvalds 2321da177e4SLinus Torvalds 2331da177e4SLinus Torvalds /* 2341da177e4SLinus Torvalds * reset FDC 2351da177e4SLinus Torvalds */ 2361da177e4SLinus Torvalds enum reset_mode { 2371da177e4SLinus Torvalds FD_RESET_IF_NEEDED, /* reset only if the reset flags is set */ 2381da177e4SLinus Torvalds FD_RESET_IF_RAWCMD, /* obsolete */ 2391da177e4SLinus Torvalds FD_RESET_ALWAYS /* reset always */ 2401da177e4SLinus Torvalds }; 2411da177e4SLinus Torvalds #define FDRESET _IO(2, 0x54) 2421da177e4SLinus Torvalds 2431da177e4SLinus Torvalds 2441da177e4SLinus Torvalds /* 2451da177e4SLinus Torvalds * FDC state 2461da177e4SLinus Torvalds */ 2471da177e4SLinus Torvalds struct floppy_fdc_state { 2481da177e4SLinus Torvalds int spec1; /* spec1 value last used */ 2491da177e4SLinus Torvalds int spec2; /* spec2 value last used */ 2501da177e4SLinus Torvalds int dtr; 2511da177e4SLinus Torvalds unsigned char version; /* FDC version code */ 2521da177e4SLinus Torvalds unsigned char dor; 2531da177e4SLinus Torvalds unsigned long address; /* io address */ 2541da177e4SLinus Torvalds unsigned int rawcmd:2; 2551da177e4SLinus Torvalds unsigned int reset:1; 2561da177e4SLinus Torvalds unsigned int need_configure:1; 2571da177e4SLinus Torvalds unsigned int perp_mode:2; 2581da177e4SLinus Torvalds unsigned int has_fifo:1; 2591da177e4SLinus Torvalds unsigned int driver_version; /* version code for floppy driver */ 2601da177e4SLinus Torvalds #define FD_DRIVER_VERSION 0x100 2611da177e4SLinus Torvalds /* user programs using the floppy API should use floppy_fdc_state to 2621da177e4SLinus Torvalds * get the version number of the floppy driver that they are running 2631da177e4SLinus Torvalds * on. If this version number is bigger than the one compiled into the 2641da177e4SLinus Torvalds * user program (the FD_DRIVER_VERSION define), it should be prepared 2651da177e4SLinus Torvalds * to bigger structures 2661da177e4SLinus Torvalds */ 2671da177e4SLinus Torvalds 2681da177e4SLinus Torvalds unsigned char track[4]; 2691da177e4SLinus Torvalds /* Position of the heads of the 4 units attached to this FDC, 2701da177e4SLinus Torvalds * as stored on the FDC. In the future, the position as stored 2711da177e4SLinus Torvalds * on the FDC might not agree with the actual physical 2721da177e4SLinus Torvalds * position of these drive heads. By allowing such 2731da177e4SLinus Torvalds * disagreement, it will be possible to reset the FDC without 2741da177e4SLinus Torvalds * incurring the expensive cost of repositioning all heads. 2751da177e4SLinus Torvalds * Right now, these positions are hard wired to 0. */ 2761da177e4SLinus Torvalds 2771da177e4SLinus Torvalds }; 2781da177e4SLinus Torvalds 2791da177e4SLinus Torvalds #define FDGETFDCSTAT _IOR(2, 0x15, struct floppy_fdc_state) 2801da177e4SLinus Torvalds 2811da177e4SLinus Torvalds 2821da177e4SLinus Torvalds /* 2831da177e4SLinus Torvalds * Asynchronous Write error tracking 2841da177e4SLinus Torvalds */ 2851da177e4SLinus Torvalds struct floppy_write_errors { 2861da177e4SLinus Torvalds /* Write error logging. 2871da177e4SLinus Torvalds * 2881da177e4SLinus Torvalds * These fields can be cleared with the FDWERRORCLR ioctl. 2891da177e4SLinus Torvalds * Only writes that were attempted but failed due to a physical media 2901da177e4SLinus Torvalds * error are logged. write(2) calls that fail and return an error code 2911da177e4SLinus Torvalds * to the user process are not counted. 2921da177e4SLinus Torvalds */ 2931da177e4SLinus Torvalds 2941da177e4SLinus Torvalds unsigned int write_errors; /* number of physical write errors 2951da177e4SLinus Torvalds * encountered */ 2961da177e4SLinus Torvalds 2971da177e4SLinus Torvalds /* position of first and last write errors */ 2981da177e4SLinus Torvalds unsigned long first_error_sector; 2991da177e4SLinus Torvalds int first_error_generation; 3001da177e4SLinus Torvalds unsigned long last_error_sector; 3011da177e4SLinus Torvalds int last_error_generation; 3021da177e4SLinus Torvalds 3031da177e4SLinus Torvalds unsigned int badness; /* highest retry count for a read or write 3041da177e4SLinus Torvalds * operation */ 3051da177e4SLinus Torvalds }; 3061da177e4SLinus Torvalds 3071da177e4SLinus Torvalds #define FDWERRORCLR _IO(2, 0x56) 3081da177e4SLinus Torvalds /* clear write error and badness information */ 3091da177e4SLinus Torvalds #define FDWERRORGET _IOR(2, 0x17, struct floppy_write_errors) 3101da177e4SLinus Torvalds /* get write error and badness information */ 3111da177e4SLinus Torvalds 3121da177e4SLinus Torvalds 3131da177e4SLinus Torvalds /* 3141da177e4SLinus Torvalds * Raw commands 3151da177e4SLinus Torvalds */ 3161da177e4SLinus Torvalds /* new interface flag: now we can do them in batches */ 3171da177e4SLinus Torvalds #define FDHAVEBATCHEDRAWCMD 3181da177e4SLinus Torvalds 3191da177e4SLinus Torvalds struct floppy_raw_cmd { 3201da177e4SLinus Torvalds unsigned int flags; 3211da177e4SLinus Torvalds #define FD_RAW_READ 1 3221da177e4SLinus Torvalds #define FD_RAW_WRITE 2 3231da177e4SLinus Torvalds #define FD_RAW_NO_MOTOR 4 3241da177e4SLinus Torvalds #define FD_RAW_DISK_CHANGE 4 /* out: disk change flag was set */ 3251da177e4SLinus Torvalds #define FD_RAW_INTR 8 /* wait for an interrupt */ 3261da177e4SLinus Torvalds #define FD_RAW_SPIN 0x10 /* spin up the disk for this command */ 3271da177e4SLinus Torvalds #define FD_RAW_NO_MOTOR_AFTER 0x20 /* switch the motor off after command 3281da177e4SLinus Torvalds * completion */ 3291da177e4SLinus Torvalds #define FD_RAW_NEED_DISK 0x40 /* this command needs a disk to be present */ 3301da177e4SLinus Torvalds #define FD_RAW_NEED_SEEK 0x80 /* this command uses an implied seek (soft) */ 3311da177e4SLinus Torvalds 3321da177e4SLinus Torvalds /* more "in" flags */ 3331da177e4SLinus Torvalds #define FD_RAW_MORE 0x100 /* more records follow */ 3341da177e4SLinus Torvalds #define FD_RAW_STOP_IF_FAILURE 0x200 /* stop if we encounter a failure */ 3351da177e4SLinus Torvalds #define FD_RAW_STOP_IF_SUCCESS 0x400 /* stop if command successful */ 3361da177e4SLinus Torvalds #define FD_RAW_SOFTFAILURE 0x800 /* consider the return value for failure 3371da177e4SLinus Torvalds * detection too */ 3381da177e4SLinus Torvalds 3391da177e4SLinus Torvalds /* more "out" flags */ 3401da177e4SLinus Torvalds #define FD_RAW_FAILURE 0x10000 /* command sent to fdc, fdc returned error */ 3411da177e4SLinus Torvalds #define FD_RAW_HARDFAILURE 0x20000 /* fdc had to be reset, or timed out */ 3421da177e4SLinus Torvalds 3431da177e4SLinus Torvalds void __user *data; 3441da177e4SLinus Torvalds char *kernel_data; /* location of data buffer in the kernel */ 3451da177e4SLinus Torvalds struct floppy_raw_cmd *next; /* used for chaining of raw cmd's 3461da177e4SLinus Torvalds * within the kernel */ 3471da177e4SLinus Torvalds long length; /* in: length of dma transfer. out: remaining bytes */ 3481da177e4SLinus Torvalds long phys_length; /* physical length, if different from dma length */ 3491da177e4SLinus Torvalds int buffer_length; /* length of allocated buffer */ 3501da177e4SLinus Torvalds 3511da177e4SLinus Torvalds unsigned char rate; 3521da177e4SLinus Torvalds unsigned char cmd_count; 3531da177e4SLinus Torvalds unsigned char cmd[16]; 3541da177e4SLinus Torvalds unsigned char reply_count; 3551da177e4SLinus Torvalds unsigned char reply[16]; 3561da177e4SLinus Torvalds int track; 3571da177e4SLinus Torvalds int resultcode; 3581da177e4SLinus Torvalds 3591da177e4SLinus Torvalds int reserved1; 3601da177e4SLinus Torvalds int reserved2; 3611da177e4SLinus Torvalds }; 3621da177e4SLinus Torvalds 3631da177e4SLinus Torvalds #define FDRAWCMD _IO(2, 0x58) 3641da177e4SLinus Torvalds /* send a raw command to the fdc. Structure size not included, because of 3651da177e4SLinus Torvalds * batches */ 3661da177e4SLinus Torvalds 3671da177e4SLinus Torvalds #define FDTWADDLE _IO(2, 0x59) 3681da177e4SLinus Torvalds /* flicker motor-on bit before reading a sector. Experimental */ 3691da177e4SLinus Torvalds 3701da177e4SLinus Torvalds 3711da177e4SLinus Torvalds #define FDEJECT _IO(2, 0x5a) 3721da177e4SLinus Torvalds /* eject the disk */ 3731da177e4SLinus Torvalds 3741da177e4SLinus Torvalds #endif 375