NetBSD Problem Report #6849

Received: (qmail 20139 invoked from network); 19 Jan 1999 14:33:29 -0000
Message-Id: <199901191433.GAA03197@nooksack.ldc.cs.wwu.edu>
Date: Tue, 19 Jan 1999 06:33:27 -0800 (PST)
From: matthias.andree@stud.uni-dortmund.de
Reply-To: matthias.andree@gmx.de
To: gnats-bugs@gnats.netbsd.org
Subject: NCR SCSI driver negotiates wide transfer on 53C875 narrow host and UWSCSI disk
X-Send-Pr-Version: www-1.0

>Number:         6849
>Category:       kern
>Synopsis:       NCR SCSI driver negotiates wide transfer on 53C875 narrow host and UWSCSI disk
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    bouyer
>State:          analyzed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 19 06:35:00 +0000 1999
>Closed-Date:    
>Last-Modified:  Tue Apr 27 21:49:14 +0000 2004
>Originator:     Matthias Andree
>Release:        1.3.2
>Organization:
>Environment:
cannot install NetBSD, meant to be installed on AMD K6-2/300 w/ 64 MB
RAM, Tekram DC-390U (SYM53C875 narrow) and Micropolis 4345WS
>Description:
Upon scanning the PCI bus, the ncr driver finds my *narrow* SYM53C875 
host adapter (Tekram DC-390U) and scans the SCSI bus. It then finds an
Ultra-Wide disk (connected via 68->50 adaptor plug) and negotiates
16-bit wide transfers and chokes since it cannot read required Inquiry
and partition data from the drive. This state is fatal, the NetBSD kernel
locks in an endless loop. 1.3.3 changelog does not contain any case-
insensitive references to "ncr". 

It MIGHT be the ncr driver mis-reads Tekram NVRAM/EEPROM configuration
data, I cannot currently detect that. 
>How-To-Repeat:


>Fix:
Let the driver check if its SCSI host adaptor is narrow or wide SCSI
and limit the transfer width to the lowest common denominator, i. e.
8 bit in this case. Attention! The SYM53C875 can be used in both narrow
AND wide environments, so 875==narrow is a wrong assumption (maybe it's
good for emergency "I need to boot at all cost" cases, but not beyond)
>Release-Note:
>Audit-Trail:

From: Matthias Andree <mandree@dosis.uni-dortmund.de>
To: gnats-bugs@netbsd.org
Cc:  Subject: kern/6849
Date: Wed, 10 Feb 1999 20:27:00 +0100

 Appending this by request from Ignatios Souvatsis:
 relevant boot-up messages grabbed from Linux 2.2.1

 ncr53c8xx: at PCI bus 0, device 9, function 0
 ncr53c8xx: 53c875 detected with Tekram NVRAM
 ncr53c875-0: rev=0x03, base=0xea001000, io_port=0xe800, irq=12
 ncr53c875-0: Tekram format NVRAM, ID 6, Fast-20, Parity Checking
 ncr53c875-0: on-chip RAM at 0xea000000
 ncr53c875-0: restart (scsi reset).
 ncr53c875-0: Downloading SCSI SCRIPTS.
 ...
 scsi2 : ncr53c8xx - revision 3.1f
 ...
   Vendor: MICROP    Model: 4345WS            Rev: x43h
   Type:   Direct-Access                      ANSI SCSI revision: 02
 Detected scsi disk sda at scsi2, channel 0, id 0, lun 0
   Vendor: PLEXTOR   Model: CD-ROM PX-32TS    Rev: 1.02
   Type:   CD-ROM                             ANSI SCSI revision: 02
 Detected scsi CD-ROM sr0 at scsi2, channel 0, id 2, lun 0
   Vendor: YAMAHA    Model: CDR400t           Rev: 1.0q
   Type:   CD-ROM                             ANSI SCSI revision: 02
 Detected scsi CD-ROM sr1 at scsi2, channel 0, id 4, lun 0
 ncr53c875-0-<0,0>: tagged command queue depth set to 32
 scsi : detected 2 SCSI cdroms 1 SCSI disk total.
 ncr53c875-0-<2,*>: FAST-20 SCSI 20.0 MB/s (50 ns, offset 15)
 Uniform CDROM driver Revision: 2.52
 ncr53c875-0-<4,*>: SYNC transfers not supported.
 sr1: scsi3-mmc drive: 6x/6x writer xa/form2 cdda tray
 ncr53c875-0-<0,*>: FAST-20 SCSI 20.0 MB/s (50 ns, offset 15)
 SCSI device sda: hdwr sector= 512 bytes. Sectors= 8890029 [4340 MB] [4.3 GB]
 Partition check:
  sda: sda2 < sda5 sda6 sda7 sda8 sda9 sda10 >
  hda: hda1 hda2 < hda5 >
 VFS: Mounted root (ext2 filesystem) readonly.
 ...

From: Matthias Andree <ma@dt.e-technik.uni-dortmund.de>
To: gnats-bugs@netbsd.org
Cc:  Subject: kern/6849
Date: Tue, 21 Dec 1999 12:33:15 +0100

 NOTICE: my contact address has changed. Please use
 matthias.andree@gmx.net instead.
State-Changed-From-To: open->feedback 
State-Changed-By: tv 
State-Changed-When: Sun Nov 5 21:20:41 PST 2000 
State-Changed-Why:  
"ncr" has been replaced by "siop" in 1.5 and above.  Could you verify whether 
this problem exists on 1.5_BETA or the forthcoming 1.5 release? 

From: Matthias Andree <matthias.andree@stud.uni-dortmund.de>
To: gnats-bugs@netbsd.org
Cc:  
Subject: kern/6849
Date: Mon, 11 Dec 2000 13:07:43 +0100

 Yup. I have downloaded the NetBSD 1.5 ISO and booted it, problem
 persists. I haven't copied all of the lines, the core of the problem is
 here (I cannot currently copy via serial console, so just paper &
 pencil):

 siop0: target 0 using 16 bit transfers
 siop0: target 0 now synchronous at 20.0 MHz, offset 15
 siop0: unexpected phase mismatch 6
 sd0(siop0:0:0): parity error
 siop0: scsi bus reset.

 NOTE that the very same hardware is fine with Linux 2.2, it reads the
 NVRAM and thus gets to know that the adaptor only has 8-bit wide
 connectors and never dares 16 bit transfers.

 -- 
 Matthias Andree
State-Changed-From-To: feedback->open 
State-Changed-By: tv 
State-Changed-When: Fri Jan 12 14:32:42 PST 2001 
State-Changed-Why:  
problem persists. 
Responsible-Changed-From-To: kern-bug-people->bouyer 
Responsible-Changed-By: fair 
Responsible-Changed-When: Wed Jan 16 01:47:59 PST 2002 
Responsible-Changed-Why:  
Manuel wrote the siop(4) driver, which has replaced ncr(4). 
State-Changed-From-To: open->feedback 
State-Changed-By: tls 
State-Changed-When: Wed Mar 31 22:31:15 UTC 2004 
State-Changed-Why:  
I am highly inclined to consider this adapter -- which uses a *wide* 
scsi HBA chip, but provides only a *narrow* connector, as broken 
hardware, particularly when used in combination with a wide device 
via a wide<->narrow adapter cable.  Okay, we could decode the adapter 
NVRAM and hack around the problem -- but must we do so, for every kind 
of broken adapter anyone ever builds?  I consider that proposition 
questionable at best. 

Perhaps we should provide flags on the scsi devices to indicate that 
they should be used in narrow mode only. 

From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@gnats.netbsd.org
Cc: matthias.andree@gmx.net, tls@netbsd.org
Subject: Re: kern/6849
Date: Thu, 1 Apr 2004 23:10:09 +0200

 On Wed, Mar 31, 2004 at 10:35:24PM -0000, tls@netbsd.org wrote:
 > Synopsis: NCR SCSI driver negotiates wide transfer on 53C875 narrow host and UWSCSI disk
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: tls
 > State-Changed-When: Wed Mar 31 22:31:15 UTC 2004
 > State-Changed-Why: 
 > I am highly inclined to consider this adapter -- which uses a *wide*
 > scsi HBA chip, but provides only a *narrow* connector, as broken
 > hardware, particularly when used in combination with a wide device
 > via a wide<->narrow adapter cable.  Okay, we could decode the adapter
 > NVRAM and hack around the problem -- but must we do so, for every kind
 > of broken adapter anyone ever builds?  I consider that proposition
 > questionable at best.
 > 
 > Perhaps we should provide flags on the scsi devices to indicate that
 > they should be used in narrow mode only.

 Yes, I have this on my todo list. I just didn't get to it yet.
 the scsipi layer could be smarter in handling this kind of errors too,
 and downgrade to narrow if to many partity errors occurs (or do a simple
 test at device probe time).

 -- 
 Manuel Bouyer <bouyer@antioche.eu.org>
      NetBSD: 26 ans d'experience feront toujours la difference
 --
State-Changed-From-To: feedback->analyzed 
State-Changed-By: fair 
State-Changed-When: Tue Apr 27 05:15:23 UTC 2004 
State-Changed-Why:  

Manuel is still working on this. 

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.