summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1994-10-07 21:17:41 +0000
committerphk <phk@FreeBSD.org>1994-10-07 21:17:41 +0000
commit719bcaffe999c19165a06b472df5332972876877 (patch)
treefb84129e75ebb5064269d30a1aa4dec0d11d1326 /sys/i386
parentc680e0960e96d41131b7ba77d6199e38f7c5bb4e (diff)
downloadFreeBSD-src-719bcaffe999c19165a06b472df5332972876877.zip
FreeBSD-src-719bcaffe999c19165a06b472df5332972876877.tar.gz
Reviewed by: phk
Submitted by: Thomas David Rivers <rivers%ponds@ncren.net> WARNING: might hide some bug below! I commit this to improve the stability of 2.0. Thomas wrote: ------------- I have been running a kernel with this change since October 4th; barring unrelated network router troubles, the pitiful little machine has completed several builds without any interaction from me, and continues to chug along. I re-read wd.c, and added appropriate printfs() to look for references to dk_badsect[]. My changes should have printed something when dk_badsect[] was referenced. I got no output :-( Thus, I'm forced to concluded that something else is examining some spurious memory... which happened to be in dk_badsect[] of the disk structure in wd.c. I can find no other explanation of why this unnecessary initialization causes things to operate correctly. On the premise that such an initialization isn't going to hurt anything, I'm going to suggest it go into 2.0. I'd like to thank everyone for there assistance, particularly David, John and Bruce.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/isa/wd.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/i386/isa/wd.c b/sys/i386/isa/wd.c
index a5e68ee..1166233 100644
--- a/sys/i386/isa/wd.c
+++ b/sys/i386/isa/wd.c
@@ -37,7 +37,7 @@ static int wdtest = 0;
* SUCH DAMAGE.
*
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
- * $Id: wd.c,v 1.47 1994/10/01 02:56:21 davidg Exp $
+ * $Id: wd.c,v 1.48 1994/10/02 17:41:44 phk Exp $
*/
/* TODO:
@@ -299,6 +299,13 @@ wdattach(struct isa_device *dvp)
du->dk_unit = unit;
du->dk_lunit = lunit;
du->dk_port = dvp->id_iobase;
+ {
+ /* Initialize the badsect list to indicate no */
+ /* bad sectors. */
+ int i;
+ for (i = 0; i < 127; i++)
+ du->dk_badsect[i] = -1;
+ }
/*
* Print out description of drive.
OpenPOWER on IntegriCloud