From root@ghost.sc.ru  Thu Nov  9 22:33:16 2000
Return-Path: <root@ghost.sc.ru>
Received: from ghost.sc.ru (Dialup13.sc.ru [195.151.76.252])
	by hub.freebsd.org (Postfix) with ESMTP id DE68637B479
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  9 Nov 2000 22:32:59 -0800 (PST)
Received: (from root@localhost)
	by ghost.sc.ru (8.11.1/8.9.3) id eAA6WJN28592;
	Fri, 10 Nov 2000 09:32:19 +0300 (MSK)
	(envelope-from root)
Message-Id: <200011100632.eAA6WJN28592@ghost.sc.ru>
Date: Fri, 10 Nov 2000 09:32:19 +0300 (MSK)
From: kng@sc.ru
Sender: root@ghost.sc.ru
Reply-To: kng@sc.ru
To: FreeBSD-gnats-submit@freebsd.org
Subject: RELENG_4 aic SCSI driver hangs up during disk detection on AVA-1505
X-Send-Pr-Version: 3.2

>Number:         22733
>Category:       kern
>Synopsis:       RELENG_4 aic SCSI driver hangs up during disk detection on AVA-1505
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    ken
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 09 22:40:01 PST 2000
>Closed-Date:    Sat Mar 17 16:18:59 PST 2001
>Last-Modified:  Sat Oct  5 12:30:03 PDT 2002
>Originator:     Konstantin Gusenko
>Release:        FreeBSD 4.1.1-STABLE i386
>Organization:
Promsvyaz JSC
>Environment:
	
	FreeBSD-4.1.1-STABLE (20001013) and 4.2-BETA (20001105)

	Pentium-II 450, 
	Asus P2-99 MB, 
	128Mb SDRAM PC-133, 
	IDE 15Gb Quantum UDMA-33 HDD, 
	IDE 10Gb WD UDMA-33 HDD, 
	Matsushita 24x ATAPI CDROM,
	Adaptec AVA1505 SCSI Adapter (6360 based, no EPROM), 
	Iomega ZIP-100 SCSI,
	AMD chipset based 10/100 PCI Ethernet NIC (lnc0), 
	ASUS V3400 AGP Video Card,
	Yamaha YMF-724F PCI Sound card

	

>Description:

	I've cvsupped my system first to 4.1.1-STABLE (20001013) from
4.1-STABLE (20000804) and to 4.2-BETA (20001108), have maked
buildworld-installworld-buildkernel-installkernel.

	During startup aic0 is succesfully detected, but during SCSI disk
detect phase kernel stops forever and if I'll try this moment to enter
something on keyboard, keyboard freezes.

	If I'd disable aic0 in kernel config file or in boot -c editor,
system starts OK and works. Without aic0.

	On the same box Windows98 works with this SCSI card without any
problem, and SCSI card (and all other cards) configuration is the same.

	Adaptec AVA1505 hardware is configured at port 0x340, irq 11. In
BIOS option "IRQ11 is used by ISA device" is checked.

	Before upgrade I've used 4.1-STABLE (20000804) with the same kernel
config and driver aic without any problem.

	Current kernel config (SCSI dependant portion):

device		aic0	at isa? irq 11 port 0x340

device		scbus			#base SCSI code
device		da			#SCSI direct access devices (aka disks)
device		cd			#SCSI CD-ROMs
device		pass			#CAM passthrough driver
device		pt			#SCSI processor type

	

>How-To-Repeat:

	Take AVA-1505, put it in the box, make cvsup and upgrade
system/kernel, try to boot.

	

>Fix:
	
	Unknown.


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: jedgar 
Responsible-Changed-When: Sat Nov 11 09:42:55 PST 2000 
Responsible-Changed-Why:  
Misfiled PR 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22733 

From: DiethelmW@t-online.de (Diethelm =?iso-8859-1?Q?Wildf=F6rster?=)
To: freebsd-gnats-submit@FreeBSD.org, kng@sc.ru
Cc:  
Subject: Re: kern/22733: RELENG_4 aic SCSI driver hangs up during disk detection 
 on AVA-1505
Date: Sat, 03 Mar 2001 19:03:51 +0000

 --------------F0C41593FD934743ADA1930F
 Content-Type: text/plain; charset=iso-8859-1
 Content-Transfer-Encoding: 8bit
 
 I can give a hint to the problem.
 The bug seems to hide in the file  src/sys/cam/cam_xpt.c .
 Replacing this file by an older version , created by the command
                         cvs co -r 1.80.2.6  src/sys/cam/cam_xpt.c ,
 and compiling a new kernel  may serve as a provisional fix .
 Version 1.80.2.7 of the file mentioned above is faulty .
 I have a strong guess what  the fault is , but the author of  the
 changes
 made (responsible  gibbs@FreeBSD.org)  should find more competent
 answers than I can do.
 
 ..--
 Diethelm Wildfrster
 
 
 
 
 
 
 
 --------------F0C41593FD934743ADA1930F
 Content-Type: text/html; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
 <html>
 I can give a hint to the problem.
 <br>The bug seems to hide in the file&nbsp; src/sys/cam/cam_xpt.c .
 <br>Replacing this file by an older version , created by the command
 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 cvs co -r 1.80.2.6&nbsp; src/sys/cam/cam_xpt.c ,
 <br>and compiling a new kernel&nbsp; may serve as a provisional fix .
 <br>Version 1.80.2.7 of the file mentioned above is faulty .
 <br>I have a strong guess what&nbsp; the fault is , but the author of&nbsp;
 the changes
 <br>made (responsible&nbsp; gibbs@FreeBSD.org)&nbsp; should find more competent
 <br>answers than I can do.
 <pre>..--&nbsp;
 Diethelm Wildf&ouml;rster
 <DiethelmW@t-online.de></pre>
 &nbsp;
 <p>&nbsp;
 <br>&nbsp;
 <br>&nbsp;</html>
 
 --------------F0C41593FD934743ADA1930F--
 

From: "Kenneth D. Merry" <ken@kdm.org>
To: =?iso-8859-1?Q?Diethelm_Wildf=F6rster?= <DiethelmW@t-online.de>
Cc: freebsd-gnats-submit@FreeBSD.org, kng@sc.ru
Subject: Re: kern/22733: RELENG_4 aic SCSI driver hangs up during disk detection on AVA-1505
Date: Tue, 13 Mar 2001 15:40:18 -0700

 --n8g4imXOkfNTN/H1
 Content-Type: text/plain; charset=iso-8859-1
 Content-Disposition: inline
 Content-Transfer-Encoding: 8bit
 
 On Sat, Mar 03, 2001 at 10:10:45 -0800, Diethelm Wildfrster wrote:
 > The following reply was made to PR kern/22733; it has been noted by GNATS.
 > 
 > From: DiethelmW@t-online.de (Diethelm =?iso-8859-1?Q?Wildf=F6rster?=)
 > To: freebsd-gnats-submit@FreeBSD.org, kng@sc.ru
 > Cc:  
 > Subject: Re: kern/22733: RELENG_4 aic SCSI driver hangs up during disk detection 
 >  on AVA-1505
 > Date: Sat, 03 Mar 2001 19:03:51 +0000
 > 
 >  --------------F0C41593FD934743ADA1930F
 >  Content-Type: text/plain; charset=iso-8859-1
 >  Content-Transfer-Encoding: 8bit
 >  
 >  I can give a hint to the problem.
 >  The bug seems to hide in the file  src/sys/cam/cam_xpt.c .
 >  Replacing this file by an older version , created by the command
 >                          cvs co -r 1.80.2.6  src/sys/cam/cam_xpt.c ,
 >  and compiling a new kernel  may serve as a provisional fix .
 >  Version 1.80.2.7 of the file mentioned above is faulty .
 >  I have a strong guess what  the fault is , but the author of  the
 >  changes
 >  made (responsible  gibbs@FreeBSD.org)  should find more competent
 >  answers than I can do.
 >  
 >  ..--
 >  Diethelm Wildfrster
 
 I think the attached patch will fix the problem.
 
 Please let me know whether it works for you two.
 
 Ken
 -- 
 Kenneth Merry
 ken@kdm.org
 
 --n8g4imXOkfNTN/H1
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="cam_xpt.c.period.20010313.stable"
 
 ==== //depot/FreeBSD-ken-RELENG_4/src/sys/cam/cam_xpt.c#3 - /c/ken/perforce6/FreeBSD-ken-RELENG_4/src/sys/cam/cam_xpt.c ====
 *** /tmp/tmp.90465.0	Tue Mar 13 15:38:01 2001
 --- /c/ken/perforce6/FreeBSD-ken-RELENG_4/src/sys/cam/cam_xpt.c	Tue Mar 13 15:37:41 2001
 ***************
 *** 5793,5814 ****
   			cts->flags &= ~CCB_TRANS_TAG_ENB;
   			cts->flags |= cur_cts.flags & CCB_TRANS_TAG_ENB;
   		}
   		if (((device->flags & CAM_DEV_INQUIRY_DATA_VALID) != 0
   		  && (inq_data->flags & SID_Sync) == 0)
 ! 		 || (cpi.hba_inquiry & PI_SDTR_ABLE) == 0) {
   			/* Force async */
   			cts->sync_period = 0;
   			cts->sync_offset = 0;
 ! 		}
 ! 
 ! 		/*
 ! 		 * Don't allow DT transmission rates if the
 ! 		 * device does not support it.
 ! 		 */
 ! 		if ((device->flags & CAM_DEV_INQUIRY_DATA_VALID) != 0
 ! 		 && (inq_data->spi3data & SID_SPI_CLOCK_DT) == 0
 ! 		 && cts->sync_period <= 0x9)
   			cts->sync_period = 0xa;
   
   		switch (cts->bus_width) {
   		case MSG_EXT_WDTR_BUS_32_BIT:
 --- 5793,5816 ----
   			cts->flags &= ~CCB_TRANS_TAG_ENB;
   			cts->flags |= cur_cts.flags & CCB_TRANS_TAG_ENB;
   		}
 + 
   		if (((device->flags & CAM_DEV_INQUIRY_DATA_VALID) != 0
   		  && (inq_data->flags & SID_Sync) == 0)
 ! 		 || ((cpi.hba_inquiry & PI_SDTR_ABLE) == 0)
 ! 		 || (cts->sync_offset == 0)
 ! 		 || (cts->sync_period == 0)) {
   			/* Force async */
   			cts->sync_period = 0;
   			cts->sync_offset = 0;
 ! 		} else if ((device->flags & CAM_DEV_INQUIRY_DATA_VALID) != 0
 ! 			&& (inq_data->spi3data & SID_SPI_CLOCK_DT) == 0
 ! 			&& cts->sync_period <= 0x9) {
 ! 			/*
 ! 			 * Don't allow DT transmission rates if the
 ! 			 * device does not support it.
 ! 			 */
   			cts->sync_period = 0xa;
 + 		}
   
   		switch (cts->bus_width) {
   		case MSG_EXT_WDTR_BUS_32_BIT:
 
 --n8g4imXOkfNTN/H1--
State-Changed-From-To: open->feedback 
State-Changed-By: ken 
State-Changed-When: Tue Mar 13 15:29:31 PST 2001 
State-Changed-Why:  
I sent a potential fix, let's see if this works for the submitter and 
Diethelm. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22733 
State-Changed-From-To: feedback->closed 
State-Changed-By: ken 
State-Changed-When: Sat Mar 17 16:18:59 PST 2001 
State-Changed-Why:  
Should be fixed as of rev 1.108 of cam_xpt in -current and rev 1.80.2.12 
of cam_xpt.c in RELENG_4. 


Responsible-Changed-From-To: freebsd-bugs->ken 
Responsible-Changed-By: ken 
Responsible-Changed-When: Sat Mar 17 16:18:59 PST 2001 
Responsible-Changed-Why:  
I fixed it and I'm closing it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22733 

From: "Michael V. Sokolov" <sokolov@sigma-soft.spb.su>
To: bug-followup@freebsd.org
Cc:  
Subject: kern/22733
Date: Sat, 5 Oct 2002 23:29:46 +0400

 Dear Sirs, i have a problem, that is very similar to Konstantin
 Gusenko:
 During startup aic0 is succesfully detected, but when
 "waiting 15 seconds for SCSI Devices to settle" message appears,
 nothig happens then and system freeze.
 
 If I'd disable aic0 in kernel config file or in boot -c editor,
 system starts OK and works. Without aic0.
 
 On the same box Windows98 works with this SCSI card without any
 problem, and SCSI card (and all other cards) configuration is the same.
 
 Environment
 
 FreeBSD-4.6-RELEASE
 
 AMD K6-2 300,
 Lucky Star VIAMVP3,
 64Mb SDRAM PC-100,
 IDE WDC AC2420F HDD,
 Adaptec AVA1505 SCSI Adapter (6360 based, no EPROM),
 SMC8216/SMC8216C (16 bit) NET ed0,
 S3Virge 2mb,
 
 -- 
 Best regards,
  Michael                          mailto:sokolov@sigma-soft.spb.su
 
 
 
 
>Unformatted:
