*BSD News Article 6109


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel!munnari.oz.au!uunet!charon.amdahl.com!pacbell.com!iggy.GW.Vitalink.COM!cs.widener.edu!dsinc!spool.mu.edu!agate!tfs.com!tfs.com!julian
From: julian@tfs.com (Julian Elischer)
Subject: Re: problems with Julian's SCSI 0.3 beta <PATCH>
Message-ID: <1992Oct6.045837.4331@tfs.com>
Organization: TRW Financial Systems
References: <48289@shamash.cdc.com>
Date: Tue, 6 Oct 1992 04:58:37 GMT
Lines: 89

In article <48289@shamash.cdc.com> pbd@runyon.cim.cdc.com (Paul Dokas) writes:
>I installed Julian's scsi subsystem today (0.3 beta, the one that came
>over this weekend) and I have a couple problems with it.
>
>I've got an AHA1542 with an internal WREN IV and an external IMPRIMIS 94601.
>When I boot, fsck complains the it can't open /dev/sd1a because of unknown
>error 424.  I can't even run fsck manually because of this error.
>
>Here's other info that might be helpful:
>
>/var/log/messages records:
>
> pc0<color> at 0x60 irq 1 on isa
> com1 at 0x3f8 irq 4 on isa
> fd0 drives 0: 1.2M, 1: 1.44M at 0x3f0 irq 6 drq 2 on isa
> aha0 reading board settings, 150 nSEC ok, use 200 nSEC
>   **aha0 probing for scsi devices**
>   dev0,lu0: type 0(direct),fixed 'CDC     94171-9         8856' scsi1
>  sd0: 306MB, cyls 1549, heads 9, secs 45, bytes/sec 512
>   dev1,lu0: type 1(sequential),removable 'ARCHIVE VIPER 150  21247-603
>  st0: scsi tape drive, 0 blocks of 512 bytes
>   dev2,lu0: type 0(direct),fixed 'IMPRIMIS94601-15        4614' scsi1
>  sd1: 990MB, cyls 1931, heads 15, secs 70, bytes/sec 512

OK, it all looks ok up to here. So the drive is responding correctly.

> aha0 at 0x330 irq 11 drq 5 on isa
> we0 ethernet address 00:00:c0:a6:65:10 at 0x280 irq 9 on isa
>
>the messages that I get on the console are:
>
>Automatic reboot in progress...
>/dev/rsd0a: 514 files, 8768 used, 10375 free (63 frags, 1289 blocks, 0.3% fragmentation)
>Can't open /dev/rsd1a: Unknown error 424

The 'unknown error' message is not from the scsi driver
therefore I must be returning a bad error code, which the
fsck program is reporting...
hmmm looks at code.....

aha! I think I have it

in sd.c, line 794
the line should read:
	if(sd->flags & SDHAVELABEL) return(ESUCCESS);

	rather than 

	if(sd->flags & SDHAVELABEL) return;

Or in patch form:

*** sd.c.oops   Mon Oct  5 21:41:00 1992
--- sd.c        Mon Oct  5 21:39:58 1992
***************
*** 791,797 ****
	/*******************************************************\
!	* If the inflo is already loaded, use it		*
	\*******************************************************/
!	if(sd->flags & SDHAVELABEL) return;

	bzero(&sd->disklabel,sizeof(struct disklabel));
	/*******************************************************\
--- 791,797 ----
	/*******************************************************\
!	* If the info is already loaded, use it			*
	\*******************************************************/
!	if(sd->flags & SDHAVELABEL) return(ESUCCESS);

	bzero(&sd->disklabel,sizeof(struct disklabel));
	/*******************************************************\


wow a real bug

now the question is WHY did it think it already had a label when
I bet it didn't? well, maybe something else already touched
the disk.. give this a try and we'll see how it goes

julian
+----------------------------------+       ______ _  __
|   __--_|\  Julian Elischer       |       \     U \/ / On assignment
|  /       \ julian@tfs.com        +------>x   USA    \ in a very strange
| (   OZ    ) 2118 Milvia st. Berkeley CA. \___   ___ | country !
+- X_.---._/  USA+(510) 704-3137(wk)           \_/   \\            
          v