xref: /openbmc/linux/include/uapi/linux/fd.h (revision 7b7b68bb)
1607ca46eSDavid Howells #ifndef _UAPI_LINUX_FD_H
2607ca46eSDavid Howells #define _UAPI_LINUX_FD_H
3607ca46eSDavid Howells 
4607ca46eSDavid Howells #include <linux/ioctl.h>
5607ca46eSDavid Howells #include <linux/compiler.h>
6607ca46eSDavid Howells 
7607ca46eSDavid Howells /* New file layout: Now the ioctl definitions immediately follow the
8607ca46eSDavid Howells  * definitions of the structures that they use */
9607ca46eSDavid Howells 
10607ca46eSDavid Howells /*
11607ca46eSDavid Howells  * Geometry
12607ca46eSDavid Howells  */
13607ca46eSDavid Howells struct floppy_struct {
14607ca46eSDavid Howells 	unsigned int	size,		/* nr of sectors total */
15607ca46eSDavid Howells 			sect,		/* sectors per track */
16607ca46eSDavid Howells 			head,		/* nr of heads */
17607ca46eSDavid Howells 			track,		/* nr of tracks */
18607ca46eSDavid Howells 			stretch;	/* bit 0 !=0 means double track steps */
19607ca46eSDavid Howells 					/* bit 1 != 0 means swap sides */
20607ca46eSDavid Howells 					/* bits 2..9 give the first sector */
21607ca46eSDavid Howells 					/*  number (the LSB is flipped) */
22607ca46eSDavid Howells #define FD_STRETCH 1
23607ca46eSDavid Howells #define FD_SWAPSIDES 2
24607ca46eSDavid Howells #define FD_ZEROBASED 4
25607ca46eSDavid Howells #define FD_SECTBASEMASK 0x3FC
26607ca46eSDavid Howells #define FD_MKSECTBASE(s) (((s) ^ 1) << 2)
27607ca46eSDavid Howells #define FD_SECTBASE(floppy) ((((floppy)->stretch & FD_SECTBASEMASK) >> 2) ^ 1)
28607ca46eSDavid Howells 
29607ca46eSDavid Howells 	unsigned char	gap,		/* gap1 size */
30607ca46eSDavid Howells 
31607ca46eSDavid Howells 			rate,		/* data rate. |= 0x40 for perpendicular */
32607ca46eSDavid Howells #define FD_2M 0x4
33607ca46eSDavid Howells #define FD_SIZECODEMASK 0x38
34607ca46eSDavid Howells #define FD_SIZECODE(floppy) (((((floppy)->rate&FD_SIZECODEMASK)>> 3)+ 2) %8)
35607ca46eSDavid Howells #define FD_SECTSIZE(floppy) ( (floppy)->rate & FD_2M ? \
36607ca46eSDavid Howells 			     512 : 128 << FD_SIZECODE(floppy) )
37607ca46eSDavid Howells #define FD_PERP 0x40
38607ca46eSDavid Howells 
39607ca46eSDavid Howells 			spec1,		/* stepping rate, head unload time */
40607ca46eSDavid Howells 			fmt_gap;	/* gap2 size */
41607ca46eSDavid Howells 	const char	* name; /* used only for predefined formats */
42607ca46eSDavid Howells };
43607ca46eSDavid Howells 
44607ca46eSDavid Howells 
45607ca46eSDavid Howells /* commands needing write access have 0x40 set */
46607ca46eSDavid Howells /* commands needing super user access have 0x80 set */
47607ca46eSDavid Howells 
48607ca46eSDavid Howells #define FDCLRPRM _IO(2, 0x41)
49607ca46eSDavid Howells /* clear user-defined parameters */
50607ca46eSDavid Howells 
51607ca46eSDavid Howells #define FDSETPRM _IOW(2, 0x42, struct floppy_struct)
52607ca46eSDavid Howells #define FDSETMEDIAPRM FDSETPRM
53607ca46eSDavid Howells /* set user-defined parameters for current media */
54607ca46eSDavid Howells 
55607ca46eSDavid Howells #define FDDEFPRM _IOW(2, 0x43, struct floppy_struct)
56607ca46eSDavid Howells #define FDGETPRM _IOR(2, 0x04, struct floppy_struct)
57607ca46eSDavid Howells #define FDDEFMEDIAPRM FDDEFPRM
58607ca46eSDavid Howells #define FDGETMEDIAPRM FDGETPRM
59607ca46eSDavid Howells /* set/get disk parameters */
60607ca46eSDavid Howells 
61607ca46eSDavid Howells 
62607ca46eSDavid Howells #define	FDMSGON  _IO(2,0x45)
63607ca46eSDavid Howells #define	FDMSGOFF _IO(2,0x46)
64607ca46eSDavid Howells /* issue/don't issue kernel messages on media type change */
65607ca46eSDavid Howells 
66607ca46eSDavid Howells 
67607ca46eSDavid Howells /*
68607ca46eSDavid Howells  * Formatting (obsolete)
69607ca46eSDavid Howells  */
70607ca46eSDavid Howells #define FD_FILL_BYTE 0xF6 /* format fill byte. */
71607ca46eSDavid Howells 
72607ca46eSDavid Howells struct format_descr {
73607ca46eSDavid Howells 	unsigned int device,head,track;
74607ca46eSDavid Howells };
75607ca46eSDavid Howells 
76607ca46eSDavid Howells #define FDFMTBEG _IO(2,0x47)
77607ca46eSDavid Howells /* begin formatting a disk */
78607ca46eSDavid Howells #define	FDFMTTRK _IOW(2,0x48, struct format_descr)
79607ca46eSDavid Howells /* format the specified track */
80607ca46eSDavid Howells #define FDFMTEND _IO(2,0x49)
81607ca46eSDavid Howells /* end formatting a disk */
82607ca46eSDavid Howells 
83607ca46eSDavid Howells 
84607ca46eSDavid Howells /*
85607ca46eSDavid Howells  * Error thresholds
86607ca46eSDavid Howells  */
87607ca46eSDavid Howells struct floppy_max_errors {
88607ca46eSDavid Howells 	unsigned int
89607ca46eSDavid Howells 	  abort,      /* number of errors to be reached before aborting */
90607ca46eSDavid Howells 	  read_track, /* maximal number of errors permitted to read an
91607ca46eSDavid Howells 		       * entire track at once */
92607ca46eSDavid Howells 	  reset,      /* maximal number of errors before a reset is tried */
93607ca46eSDavid Howells 	  recal,      /* maximal number of errors before a recalibrate is
94607ca46eSDavid Howells 		       * tried */
95607ca46eSDavid Howells 
96607ca46eSDavid Howells 	  /*
97607ca46eSDavid Howells 	   * Threshold for reporting FDC errors to the console.
98607ca46eSDavid Howells 	   * Setting this to zero may flood your screen when using
99607ca46eSDavid Howells 	   * ultra cheap floppies ;-)
100607ca46eSDavid Howells 	   */
101607ca46eSDavid Howells 	  reporting;
102607ca46eSDavid Howells 
103607ca46eSDavid Howells };
104607ca46eSDavid Howells 
105607ca46eSDavid Howells #define FDSETEMSGTRESH	_IO(2,0x4a)
106607ca46eSDavid Howells /* set fdc error reporting threshold */
107607ca46eSDavid Howells 
108607ca46eSDavid Howells #define FDFLUSH  _IO(2,0x4b)
109607ca46eSDavid Howells /* flush buffers for media; either for verifying media, or for
110607ca46eSDavid Howells  * handling a media change without closing the file descriptor */
111607ca46eSDavid Howells 
112607ca46eSDavid Howells #define FDSETMAXERRS _IOW(2, 0x4c, struct floppy_max_errors)
113607ca46eSDavid Howells #define FDGETMAXERRS _IOR(2, 0x0e, struct floppy_max_errors)
114607ca46eSDavid Howells /* set/get abortion and read_track threshold. See also floppy_drive_params
115607ca46eSDavid Howells  * structure */
116607ca46eSDavid Howells 
117607ca46eSDavid Howells 
118607ca46eSDavid Howells typedef char floppy_drive_name[16];
119607ca46eSDavid Howells #define FDGETDRVTYP _IOR(2, 0x0f, floppy_drive_name)
120607ca46eSDavid Howells /* get drive type: 5 1/4 or 3 1/2 */
121607ca46eSDavid Howells 
122607ca46eSDavid Howells 
123607ca46eSDavid Howells /*
124607ca46eSDavid Howells  * Drive parameters (user modifiable)
125607ca46eSDavid Howells  */
126607ca46eSDavid Howells struct floppy_drive_params {
127607ca46eSDavid Howells 	signed char cmos;		/* CMOS type */
128607ca46eSDavid Howells 
129607ca46eSDavid Howells 	/* Spec2 is (HLD<<1 | ND), where HLD is head load time (1=2ms, 2=4 ms
130607ca46eSDavid Howells 	 * etc) and ND is set means no DMA. Hardcoded to 6 (HLD=6ms, use DMA).
131607ca46eSDavid Howells 	 */
132607ca46eSDavid Howells 	unsigned long max_dtr;		/* Step rate, usec */
133607ca46eSDavid Howells 	unsigned long hlt;     		/* Head load/settle time, msec */
134607ca46eSDavid Howells 	unsigned long hut;     		/* Head unload time (remnant of
135607ca46eSDavid Howells 					 * 8" drives) */
136607ca46eSDavid Howells 	unsigned long srt;     		/* Step rate, usec */
137607ca46eSDavid Howells 
138607ca46eSDavid Howells 	unsigned long spinup;		/* time needed for spinup (expressed
139607ca46eSDavid Howells 					 * in jiffies) */
140607ca46eSDavid Howells 	unsigned long spindown;		/* timeout needed for spindown */
141607ca46eSDavid Howells 	unsigned char spindown_offset;	/* decides in which position the disk
142607ca46eSDavid Howells 					 * will stop */
143607ca46eSDavid Howells 	unsigned char select_delay;	/* delay to wait after select */
144607ca46eSDavid Howells 	unsigned char rps;		/* rotations per second */
145607ca46eSDavid Howells 	unsigned char tracks;		/* maximum number of tracks */
146607ca46eSDavid Howells 	unsigned long timeout;		/* timeout for interrupt requests */
147607ca46eSDavid Howells 
148607ca46eSDavid Howells 	unsigned char interleave_sect;	/* if there are more sectors, use
149607ca46eSDavid Howells 					 * interleave */
150607ca46eSDavid Howells 
151607ca46eSDavid Howells 	struct floppy_max_errors max_errors;
152607ca46eSDavid Howells 
153607ca46eSDavid Howells 	char flags;			/* various flags, including ftd_msg */
154607ca46eSDavid Howells /*
155607ca46eSDavid Howells  * Announce successful media type detection and media information loss after
156607ca46eSDavid Howells  * disk changes.
157607ca46eSDavid Howells  * Also used to enable/disable printing of overrun warnings.
158607ca46eSDavid Howells  */
159607ca46eSDavid Howells 
160607ca46eSDavid Howells #define FTD_MSG 0x10
161607ca46eSDavid Howells #define FD_BROKEN_DCL 0x20
162607ca46eSDavid Howells #define FD_DEBUG 0x02
163607ca46eSDavid Howells #define FD_SILENT_DCL_CLEAR 0x4
164607ca46eSDavid Howells #define FD_INVERTED_DCL 0x80 /* must be 0x80, because of hardware
165607ca46eSDavid Howells 				considerations */
166607ca46eSDavid Howells 
167607ca46eSDavid Howells 	char read_track;		/* use readtrack during probing? */
168607ca46eSDavid Howells 
169607ca46eSDavid Howells /*
170607ca46eSDavid Howells  * Auto-detection. Each drive type has eight formats which are
171607ca46eSDavid Howells  * used in succession to try to read the disk. If the FDC cannot lock onto
172607ca46eSDavid Howells  * the disk, the next format is tried. This uses the variable 'probing'.
173607ca46eSDavid Howells  */
174607ca46eSDavid Howells 	short autodetect[8];		/* autodetected formats */
175607ca46eSDavid Howells 
176607ca46eSDavid Howells 	int checkfreq; /* how often should the drive be checked for disk
177607ca46eSDavid Howells 			* changes */
178607ca46eSDavid Howells 	int native_format; /* native format of this drive */
179607ca46eSDavid Howells };
180607ca46eSDavid Howells 
181607ca46eSDavid Howells enum {
182607ca46eSDavid Howells 	FD_NEED_TWADDLE_BIT,	/* more magic */
183607ca46eSDavid Howells 	FD_VERIFY_BIT,		/* inquire for write protection */
184607ca46eSDavid Howells 	FD_DISK_NEWCHANGE_BIT,	/* change detected, and no action undertaken yet
185607ca46eSDavid Howells 				 * to clear media change status */
186607ca46eSDavid Howells 	FD_UNUSED_BIT,
187607ca46eSDavid Howells 	FD_DISK_CHANGED_BIT,	/* disk has been changed since last i/o */
1887b7b68bbSJiri Kosina 	FD_DISK_WRITABLE_BIT,	/* disk is writable */
1897b7b68bbSJiri Kosina 	FD_OPEN_SHOULD_FAIL_BIT
190607ca46eSDavid Howells };
191607ca46eSDavid Howells 
192607ca46eSDavid Howells #define FDSETDRVPRM _IOW(2, 0x90, struct floppy_drive_params)
193607ca46eSDavid Howells #define FDGETDRVPRM _IOR(2, 0x11, struct floppy_drive_params)
194607ca46eSDavid Howells /* set/get drive parameters */
195607ca46eSDavid Howells 
196607ca46eSDavid Howells 
197607ca46eSDavid Howells /*
198607ca46eSDavid Howells  * Current drive state (not directly modifiable by user, readonly)
199607ca46eSDavid Howells  */
200607ca46eSDavid Howells struct floppy_drive_struct {
201607ca46eSDavid Howells 	unsigned long flags;
202607ca46eSDavid Howells /* values for these flags */
203607ca46eSDavid Howells #define FD_NEED_TWADDLE (1 << FD_NEED_TWADDLE_BIT)
204607ca46eSDavid Howells #define FD_VERIFY (1 << FD_VERIFY_BIT)
205607ca46eSDavid Howells #define FD_DISK_NEWCHANGE (1 << FD_DISK_NEWCHANGE_BIT)
206607ca46eSDavid Howells #define FD_DISK_CHANGED (1 << FD_DISK_CHANGED_BIT)
207607ca46eSDavid Howells #define FD_DISK_WRITABLE (1 << FD_DISK_WRITABLE_BIT)
208607ca46eSDavid Howells 
209607ca46eSDavid Howells 	unsigned long spinup_date;
210607ca46eSDavid Howells 	unsigned long select_date;
211607ca46eSDavid Howells 	unsigned long first_read_date;
212607ca46eSDavid Howells 	short probed_format;
213607ca46eSDavid Howells 	short track; /* current track */
214607ca46eSDavid Howells 	short maxblock; /* id of highest block read */
215607ca46eSDavid Howells 	short maxtrack; /* id of highest half track read */
216607ca46eSDavid Howells 	int generation; /* how many diskchanges? */
217607ca46eSDavid Howells 
218607ca46eSDavid Howells /*
219607ca46eSDavid Howells  * (User-provided) media information is _not_ discarded after a media change
220607ca46eSDavid Howells  * if the corresponding keep_data flag is non-zero. Positive values are
221607ca46eSDavid Howells  * decremented after each probe.
222607ca46eSDavid Howells  */
223607ca46eSDavid Howells 	int keep_data;
224607ca46eSDavid Howells 
225607ca46eSDavid Howells 	/* Prevent "aliased" accesses. */
226607ca46eSDavid Howells 	int fd_ref;
227607ca46eSDavid Howells 	int fd_device;
228607ca46eSDavid Howells 	unsigned long last_checked; /* when was the drive last checked for a disk
229607ca46eSDavid Howells 			   * change? */
230607ca46eSDavid Howells 
231607ca46eSDavid Howells 	char *dmabuf;
232607ca46eSDavid Howells 	int bufblocks;
233607ca46eSDavid Howells };
234607ca46eSDavid Howells 
235607ca46eSDavid Howells #define FDGETDRVSTAT _IOR(2, 0x12, struct floppy_drive_struct)
236607ca46eSDavid Howells #define FDPOLLDRVSTAT _IOR(2, 0x13, struct floppy_drive_struct)
237607ca46eSDavid Howells /* get drive state: GET returns the cached state, POLL polls for new state */
238607ca46eSDavid Howells 
239607ca46eSDavid Howells 
240607ca46eSDavid Howells /*
241607ca46eSDavid Howells  * reset FDC
242607ca46eSDavid Howells  */
243607ca46eSDavid Howells enum reset_mode {
244607ca46eSDavid Howells 	FD_RESET_IF_NEEDED,	/* reset only if the reset flags is set */
245607ca46eSDavid Howells 	FD_RESET_IF_RAWCMD,	/* obsolete */
246607ca46eSDavid Howells 	FD_RESET_ALWAYS		/* reset always */
247607ca46eSDavid Howells };
248607ca46eSDavid Howells #define FDRESET _IO(2, 0x54)
249607ca46eSDavid Howells 
250607ca46eSDavid Howells 
251607ca46eSDavid Howells /*
252607ca46eSDavid Howells  * FDC state
253607ca46eSDavid Howells  */
254607ca46eSDavid Howells struct floppy_fdc_state {
255607ca46eSDavid Howells 	int spec1;		/* spec1 value last used */
256607ca46eSDavid Howells 	int spec2;		/* spec2 value last used */
257607ca46eSDavid Howells 	int dtr;
258607ca46eSDavid Howells 	unsigned char version;	/* FDC version code */
259607ca46eSDavid Howells 	unsigned char dor;
260607ca46eSDavid Howells 	unsigned long address;	/* io address */
261607ca46eSDavid Howells 	unsigned int rawcmd:2;
262607ca46eSDavid Howells 	unsigned int reset:1;
263607ca46eSDavid Howells 	unsigned int need_configure:1;
264607ca46eSDavid Howells 	unsigned int perp_mode:2;
265607ca46eSDavid Howells 	unsigned int has_fifo:1;
266607ca46eSDavid Howells 	unsigned int driver_version;	/* version code for floppy driver */
267607ca46eSDavid Howells #define FD_DRIVER_VERSION 0x100
268607ca46eSDavid Howells /* user programs using the floppy API should use floppy_fdc_state to
269607ca46eSDavid Howells  * get the version number of the floppy driver that they are running
270607ca46eSDavid Howells  * on. If this version number is bigger than the one compiled into the
271607ca46eSDavid Howells  * user program (the FD_DRIVER_VERSION define), it should be prepared
272607ca46eSDavid Howells  * to bigger structures
273607ca46eSDavid Howells  */
274607ca46eSDavid Howells 
275607ca46eSDavid Howells 	unsigned char track[4];
276607ca46eSDavid Howells 	/* Position of the heads of the 4 units attached to this FDC,
277607ca46eSDavid Howells 	 * as stored on the FDC. In the future, the position as stored
278607ca46eSDavid Howells 	 * on the FDC might not agree with the actual physical
279607ca46eSDavid Howells 	 * position of these drive heads. By allowing such
280607ca46eSDavid Howells 	 * disagreement, it will be possible to reset the FDC without
281607ca46eSDavid Howells 	 * incurring the expensive cost of repositioning all heads.
282607ca46eSDavid Howells 	 * Right now, these positions are hard wired to 0. */
283607ca46eSDavid Howells 
284607ca46eSDavid Howells };
285607ca46eSDavid Howells 
286607ca46eSDavid Howells #define FDGETFDCSTAT _IOR(2, 0x15, struct floppy_fdc_state)
287607ca46eSDavid Howells 
288607ca46eSDavid Howells 
289607ca46eSDavid Howells /*
290607ca46eSDavid Howells  * Asynchronous Write error tracking
291607ca46eSDavid Howells  */
292607ca46eSDavid Howells struct floppy_write_errors {
293607ca46eSDavid Howells 	/* Write error logging.
294607ca46eSDavid Howells 	 *
295607ca46eSDavid Howells 	 * These fields can be cleared with the FDWERRORCLR ioctl.
296607ca46eSDavid Howells 	 * Only writes that were attempted but failed due to a physical media
297607ca46eSDavid Howells 	 * error are logged.  write(2) calls that fail and return an error code
298607ca46eSDavid Howells 	 * to the user process are not counted.
299607ca46eSDavid Howells 	 */
300607ca46eSDavid Howells 
301607ca46eSDavid Howells 	unsigned int write_errors;  /* number of physical write errors
302607ca46eSDavid Howells 				     * encountered */
303607ca46eSDavid Howells 
304607ca46eSDavid Howells 	/* position of first and last write errors */
305607ca46eSDavid Howells 	unsigned long first_error_sector;
306607ca46eSDavid Howells 	int           first_error_generation;
307607ca46eSDavid Howells 	unsigned long last_error_sector;
308607ca46eSDavid Howells 	int           last_error_generation;
309607ca46eSDavid Howells 
310607ca46eSDavid Howells 	unsigned int badness; /* highest retry count for a read or write
311607ca46eSDavid Howells 			       * operation */
312607ca46eSDavid Howells };
313607ca46eSDavid Howells 
314607ca46eSDavid Howells #define FDWERRORCLR  _IO(2, 0x56)
315607ca46eSDavid Howells /* clear write error and badness information */
316607ca46eSDavid Howells #define FDWERRORGET  _IOR(2, 0x17, struct floppy_write_errors)
317607ca46eSDavid Howells /* get write error and badness information */
318607ca46eSDavid Howells 
319607ca46eSDavid Howells 
320607ca46eSDavid Howells /*
321607ca46eSDavid Howells  * Raw commands
322607ca46eSDavid Howells  */
323607ca46eSDavid Howells /* new interface flag: now we can do them in batches */
324607ca46eSDavid Howells #define FDHAVEBATCHEDRAWCMD
325607ca46eSDavid Howells 
326607ca46eSDavid Howells struct floppy_raw_cmd {
327607ca46eSDavid Howells 	unsigned int flags;
328607ca46eSDavid Howells #define FD_RAW_READ 1
329607ca46eSDavid Howells #define FD_RAW_WRITE 2
330607ca46eSDavid Howells #define FD_RAW_NO_MOTOR 4
331607ca46eSDavid Howells #define FD_RAW_DISK_CHANGE 4 /* out: disk change flag was set */
332607ca46eSDavid Howells #define FD_RAW_INTR 8    /* wait for an interrupt */
333607ca46eSDavid Howells #define FD_RAW_SPIN 0x10 /* spin up the disk for this command */
334607ca46eSDavid Howells #define FD_RAW_NO_MOTOR_AFTER 0x20 /* switch the motor off after command
335607ca46eSDavid Howells 				    * completion */
336607ca46eSDavid Howells #define FD_RAW_NEED_DISK 0x40  /* this command needs a disk to be present */
337607ca46eSDavid Howells #define FD_RAW_NEED_SEEK 0x80  /* this command uses an implied seek (soft) */
338607ca46eSDavid Howells 
339607ca46eSDavid Howells /* more "in" flags */
340607ca46eSDavid Howells #define FD_RAW_MORE 0x100  /* more records follow */
341607ca46eSDavid Howells #define FD_RAW_STOP_IF_FAILURE 0x200 /* stop if we encounter a failure */
342607ca46eSDavid Howells #define FD_RAW_STOP_IF_SUCCESS 0x400 /* stop if command successful */
343607ca46eSDavid Howells #define FD_RAW_SOFTFAILURE 0x800 /* consider the return value for failure
344607ca46eSDavid Howells 				  * detection too */
345607ca46eSDavid Howells 
346607ca46eSDavid Howells /* more "out" flags */
347607ca46eSDavid Howells #define FD_RAW_FAILURE 0x10000 /* command sent to fdc, fdc returned error */
348607ca46eSDavid Howells #define FD_RAW_HARDFAILURE 0x20000 /* fdc had to be reset, or timed out */
349607ca46eSDavid Howells 
350607ca46eSDavid Howells 	void __user *data;
351607ca46eSDavid Howells 	char *kernel_data; /* location of data buffer in the kernel */
352607ca46eSDavid Howells 	struct floppy_raw_cmd *next; /* used for chaining of raw cmd's
353607ca46eSDavid Howells 				      * within the kernel */
354607ca46eSDavid Howells 	long length; /* in: length of dma transfer. out: remaining bytes */
355607ca46eSDavid Howells 	long phys_length; /* physical length, if different from dma length */
356607ca46eSDavid Howells 	int buffer_length; /* length of allocated buffer */
357607ca46eSDavid Howells 
358607ca46eSDavid Howells 	unsigned char rate;
359607ca46eSDavid Howells 	unsigned char cmd_count;
360607ca46eSDavid Howells 	unsigned char cmd[16];
361607ca46eSDavid Howells 	unsigned char reply_count;
362607ca46eSDavid Howells 	unsigned char reply[16];
363607ca46eSDavid Howells 	int track;
364607ca46eSDavid Howells 	int resultcode;
365607ca46eSDavid Howells 
366607ca46eSDavid Howells 	int reserved1;
367607ca46eSDavid Howells 	int reserved2;
368607ca46eSDavid Howells };
369607ca46eSDavid Howells 
370607ca46eSDavid Howells #define FDRAWCMD _IO(2, 0x58)
371607ca46eSDavid Howells /* send a raw command to the fdc. Structure size not included, because of
372607ca46eSDavid Howells  * batches */
373607ca46eSDavid Howells 
374607ca46eSDavid Howells #define FDTWADDLE _IO(2, 0x59)
375607ca46eSDavid Howells /* flicker motor-on bit before reading a sector. Experimental */
376607ca46eSDavid Howells 
377607ca46eSDavid Howells 
378607ca46eSDavid Howells #define FDEJECT _IO(2, 0x5a)
379607ca46eSDavid Howells /* eject the disk */
380607ca46eSDavid Howells 
381607ca46eSDavid Howells 
382607ca46eSDavid Howells 
383607ca46eSDavid Howells #endif /* _UAPI_LINUX_FD_H */
384