From tege@matematik.su.se  Tue Jun 16 02:56:18 1998
Received: from insanus.matematik.su.se (root@insanus.matematik.su.se [130.237.198.12])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA06520
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 16 Jun 1998 02:56:15 -0700 (PDT)
          (envelope-from tege@matematik.su.se)
Received: from tiger.matematik.su.se (root@tiger.matematik.su.se [130.237.198.18]) by insanus.matematik.su.se (8.8.8/8.6.9) with ESMTP id LAA05962 for <FreeBSD-gnats-submit@freebsd.org>; Tue, 16 Jun 1998 11:56:09 +0200 (MET DST)
Received: from tiger.matematik.su.se (tege@localhost [127.0.0.1]) by tiger.matematik.su.se (8.8.8/8.6.9) with ESMTP id LAA00326 for <FreeBSD-gnats-submit@freebsd.org>; Tue, 16 Jun 1998 11:56:08 +0200
Message-Id: <199806160956.LAA00326@tiger.matematik.su.se>
Date: Tue, 16 Jun 1998 11:56:08 +0200
From: Torbjorn Granlund <tege@matematik.su.se>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Problems with cam-980520 code in FreeBSD-stable
X-Send-Pr-Version: 3.2

>Number:         6964
>Category:       kern
>Synopsis:       Problems with cam-980520 code in FreeBSD-stable
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    gibbs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 16 03:00:01 PDT 1998
>Closed-Date:    Mon Sep 21 14:00:18 PDT 1998
>Last-Modified:  Mon Sep 21 14:01:48 PDT 1998
>Originator:     Torbjorn Granlund
>Release:        FreeBSD-stable i386
>Organization:
TMG Datakonsult
>Environment:

        motherboard:    ASUS P2B-S
        cpu:            Intel Pentium II 400MHz
        memory:         64MB PC66 SDRAM w/o ECC (1x64MB Hyundai)
        disk:           9.1GB U2W Seagate Cheetah9LP scsiid=0
        disk:           9.1GB U2W Seagate Cheetah9LP scsiid=1
        disk:           2.16GB Ultra IBM DCAS scsiid=6
        scsi:           AIC7890 on motherboard
        scsi:           NCR810 (ASUS SC200)
        video:          S3 Trio64
        network:        Intel Etherexpress Pro 100B, 10.0.100.9

The NCR controller is scanned by the BIOS before the 7890 controller, and
with previous versions of FreeBSD, it is used for booting.

I used FreeBSD-stable updated a few hours before I sent out this PR.
(Yes, I should perhaps have used FreeBSD-stable from 980520.)

>Description:

There are two problems.

1) The root device is not located.  That might have to do with problems with
   the NCR controller (see screen dump from boot below).  But note that the
   drive is found, so talking to the NCR is clearly possible.
2) The negotiated speed for the U2W disks isn't as great as I had expected.
   6.600MB/s should be 80MB/s.  When probing for the devices using the BIOS,
   the drives are identified as 80MB/s capable.  (There are no SE devices
   on the bus, just LVD devices.)

Here is what is written on the screen.  There were several more COMMAND FAILED
lines before the ones visible here, but their exact contents is unknown since
they scrolled off the top of the screen.

  .
  .
  .
(probe17:ncr0:0:1:0): COMMAND FAILED (6 ff) @f07ea200
(probe16:ncr0:0:1:0): COMMAND FAILED (6 ff) @f07ea800
(probe15:ncr0:0:0:0): COMMAND FAILED (6 ff) @f07eae00
changing root device to da0s1a
da0 at ahc0 bus 0 target 0 lun 0
da0: <SEAGATE ST39102LW 0004> Fixed Direct Access SCSI2 device
da0: Serial Number [omitted]
da0: 6.600MS/s transfers , 16bit), Tagged Queueing Enabled  [see remark below]
da0: 8683MB (17783240 512 byte sectors: 64H 32S/T 8683C)
da1 at ahc0 bus 0 target 1 lun 0
da1: <SEAGATE ST39102LW 0004> Fixed Direct Access SCSI2 device
da1: Serial Number [omitted]
da1: 6.600MS/s transfers , 16bit), Tagged Queueing Enabled  [see remark below]
da1: 8683MB (17783240 512 byte sectors: 64H 32S/T 8683C)
panic: cannot mount root
synching disks... done
da2 at ncr0 bus 0 target 6 lun 0
da2: <IBM DCAS-32160 S65A> Fixed Direct Access SCSI2 device
da2: Serial Number [omitted]
da2: 2063MB (4226725 512 byte sectors: 255H 63S/T 263C)
Automatic reboot in 15 seconds [etc]

[Remark: This line looks strange.  Perhaps I missed a few characters, but I
know the comma had spaces on both sides which looked strange.  I have now
modified the system and cannot retry this easily.]

At this point, I tried moving the IBM disk to the Adaptec controller,
renumbering the disks so that the IBM disk got scsiid 0, and the other disks
got scsiid 1 and 2.  Now the system boots properly into single-user mode.
But the negotiated speeds are not correct, but they did change somewhat.
Note that the Adaptec doesn't want to talk in 10MB/s with the IBM disk.

da0 at ahc0 bus 0 target 0 lun 0
da0: <IBM DCAS-32160 S65A> Fixed Direct Access SCSI2 device
da0: Serial Number [omitted]
da0: 8.64MS/s transfers (8.64MHz, offset 15), Tagged Queueing Enabled
da0: 2063MB (4226725 512 byte sectors: 255H 63S/T 263C)
da1 at ahc0 bus 0 target 1 lun 0
da1: <SEAGATE ST39102LW 0004> Fixed Direct Access SCSI2 device
da1: Serial Number [omitted]
da1: 16.128MS/s transfers (8.64MHz, offset 15, 16bit), Tagged Queueing Enabled
da1: 8683MB (17783240 512 byte sectors: 64H 32S/T 8683C)
da2 at ncr0 bus 0 target 2 lun 0
da2: <SEAGATE ST39102LW 0004> Fixed Direct Access SCSI2 device
da2: Serial Number [omitted]
da2: 16.128MS/s transfers (8.64MHz, offset 15, 16bit), Tagged Queueing Enabled
da2: 8683MB (17783240 512 byte sectors: 64H 32S/T 8683C)

The kernel config file is a cleaned-up GENERIC form the CAM distribution; I
deleted everything that isn't needed.

>How-To-Repeat:

Build an identical system and try to boot it into single-user mode...

>Fix:
	
Eagerly waiting for one.  :-)
>Release-Note:
>Audit-Trail:

From: Stefan Esser <se@FreeBSD.ORG>
To: Torbjorn Granlund <tege@matematik.su.se>, FreeBSD-gnats-submit@freebsd.org
Cc: Stefan Esser <se@freebsd.org>
Subject: Re: kern/6964: Problems with cam-980520 code in FreeBSD-stable
Date: Fri, 19 Jun 1998 00:04:30 +0200

 On 1998-06-16 11:56 +0200, Torbjorn Granlund <tege@matematik.su.se> wrote:
 > 
 >         motherboard:    ASUS P2B-S
 >         cpu:            Intel Pentium II 400MHz
 >         memory:         64MB PC66 SDRAM w/o ECC (1x64MB Hyundai)
 >         disk:           9.1GB U2W Seagate Cheetah9LP scsiid=0
 >         disk:           9.1GB U2W Seagate Cheetah9LP scsiid=1
 >         disk:           2.16GB Ultra IBM DCAS scsiid=6
 >         scsi:           AIC7890 on motherboard
 >         scsi:           NCR810 (ASUS SC200)
 >         video:          S3 Trio64
 >         network:        Intel Etherexpress Pro 100B, 10.0.100.9
 > 
 > The NCR controller is scanned by the BIOS before the 7890 controller, and
 > with previous versions of FreeBSD, it is used for booting.
 
 Your probe messages indicate, that now a drive
 that is connected to the Adaptec is attached as
 da0 and will become the root device (unless you
 specified a different root device in your kernel
 config file).
 
 > There are two problems.
 > 
 > 1) The root device is not located.  That might have to do with problems with
 >    the NCR controller (see screen dump from boot below).  But note that the
 >    drive is found, so talking to the NCR is clearly possible.
 
 Its found only *after* the kernel tried to mount
 da0a as the root partition ...
 
 > (probe17:ncr0:0:1:0): COMMAND FAILED (6 ff) @f07ea200
 > (probe16:ncr0:0:1:0): COMMAND FAILED (6 ff) @f07ea800
 > (probe15:ncr0:0:0:0): COMMAND FAILED (6 ff) @f07eae00
 
 There should have been more specific error messages
 before these lines. The error code "6" indicates a 
 SCSI bus reset occured. But there is not enough 
 information available to understand what's causing 
 this ...
 
 > changing root device to da0s1a
 > da0 at ahc0 bus 0 target 0 lun 0
 > da0: <SEAGATE ST39102LW 0004> Fixed Direct Access SCSI2 device
 > da0: Serial Number [omitted]
 > da0: 6.600MS/s transfers , 16bit), Tagged Queueing Enabled  [see remark below]
 > da0: 8683MB (17783240 512 byte sectors: 64H 32S/T 8683C)
 > da1 at ahc0 bus 0 target 1 lun 0
 > da1: <SEAGATE ST39102LW 0004> Fixed Direct Access SCSI2 device
 > da1: Serial Number [omitted]
 > da1: 6.600MS/s transfers , 16bit), Tagged Queueing Enabled  [see remark below]
 > da1: 8683MB (17783240 512 byte sectors: 64H 32S/T 8683C)
 > panic: cannot mount root
 > synching disks... done
 > da2 at ncr0 bus 0 target 6 lun 0
 > da2: <IBM DCAS-32160 S65A> Fixed Direct Access SCSI2 device
 > da2: Serial Number [omitted]
 > da2: 2063MB (4226725 512 byte sectors: 255H 63S/T 263C)
 
 Seems that probing the SCSI bus connected to the
 NCR chip took a very long time and only found the
 one drive on it after the kernel tried to mount 
 the root partition.
 
 > Automatic reboot in 15 seconds [etc]
 
 I do not understand why the probe order changed
 between pre-CAM and CAM.
 
 My test system got -current with unmodified CAM
 and a slightly modified CAM version of the NCR 
 driver. I've got a 810 and a 875 card in that 
 system, and there is no change in probe order
 or resulting drive numbers between pre-CAM and
 CAM kernels.
 
 Did you change anything else (i.e. did the 
 system ever run with the old SCSI code) ?
 
 Regards, STefan

From: Torbjorn Granlund <tege@matematik.su.se>
To: Stefan Esser <se@freebsd.org>
Cc:  Subject: Re: kern/6964: Problems with cam-980520 code in FreeBSD-stable 
Date: Tue, 23 Jun 1998 19:20:19 +0200

   > (probe17:ncr0:0:1:0): COMMAND FAILED (6 ff) @f07ea200
   > (probe16:ncr0:0:1:0): COMMAND FAILED (6 ff) @f07ea800
   > (probe15:ncr0:0:0:0): COMMAND FAILED (6 ff) @f07eae00
 
   There should have been more specific error messages
   before these lines. The error code "6" indicates a 
   SCSI bus reset occured. But there is not enough 
   information available to understand what's causing 
   this ...
 
 There are no error messages before thos messages, except for a few lines
 that are very similar to those lines.
 
   Seems that probing the SCSI bus connected to the
   NCR chip took a very long time and only found the
   one drive on it after the kernel tried to mount 
   the root partition.
 
 Perhaps.  Note the NCR contrller works fine with plain 2.2.6.
 
   Did you change anything else (i.e. did the 
   system ever run with the old SCSI code) ?
 
 Yes.  But then only the NCR controller were used, sine this new Adaptec
 controller isn't supported with the old SCSI code.
 
 Torbjorn

From: Torbjorn Granlund <tege@matematik.su.se>
To: FreeBSD-gnats-submit@freebsd.org
Cc:  Subject: Re: kern/6964: Problems with cam-980520 code in FreeBSD-stable 
Date: Thu, 27 Aug 1998 23:20:54 +0200

 This PR may be closed, since the problems are fixed in the current cam for
 FreeBSD-stable.
 
 It would have been cool to hear from the cam developers-- it appears strange
 to me that you ask for feedback and then ignore the feedback.  :-P
 
 Torbjorn
State-Changed-From-To: open->closed 
State-Changed-By: ken 
State-Changed-When: Mon Sep 21 14:00:18 PDT 1998 
State-Changed-Why:  
The PR originator reported that the problem is fixed. 


Responsible-Changed-From-To: freebsd-bugs->gibbs 
Responsible-Changed-By: ken 
Responsible-Changed-When: Mon Sep 21 14:00:18 PDT 1998 
Responsible-Changed-Why:  
Justin Gibbs did the CAM port of the NCR driver. 
>Unformatted:
