*BSD News Article 17673


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!osuunx.ucc.okstate.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!decwrl!world!ksr!jfw@ksr.com
From: jfw@ksr.com (John F. Woods)
Newsgroups: comp.os.386bsd.development
Subject: [netbsd-current] Bug in latest floppy driver
Message-ID: <28830@ksr.com>
Date: 29 Jun 93 11:58:00 EDT
Sender: news@ksr.com
Organization: Kendall Square Research Corp.
Lines: 18


There is a bug in the floppy driver in the netbsd-current sources
(which may also be present in the latest 386bsd patchkit as well,
someone may want to check).  In fdattach() [I think], an uninitialized
variable (fdsu) is used to initialize the structure element that will
later be used for the floppy-drive select bits.  The result:
operation timeouts and other loony behavior from the floppy driver.
The fix is to change this line:

  	fdcu_t	fdcu = dev->id_masunit;
  	fdc_p	fdc = &fdc_data[dev->id_masunit];
  	fd_p	fd = &fd_data[dev->id_unit];
! 	int	fdsu;
  
to

! 	int	fdsu = dev->id_physid;