Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Mar 2000 14:06:26 +0000
From:      freebsd@mrynet.com (FreeBSD mailing list)
To:        bloom@acm.org
Cc:        freebsd-current@freebsd.org
Subject:   Re: fd0: Debugger("d_iocmd botch") called.
Message-ID:  <200003242206.OAA00645@mrynet.com>

next in thread | raw e-mail | index | archive | help
Jim Bloom wrote:
> I reproduced the problem and have attached a patch.  It was the exact
> same problem as in swap_pager.c (assuming B_WRITE was 0).  Hopefully phk
> will commit this fix shortly.
> 
> Index: sys/isa/fd.c
> ===================================================================
> RCS file: /users/ncvs/src/sys/isa/fd.c,v
> retrieving revision 1.179
> diff -u -r1.179 fd.c
> --- sys/isa/fd.c	2000/03/20 11:28:39	1.179
> +++ sys/isa/fd.c	2000/03/24 20:20:53
> @@ -2228,6 +2228,7 @@
>  	BUF_LOCKINIT(bp);
>  	BUF_LOCK(bp, LK_EXCLUSIVE);
>  	bp->b_flags = B_PHYS | B_FORMAT;
> +	bp->b_iocmd = BIO_WRITE;
>  
>  	/*
>  	 * calculate a fake blkno, so fdstrategy() would initiate a

This patch does indeed fix the writing of floppies.  However, fdformat(1)
still fails as follows:

ttyp7:--ROOT--@mrynet (22): fdformat -f 1440 fd0.1440
Format 1440K floppy `/dev/fd0.1440'? (y/n): y
Processing EE^C------------------------------------

with /var/log/messages indicating:
Mar 24 13:51:13 mrynet /kernel: fd0c: hard error reading fsbn 0 of 0-17 (ST0 40<abnrml> ST1 4<sec_not_fnd> ST2 0
cyl 0 hd 0 sec 2)
Mar 24 13:51:13 mrynet /kernel: fd0c: hard error reading fsbn 0 of 0-17 (ST0 40<abnrml> ST1 4<sec_not_fnd> ST2 0
cyl 0 hd 0 sec 2)
Mar 24 13:51:13 mrynet /kernel: fd0c: hard error reading fsbn 18 of 18-35 (ST0 44<abnrml,top_head> ST1
4<sec_not_fnd> ST2 0 cyl 0 hd 1 sec 2)
Mar 24 13:51:13 mrynet /kernel: fd0c: hard error reading fsbn 18 of 18-35 (ST0 44<abnrml,top_head> ST1
4<sec_not_fnd> ST2 0 cyl 0 hd 1 sec 2)
Mar 24 13:51:14 mrynet /kernel: fd0c: hard error reading fsbn 36 of 36-53 (ST0 40<abnrml> ST1 4<sec_not_fnd> ST2 0
cyl 1 hd 0 sec 2)
Mar 24 13:51:14 mrynet /kernel: fd0c: hard error reading fsbn 36 of 36-53 (ST0 40<abnrml> ST1 4<sec_not_fnd> ST2 0
cyl 1 hd 0 sec 2)
(and continuing).

Additionally, reading a floppy returns errors for any read:
(This is a freshly formatted floppy verified on other machines)

ttyp7:--ROOT--@mrynet (7): dd if=/dev/rfd0.1440 | wc
dd: /dev/rfd0.1440: Input/output error
0+0 records in
0+0 records out
0 bytes transferred in 2.395566 secs (0 bytes/sec)
       0       0       0

with /var/log/messages indicating:
Mar 24 14:04:28 mrynet /kernel: fd0c: hard error reading fsbn 0 (ST0 40<abnrml> ST1 4<sec_not_fnd> ST2 0 cyl 0 hd 0
sec 2)
Mar 24 14:04:38 mrynet /kernel: fd0c: hard error reading fsbn 0 (ST0 40<abnrml> ST1 4<sec_not_fnd> ST2 0 cyl 0 hd 0
sec 2)


Thanks,
-scott
--
Scott G. Akmentins-Taylor     InterNet: staylor@mrynet.com
MRY Systems			        staylor@mrynet.lv


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003242206.OAA00645>