From bryan@fsel.com  Mon May 12 03:45:28 1997
Received: from punt-2.mail.demon.net (punt-1b.mail.demon.net [194.217.242.133])
          by hub.freebsd.org (8.8.5/8.8.5) with SMTP id DAA11376
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 May 1997 03:45:26 -0700 (PDT)
Received: from formal.demon.co.uk ([158.152.23.172]) by punt-2.mail.demon.net
           id ab1001797; 12 May 97 11:41 BST
Received: from metis.fsel.com (metis.fsel.com [192.9.200.103]) by deimos.fsel.com (8.6.5/8.6.5) with ESMTP id LAA19658 for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 May 1997 11:38:02 +0100
Received: (from bryan@localhost) by metis.fsel.com (8.8.3/8.6.12) id LAA22984; Mon, 12 May 1997 11:38:01 +0100 (BST)
Message-Id: <199705121038.LAA22984@metis.fsel.com>
Date: Mon, 12 May 1997 11:38:01 +0100 (BST)
From: bryan@fsel.com
Reply-To: bryan@fsel.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: Bad LUN probes on Xyratex MCD540 drive
X-Send-Pr-Version: 3.2

>Number:         3580
>Category:       kern
>Synopsis:       2.2.1 probes invalid LUNs on Xyratex MCD540 drive
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 12 03:50:01 PDT 1997
>Closed-Date:    Wed May 21 21:36:11 MEST 1997
>Last-Modified:  Wed May 21 21:36:46 MEST 1997
>Originator:     Bryan Scattergood
>Release:        FreeBSD 2.2.1
>Organization:
Formal Systems (Europe) Ltd
>Environment:

  Cyrix P120+ on an AI5TH (HX,PCI) motherboard
  Adaptec 1542CF driving
    0 730M Quantum Lightning 730S
    2 Goldstar CDROM (GCD-R320)
    4 Xyratex MCD 540I
      (540M removable drive related to the 270M Syquests)
    6 WangDAT Model 1300

>Description:

  During boot

    ...
    aha0 at 0x330-0x333 irq 11 drq 5 on isa
    aha0 waiting for scsi devices to settle
    (aha0:0:0): "QUANTUM LIGHTING 730S 241E" type 0 fixed SCSI 2
    sd0(aha0:0:0): Direct-Access 699MB (1431760 512 byte sectors)
    (aha0:2:0): "GOLDSTAR  CD-ROM GCD-R320  1.0" type 5 removable SCSI 2
    cd0(aha0:2:0): CD-ROM cd present [400000 x 2048 byte records]
    (aha0:4:0): "Xyratex MCD 540I 5.30" type 0 removable SCSI 2
    sd1(aha0:4:0): Direct-Access 515MB (1055416 512 byte sectors)
    (aha0:4:1): "Xyratex MCD 540I 5.30" type 0 removable SCSI 2
    sd2(aha0:4:1): Direct-Access 515MB (1055416 512 byte sectors)
    sd2(aha0:4:1): timed out
  
    sd2(aha0:4:1): timed out
    adapter not taking commands.. frozen?!
     AGAIN
    sd2 could not mode sense (4). Using fictitious geometry
    aha0: MBO 02 and bot 00 (free)
    ...

  and then another half-hour or so while the driver times out on the 
  other 4:2 through 4:7, then on 5:0 and 6:0.  The WangDAT isn't 
  recognised.  It then can't find the CD-ROM drive, presumably since the 
  SCSI controller is jammed.  

>How-To-Repeat:

  Boot with the Xyratex in the SCSI bus under 2.2.1.

>Fix:
	
  Problem caused by the new SCSI configuration scheme in scsiconf.c
  (system worked fine under 2.1.6, although the Xyratex behaviour is
  obviously broken).  The Xyratex reports as a T_DIRECT and T_REMOV
  device and so gets mapped to the unknowndev entry which defines
  SC_MORE_LUS.  Under 2.1.6 it mapped to the generic "sd" entry in
  the knowndevs table which defines SC_ONE_LU.

  Successfully worked round the problem by adding a 

    { T_DIRECT, T_DIRECT, T_REMOV, "*", "*", "*", "sd", SC_ONE_LU }

  entry in the knowndev table.  More brutal alternative might be to
  change unknowndev to SC_ONE_LU.  More subtle might be to add a an
  entry specfific the MCD540.


>Release-Note:
>Audit-Trail:

From: j@uriah.heep.sax.de (J Wunsch)
To: bryan@fsel.com
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: kern/3580: Bad LUN probes on Xyratex MCD540 drive
Date: Wed, 14 May 1997 12:34:25 +0200

 As bryan@fsel.com wrote:
 
 >     (aha0:4:0): "Xyratex MCD 540I 5.30" type 0 removable SCSI 2
 >     sd1(aha0:4:0): Direct-Access 515MB (1055416 512 byte sectors)
 >     (aha0:4:1): "Xyratex MCD 540I 5.30" type 0 removable SCSI 2
 >     sd2(aha0:4:1): Direct-Access 515MB (1055416 512 byte sectors)
 >     sd2(aha0:4:1): timed out
 
 Sigh.  I wonder when the drive vendors will start to adhere to
 standards.
 
 >   Successfully worked round the problem by adding a 
 > 
 >     { T_DIRECT, T_DIRECT, T_REMOV, "*", "*", "*", "sd", SC_ONE_LU }
 > 
 >   entry in the knowndev table.
 
 The existing entry should probably also cover the T_REMOV case, but
 doesn't.  (It would require to have a T_ANY value for the fixed/
 removable field...)
 
 >    More subtle might be to add a an
 >   entry specfific the MCD540.
 
 Index: scsi/scsiconf.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/scsi/scsiconf.c,v
 retrieving revision 1.85
 diff -u -u -r1.85 scsiconf.c
 --- scsiconf.c	1997/05/03 22:23:13	1.85
 +++ scsiconf.c	1997/05/14 10:31:18
 @@ -273,6 +273,10 @@
  		T_DIRECT, T_DIRECT, T_FIXED, "EMULEX", "MD21*" , "*",
  		"sd", SC_MORE_LUS
  	},
 +	{
 +		T_DIRECT, T_DIRECT, T_REMOV, "Xyratex", "MCD 540I", "*",
 +		"sd", SC_ONE_LU
 +	},
  #endif	/* NSD */
  #if NST > 0
  	{
 
 I'm not sure which is better, probably it's better to add the generic
 stop-gap entry.
 
 -- 
 cheers, J"org
 
 joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
 Never trust an operating system you don't have sources for. ;-)
State-Changed-From-To: open->closed 
State-Changed-By: joerg 
State-Changed-When: Wed May 21 21:36:11 MEST 1997 
State-Changed-Why:  
Added a catch-all record for removable SCSI devices in rev 1.87 
of scsiconf.c. 
>Unformatted:
