NetBSD Problem Report #1243

From gnats  Wed Jul 19 04:51:36 1995
Received: from uran.informatik.uni-bonn.de (uran.informatik.uni-bonn.de [131.220.8.49]) by sun-lamp.pc.cs.cmu.edu (8.6.11/8.6.10) with ESMTP id EAA06236 for <gnats-bugs@gnats.netbsd.org>; Wed, 19 Jul 1995 04:51:30 -0400
Message-Id: <199507190845.KAA00289@beverly.rhein.de>
Date: Wed, 19 Jul 1995 10:45:29 +0200
From: Ignatios Souvatzis <is@beverly.rhein.de>
Reply-To: is@beverly.rhein.de
To: gnats-bugs@gnats.netbsd.org
Subject: sbic/ahsc sync/unsync problems
X-Send-Pr-Version: 3.2

>Number:         1243
>Category:       port-amiga
>Synopsis:       A3000 scsi hangs switching from/to sync
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 19 05:05:01 +0000 1995
>Closed-Date:    Mon May 06 14:00:14 +0000 1996
>Last-Modified:  Thu Jun 05 05:59:15 +0000 1997
>Originator:     Ignatios Souvatzis
>Release:        950710
>Organization:
	private site
>Environment:
System: NetBSD beverly 1.0A NetBSD 1.0A (BEVERLY) #117: Wed Jul 19 08:56:51 MET DST 1995 root@beverly:/usr/src/sys/arch/amiga/compile/BEVERLY amiga


>Description:
This is an A3000 with 12 MB of fastmem.

Installed disks are:

ahsc0 at mainbus0
scsibus0 at ahsc0
ahsc0 targ 0 lun 0: <QUANTUM, PD210S, 528_> SCSI2 0/direct fixed
sd0 at scsibus0: 199MB, 1156 cyl, 7 head, 50 sec, 512 bytes/sec
ahsc0 targ 1 lun 0: <MAXTOR, 7245-SCSI, 1357> SCSI1 0/direct fixed
sd1 at scsibus0: 234MB, 1944 cyl, 4 head, 61 sec, 512 bytes/sec
ahsc0 targ 2 lun 0: <QUANTUM, FIREBALL1080S, 1P08> SCSI2 0/direct fixed
sd2 at scsibus0: 1042MB, 3835 cyl, 4 head, 139 sec, 512 bytes/sec
ahsc0 targ 4 lun 0: <ARCHIVE, VIPER 150  21247, -005> SCSI1 1/sequential removable
st0 at scsibus0: rogue, drive empty

Problems:

a) When booting netbsd with sbic_inhibit_sync=0, the scsi bus hangs
in the busy state right after sd2 has gone sync with period 208ns
offset=8.

b) When booting netbsd with sbic_inhibit_sync=1 from AmigaOS with the disks 
running in sync mode, the scsibus hangs in the busy state right after the
"scsibus0 at ahsc0" line.

Checks I did: terminators are ok. Last time I looked, the 33c93 was jumpered
to the 14.28 MHz clock (ahsc.c assumes 143 * 100 kHz).

I operated the same disks with sync transfer mode from AmigaOS, so I know
it is possible with my hardware/terminator/cable/power supply combination.

>How-To-Repeat:
	see above.
>Fix:

The well known workaround is to always do everything async on the
SCSI bus. This gets annoying... I'd expect older disks to misbehave
(in fact, the Maxtor unexpectedly disconnects and gets reselected
by the hack in the driver code), but I'd expect an out of the box
disk no older in design than a few months to work right. Somebody
with a scsi2 spec should find out some day whats going wrong.

>Release-Note:
>Audit-Trail:

From: mw@eunet.ch
To: is@beverly.rhein.de
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-amiga/1243: sbic/ahsc sync/unsync problems
Date: Wed, 19 Jul 1995 11:56:54 +0200 (MET DST)

 > >Synopsis:       A3000 scsi hangs switching from/to sync

 Hardware, not software problem...

 > >Confidential:   yes

 Huh?:-)

 > a) When booting netbsd with sbic_inhibit_sync=0, the scsi bus hangs
 > in the busy state right after sd2 has gone sync with period 208ns
 > offset=8.

 The problem with sync transfer is the following:
 * there is *NO* way except hard rebooting (ctl-amiga-amiga, or power-cycle) to
   reset the SCSI bus. The SCSI chip used in the A3000 has no way of driving
   the SCSI reset line with a command (the manual suggests that external logic
   is used to accomplish this). There is no such external logic in the A3000
   (nor on the other CBM controller-boards using the 33c93). You'd have to
   issue the RESET instruction to reset the SCSI bus, and this will unconfigure
   all your autoconfig boards, your memory, etc.
 * since you can't reset the bus, the kernel can't know in which state the
   drives are. This is the major problem.
 * the only thing the driver can assume is asynchronous transfer, as it can't
   possibly guess any perhaps already established synchronous parameters
 * if the drive has been set to synchronous mode previously within AmigaDOS,
   the drive will hang as soon as the first data transmission from it is
   attempted during NetBSD boot.

 So.. the only way I currently see to support synchronous transfer mode in
 NetBSD is to have AmigaDOS *don't* do sync-handhake with the drive, and let
 the NetBSD kernel go sync when booting. 

 -Markus
 -- 
 EUnet AG                                        Markus Wild
 Zweierstrasse 35    Tel:     +41 1 291 45 80	mw@eunet.ch
 CH-8004 Zuerich	    Fax:     +41 1 291 46 42    S=mw;P=EUnet;A=EUnet;C=CH
 >Solaris 2 is not an upgrade from Solaris 1. They just want you to THINK it is.

From: is@Beverly.Rhein.DE (Ignatios Souvatzis)
To: mw@eunet.ch
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: port-amiga/1243: sbic/ahsc sync/unsync problems
Date: Thu, 20 Jul 95 09:52:53 

 Hi Markus,

 > > >Synopsis:       A3000 scsi hangs switching from/to sync
 > 
 > Hardware, not software problem...

 only the first one.

 > > >Confidential:   yes
 > 
 > Huh?:-)

 oops.

 > > a) When booting netbsd with sbic_inhibit_sync=0, the scsi bus hangs
 > > in the busy state right after sd2 has gone sync with period 208ns
 > > offset=8.
 > 
 > The problem with sync transfer is the following:

 No, no. What you describe is the problem with the ASYNC transfer, and I
 fully understand that now, after having looked again at the code. The
 code does nothing about getting the drive async, and didn't reset the
 scsi bus, so the first data transfer fails.

 I'm working on a workaround, but it looks like my tape hangs when it
 gets the RESET msg, and one of my disks needs hours to get ready
 again after a RESET msg, the Quantum Fireball doesn't get handled ok
 after having agreed to do sync with offset 0 (== async), either.

 I guess I have to find out why that happens, it looks like it is related
 to the problem with a real sync transfer.

 > So.. the only way I currently see to support synchronous transfer mode in
 > NetBSD is to have AmigaDOS *don't* do sync-handhake with the drive, and let
 > the NetBSD kernel go sync when booting. 

 noooo... You can renegotiate the same or other sync params whenever you
 want. You just aren't allowed to try DATA transfers in async mode if the
 target thinks it should do sync ones.

 *Sighing deeply* I should have made two PR's out of this one.

 	Ignatios Souvatzis

State-Changed-From-To: open->closed 
State-Changed-By: is 
State-Changed-When: Mon May 6 10:00:14 EDT 1996 
State-Changed-Why:  
This was corrected when the rewritten sbic.c was integrated wometime before  
the -1.1 release. 
>Unformatted:
 Ignatios Souvatzis

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.