Return to BSD News archive
Path: sserve!manuel!munnari.oz.au!samsung!uakari.primate.wisc.edu!caen!uwm.edu!linac!unixhub!ditka!mini!demax!mikel From: mikel@demax.uucp (Mikel Lechner) Newsgroups: comp.unix.bsd Subject: Re: 386bsd-0.1: primary bootstrap (wdbootblk.c) problem & fix. Keywords: 386bsd boot bootstrap wdbootblk.c Message-ID: <1992Jul30.014356.14453@demax.uucp> Date: 30 Jul 92 01:43:56 GMT References: <greg.712111605@hibp1.ecse.rpi.edu> <1992Jul27.172708.3363@gateway.novell.com> <greg.712261295@hibp1.ecse.rpi.edu> <1992Jul27.192502.15727@gateway.novell.com> <greg.712267214@hibp1.ecse.rpi.edu> Organization: Demax Software Inc. Lines: 31 In <greg.712267214@hibp1.ecse.rpi.edu> greg@ecse.rpi.edu (Greg) writes: > When I first read about the other patch, I did try checking wd_alsts >rather than wd_status. Not knowing didley about the disk controller, >I'm not sure what the difference between these two registers are. The only real difference is that the alternate status register does not clear the pending interrupt flag. This can be used to check the disk controller status outside of the interrept handler without affecting any I/O operation in progress. I don't know if this is related, but I fixed a problem in the wd.c code which caused by system to hang when I added a second hard disk. The problem was the disk initialization code was not checking that the controller was ready before command it to perform a restore. Apparently, the disk controller is not ready quite as quickly when there is only one disk. Therefore the disk command is not started and the interrupt for the disk never appears. I fixed this problem for myself by putting all the disk controller register manipulation into a single function which performs the important checks before commanding the controller. I also added a timeout in case the interrupt never appears, but haven't needed it. I haven't yet looked at 0.1. -- Mikel -- Mikel Lechner E-mail: demax!mikel Demax Software, Inc. Phone: (415) 341-9017