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.
This commit is contained in:
+8
-1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user