Cryptic HD I/O error messages

Marc de Groot mdg at uport.UUCP
Sat Jun 18 07:41:55 AEST 1988


	This posting describes the meanings of those cryptic numbers
that get printed out with an HD I/O error message.

	The three numbers are labeled status, estat, and drstat.  They are
the contents of three registers in the hard disk controller at the time of
the error.  They are displayed in hexadecimal, or base 16.  In order to
decode the error info, you need to know how to convert hexadecimal to binary.
Ask your local guru; it is beyond the scope of this posting.

	Some of the registers have different names in the Western Digital
reference material:
	- status is still called the status register.
	- estat is called the error register.
	- drstat is called the SDH byte (SDH stands for Sector, Drive, Head).


		The Status Register (status)

	-------------------------------------------------
	| BSY | RDY | WF  | SC  | DRQ | CD  | IDX | ERR |
	-------------------------------------------------
	   7     6     5     4     3     2     1     0

BSY 	(Busy)  When this bit is set to 1 the controller is executing a command.
	If this bit is set, bits 1, 4, 5, and 6 of the status register
	are valid, and all other bits (in all registers) may not be
	considered valid.

RDY	(Drive Ready)	These bits reflect the states of the drive signals
WF	(Write Fault)	of the same names.  The drive signals are actual
SC	(Seek Complete)	wires in the drive cable.
IDX	(Index)

DRQ	(Data Request)	When this bit is set to a 1 the controller is
	waiting for one sector (512 bytes for Microport UNIX) to either
	be written to or read from the controller's sector buffer.

CD	(Corrected Data)  If this bit is set after a read command, the sector
	in the sector buffer was corrected using the controller's error-
	correcting code feature.

ERR	(Error)  If this bit is set, the last hard disk command resulted in
	an error.  All HD I/O errors reported by the Microport hard disk
	driver will show this bit to be set.



		The Error Register (estat)

	-------------------------------------------------
	| DNF | TK0 | AC  | CC  | INF | WP  | ECC | BB  |
	-------------------------------------------------
	   7     6     5     4     3     2     1     0

DNF	(Data Address Mark Not Found)  This bit, when set, indicates that
	the Data Address Mark was not found in the sector header.

TK0	(Track 0 Error)  This bit is set when the drive cannot find track 0.

AC	(Aborted Command)  This bit is set if the controller receives an
	invalid command, or if the Drive Not Ready, No Seek Complete, or
	Write Fault conditions are present on the drive.

CC	(Cartridge Changed)  This bit is only used with removable media,
	and will never be seen with ST-506 fixed disks under Microport UNIX.

INF	(ID Not Found)  When set, this bit indicates that the desired sector
	header ID field was not found.

WP	(Write Protected)  This bit, like the CC bit, is only used with
	removable media and will never be seen with ST-506 fixed disks under
	Microport UNIX.

ECC	(Data ECC Error)  This bit is set to 1 if a data error occurs which
	cannot be corrected with the error-correcting code feature.

BB	(Bad Block Detected)  This bit indicates that a sector was read or
	written which has the bad block flag set in its sector header.


		The SDH Byte (drstat)

	-------------------------------------------------
	|  1  |  0  |  1  | DRV |     Head Select       |
	-------------------------------------------------
	   7     6     5     4     3     2     1     0

DRV	(Drive Number) This bit is a zero for drive 0, and a one for
	drive 1.

Head 	These bits give the head number on which the error occurred.
Select

------------------------------------------------------------------------------

Hope this info helps.  Please note that there will be a much-improved
hard disk error-reporting routine in the next releases of our porducts.

						Marc de Groot
						Senior Engineer/Hard Disk Guru


-- 
Marc de Groot (KG6KF)	| UUCP: {hplabs, sun, ucbvax}!amdcad!uport!mdg
Microport Systems, Inc.	| 	uunet!uport!mdg
10 Victor Square	|
Scotts Valley, CA 95066	|



More information about the Comp.unix.microport mailing list