*BSD News Article 35532


Return to BSD News archive

Newsgroups: comp.os.386bsd.bugs
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!europa.eng.gtefsd.com!MathWorks.Com!yeshua.marcam.com!charnel.ecst.csuchico.edu!olivea!news.hal.COM!decwrl!netcomsv!netcom.com!bakul
From: bakul@netcom.com (Bakul Shah)
Subject: Re: FreeBSD, fd0d: hard error
Message-ID: <bakulCvpyuw.5nB@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <33j9hp$41l@sol.sun.csd.unb.ca> <jmonroyCvozLK.5q9@netcom.com>
Date: Tue, 6 Sep 1994 17:49:44 GMT
Lines: 41

jmonroy@netcom.com (Jesus Monroy Jr) writes:

>Peter Howlett (b6ps@jupiter.sun.csd.unb.ca) wrote:
>: fd0d: hard error reading fsbn 62 of 64-71
>: (ST0 44<abnrml,top_head> ST1 20<bad_crc> ST2<bad_crc> cyl 1 hd 1 sec 15

>	ST0	is the register -- STATUS REGISTER 0
>	44	is the  hex value 0x44

>		The message returned is an incorrect status
>		of the error.  The high nibble is 4, which 
>		indicates that the FDC received an invalid
>		command.  The low nibble is 4, which indicates
>		on *some* controllers that the drive is
>		not ready.

High nibble == 4 says abnormal termination (it is 8 for an
invalid command).  Bit 2 indicates the head number (the not ready
bit is bit D3).  The error message correctly decodes ST0 bits.

>	
>	To make this short, it is quite possible that one of
>	the applications you ran decided that it could read
>	more than 15 sectors on a track, which on a 1.2 meg
>	diskette is not possible.   This is pointed to by
>	the remaining registers that point to the last 
>	successfully completed transfer,  a side effect of
>	most FDC controllers.   

Sectors are numbered 1 through 15 and the error message reports
sec 15, which is a valid sector number.

One possibility is the value in the GPL byte of the read/write
command is incorrect.  I don't have FreeBSD sources anymore but a
cursory glance at fd.c of NetBSD reveals this value to be on the
high side for atleast the 1.2MB floppy type.  In general the gap1
value should be lower for higher number of sectors/track.  The
gap1 values used in FreeBSD fd driver should be compared against
what Linux and dos do and corrected if necessary.

Bakul Shah