Subject: Re: revamped floppy driver
To: John Nemeth <jnemeth@victoria.tc.ca>
From: Tobias Nygren <tnn+nbsd@nygren.pp.se>
List: port-sparc
Date: 03/25/2007 14:08:20
John Nemeth wrote:
> I used the sparc floppy driver to create a floppy driver for
> sparc64. I've been doing a fair bit of work on the latter, including
> fixing the problem with formatting. However, now it is time to find
> out if I broke it for sparc. I'm looking for people to test it. All
> you need to do is cp sys/arch/sparc64/fdc.c sys/arch/sparc/fd.c, and
> rebuild your kernel. Then try it out (read, write, eject, and
> format). To format a floppy, use fdformat, then
> 'newfs_msdos -f 1440 /dev/rfd0a'.
>
/u/src/sys/arch/sparc/dev/fd.c:170:1: error: "FTC_FLIP" redefined
In file included from /u/src/sys/arch/sparc/dev/fd.c:145:
/u/src/sys/arch/sparc/sparc/auxreg.h:104:1: error: this is the location
of the previous definition
-
/u/src/sys/arch/sparc/dev/fd.c: In function 'fdcattach_obio':
/u/src/sys/arch/sparc/dev/fd.c:666: warning: implicit declaration of
function 'print'
/u/src/sys/arch/sparc/dev/fd.c: In function 'fdcattach':
/u/src/sys/arch/sparc/dev/fd.c:835: error: expected ')' before
'fdc_c_hwintr'
/u/src/sys/arch/sparc/dev/fd.c:835: error: too few arguments to function
'bus_intr_establish2'
After fixing those things, it does compile, write, read, and eject.
I still get verify errors when formatting but this is broken on
netbsd-4 as well. Might be the drive that is giving up the ghost.
Script started on Sun Mar 25 13:42:21 2007
# uname -a
NetBSD jihbed.int.nygren.pp.se 4.99.16 NetBSD 4.99.16 (GENERIC) #0: Sun
Mar 25 13:38:48 CEST 2007
tnn@virt01.int.nygren.pp.se:/tmp/build/sparc/obj/sys/arch/sparc/compile/GENERIC
sparc
# ident /netbsd | grep fdc
$NetBSD: fdc.c,v 1.10 2007/03/25 09:29:11 jnemeth Exp $
# fdformat
Ready to format /dev/rfd0a with 80 cylinders, 2 tracks, 18 sectors of
512 bytes
(1440 KB) Yes/no [y]?yes
Formatting track 0 / head 0
Formatting track 0 / head 1
Formatting track 1 / head 0
Formatting track 1 / head 1
Formatting track 2 / head 0
Formatting track 2 / head 1
Formatting track 3 / head 0
Formatting track 3 / head 1
Formatting track 4 / head 0
Formatting track 4 / head 1
Formatting track 5 / head 0
Formatting track 5 / head 1
Formatting track 6 / head 0
Formatting track 6 / head 1
Formatting track 7 / head 0
Formatting track 7 / head 1
Formatting track 8 / head 0
Formatting track 8 / head 1
Formatting track 9 / head 0
Formatting track 9 / head 1
Formatting track 10 / head 0
Formatting track 10 / head 1
Formatting track 11 / head 0
Formatting track 11 / head 1
Formatting track 12 / head 0
Formatting track 12 / head 1
Formatting track 13 / head 0
Formatting track 13 / head 1
Formatting track 14 / head 0
Formatting track 14 / head 1
Formatting track 15 / head 0
Formatting track 15 / head 1
Formatting track 16 / head 0
Formatting track 16 / head 1
Formatting track 17 / head 0
Formatting track 17 / head 1
Formatting track 18 / head 0
Formatting track 18 / head 1
Formatting track 19 / head 0
Formatting track 19 / head 1
Formatting track 20 / head 0
Formatting track 20 / head 1
Formatting track 21 / head 0
Formatting track 21 / head 1
Formatting track 22 / head 0
Formatting track 22 / head 1
Formatting track 23 / head 0
Formatting track 23 / head 1
Formatting track 24 / head 0
Formatting track 24 / head 1
Formatting track 25 / head 0
Formatting track 25 / head 1
Formatting track 26 / head 0
Formatting track 26 / head 1
Formatting track 27 / head 0
Formatting track 27 / head 1
Formatting track 28 / head 0
Formatting track 28 / head 1
Formatting track 29 / head 0
Formatting track 29 / head 1
Formatting track 30 / head 0
Formatting track 30 / head 1
Formatting track 31 / head 0
Formatting track 31 / head 1
Formatting track 32 / head 0
Formatting track 32 / head 1
Formatting track 33 / head 0
Formatting track 33 / head 1
Formatting track 34 / head 0
Formatting track 34 / head 1
Formatting track 35 / head 0
Formatting track 35 / head 1
Formatting track 36 / head 0
Formatting track 36 / head 1
Formatting track 37 / head 0
Formatting track 37 / head 1
Formatting track 38 / head 0
Formatting track 38 / head 1
Formatting track 39 / head 0
Formatting track 39 / head 1
Formatting track 40 / head 0
Formatting track 40 / head 1
Formatting track 41 / head 0
Formatting track 41 / head 1
Formatting track 42 / head 0
Formatting track 42 / head 1
Formatting track 43 / head 0
Formatting track 43 / head 1
Formatting track 44 / head 0
Formatting track 44 / head 1
Formatting track 45 / head 0
Formatting track 45 / head 1 - VERIFY ERROR
Formatting track 46 / head 0
Formatting track 46 / head 1
Formatting track 47 / head 0
Formatting track 47 / head 1
Formatting track 48 / head 0
Formatting track 48 / head 1
Formatting track 49 / head 0
Formatting track 49 / head 1
Formatting track 50 / head 0
Formatting track 50 / head 1
Formatting track 51 / head 0
Formatting track 51 / head 1
Formatting track 52 / head 0
Formatting track 52 / head 1
Formatting track 53 / head 0
Formatting track 53 / head 1
Formatting track 54 / head 0
Formatting track 54 / head 1
Formatting track 55 / head 0
Formatting track 55 / head 1 - VERIFY ERROR
Formatting track 56 / head 0
Formatting track 56 / head 1 - VERIFY ERROR
Formatting track 57 / head 0
Formatting track 57 / head 1
Formatting track 58 / head 0
Formatting track 58 / head 1
Formatting track 59 / head 0
Formatting track 59 / head 1 - VERIFY ERROR
Formatting track 60 / head 0
Formatting track 60 / head 1
Formatting track 61 / head 0
Formatting track 61 / head 1 - VERIFY ERROR
Formatting track 62 / head 0
Formatting track 62 / head 1
Formatting track 63 / head 0
Formatting track 63 / head 1
Formatting track 64 / head 0
Formatting track 64 / head 1
Formatting track 65 / head 0
Formatting track 65 / head 1
Formatting track 66 / head 0
Formatting track 66 / head 1
Formatting track 67 / head 0
Formatting track 67 / head 1
Formatting track 68 / head 0
Formatting track 68 / head 1
Formatting track 69 / head 0
Formatting track 69 / head 1
Formatting track 70 / head 0
Formatting track 70 / head 1
Formatting track 71 / head 0
Formatting track 71 / head 1 - VERIFY ERROR
Formatting track 72 / head 0
Formatting track 72 / head 1
Formatting track 73 / head 0
Formatting track 73 / head 1
Formatting track 74 / head 0
Formatting track 74 / head 1
Formatting track 75 / head 0
Formatting track 75 / head 1 - VERIFY ERROR
Formatting track 76 / head 0
Formatting track 76 / head 1 - VERIFY ERROR
Formatting track 77 / head 0
Formatting track 77 / head 1 - VERIFY ERROR
Formatting track 78 / head 0
Formatting track 78 / head 1
Formatting track 79 / head 0 - VERIFY ERROR
Formatting track 79 / head 1 - VERIFY ERROR
Formatting 160 tracks total complete.
fdformat: 11 track formatting errors
# dd if=floppy.bin of=/dev/rfd0a bs=8k
180+0 records in
180+0 records out
1474560 bytes transferred in 81.701 secs (18048 bytes/sec)
# dd if=/dev/rfd0a of=floppy.out bs=8k
fdcresult: overrun
fd0a: soft error reading fsbn 1320 of 1312-1327
fd0a: soft error reading fsbn 2008 of 2000-2015
fd0a: soft error reading fsbn 2072 of 2064-2079
fd0a: soft error reading fsbn 2152 of 2144-2159
fd0a: soft error reading fsbn 2296 of 2288-2303
fd0a: soft error reading fsbn 2512 of 2512-2527
fd0a: soft error reading fsbn 2584 of 2576-2591
fd0a: soft error reading fsbn 2616 of 2608-2623
fd0a: soft error reading fsbn 2680 of 2672-2687
fd0a: soft error reading fsbn 2688 of 2688-2703
fd0a: soft error reading fsbn 2720 of 2720-2735
fd0a: soft error reading fsbn 2744 of 2736-2751
fd0a: soft error reading fsbn 2760 of 2752-2767
fd0a: soft error reading fsbn 2768 of 2768-2783
fd0a: soft error reading fsbn 2792 of 2784-2799
fd0a: soft error reading fsbn 2808 of 2800-2815
fd0a: soft error reading fsbn 2824 of 2816-2831
fd0a: soft error reading fsbn 2832 of 2832-2847
fd0a: soft error reading fsbn 2840 of 2832-2847
fd0a: soft error reading fsbn 2844 of 2832-2847
fd0a: soft error reading fsbn 2848 of 2848-2863
fd0a: soft error reading fsbn 2856 of 2848-2863
fd0a: soft error reading fsbn 2864 of 2864-2879
fd0a: soft error reading fsbn 2872 of 2864-2879
180+0 records in
180+0 records out
1474560 bytes transferred in 99.567 secs (14809 bytes/sec)
# md5 floppy.bin floppy.out
MD5 (floppy.bin) = c4403697338b299f71251bc0a0b6121b
MD5 (floppy.out) = c4403697338b299f71251bc0a0b6121b