163278Smckusick /*- 2*63370Sbostic * Copyright (c) 1993 3*63370Sbostic * The Regents of the University of California. All rights reserved. 463278Smckusick * 563278Smckusick * %sccs.include.redist.c% 663278Smckusick * 7*63370Sbostic * @(#)saio.h 8.1 (Berkeley) 06/11/93 863278Smckusick */ 963278Smckusick 1063278Smckusick /* I/O block */ 1163278Smckusick struct iob { 1263278Smckusick int i_flgs; /* flags (see F_*) */ 1363278Smckusick int i_adapt; /* adapter or bus */ 1463278Smckusick int i_ctlr; /* controller */ 1563278Smckusick int i_unit; /* pseudo device unit */ 1663278Smckusick int i_part; /* disk partition */ 1763278Smckusick daddr_t i_boff; /* block offset on device */ 1863278Smckusick daddr_t i_cyloff; /* cylinder offset on device */ 1963278Smckusick off_t i_offset; /* seek offset in file */ 2063278Smckusick dev_t i_dev; /* associated device */ 2163278Smckusick daddr_t i_bn; /* 1st block # of next read */ 2263278Smckusick char *i_ma; /* memory address of I/O buffer */ 2363278Smckusick int i_cc; /* character count of transfer */ 2463278Smckusick int i_error; /* error # return */ 2563278Smckusick int i_errcnt; /* error count for driver retries */ 2663278Smckusick int i_errblk; /* block # in error for error reporting */ 2763278Smckusick }; 2863278Smckusick 2963278Smckusick /* Codes for sector header word 1 */ 3063278Smckusick #define HDR1_FMT22 0x1000 /* standard 16 bit format */ 3163278Smckusick #define HDR1_OKSCT 0xc000 /* sector ok */ 3263278Smckusick #define HDR1_SSF 0x2000 /* skip sector flag */ 3363278Smckusick 3463278Smckusick /* I/O flag values */ 3563278Smckusick #define F_READ 0x0001 /* file opened for reading */ 3663278Smckusick #define F_WRITE 0x0002 /* file opened for writing */ 3763278Smckusick #define F_ALLOC 0x0004 /* buffer allocated */ 3863278Smckusick #define F_FILE 0x0008 /* file instead of device */ 3963278Smckusick #define F_NBSF 0x0010 /* no bad sector forwarding */ 4063278Smckusick #define F_ECCLM 0x0020 /* limit # of bits in ecc correction */ 4163278Smckusick #define F_SSI 0x0040 /* set skip sector inhibit */ 4263278Smckusick #define F_SEVRE 0x0080 /* Severe burnin (no retries, no ECC) */ 4363278Smckusick 4463278Smckusick /* I/O types */ 4563278Smckusick #define F_RDDATA 0x0100 /* read data */ 4663278Smckusick #define F_WRDATA 0x0200 /* write data */ 4763278Smckusick #define F_HDR 0x0400 /* include header on next i/o */ 4863278Smckusick #define F_CHECK 0x0800 /* perform check of data read/write */ 4963278Smckusick #define F_HCHECK 0x1000 /* perform check of header and data */ 5063278Smckusick 5163278Smckusick #define F_TYPEMASK 0xff00 /* I/O type mask */ 5263278Smckusick 5363278Smckusick #ifdef COMPAT_42 5463278Smckusick /* 5563278Smckusick * Old drive description table. 5663278Smckusick * still used by some drivers for now. 5763278Smckusick */ 5863278Smckusick struct st { 5963278Smckusick short nsect; /* # sectors/track */ 6063278Smckusick short ntrak; /* # tracks/surfaces/heads */ 6163278Smckusick short nspc; /* # sectors/cylinder */ 6263278Smckusick short ncyl; /* # cylinders */ 6363278Smckusick short *off; /* partition offset table (cylinders) */ 6463278Smckusick }; 6563278Smckusick #endif 66