From owner-aic7xxx@FreeBSD.ORG Thu Aug 28 12:49:20 2003 Return-Path: Delivered-To: aic7xxx@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D56316A4BF; Thu, 28 Aug 2003 12:49:20 -0700 (PDT) Received: from magic.adaptec.com (magic-mail.adaptec.com [216.52.22.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 999FF43FE0; Thu, 28 Aug 2003 12:49:19 -0700 (PDT) (envelope-from gibbs@scsiguy.com) Received: from redfish.adaptec.com (redfish.adaptec.com [162.62.50.11]) by magic.adaptec.com (8.11.6/8.11.6) with ESMTP id h7SJnJo27663; Thu, 28 Aug 2003 12:49:19 -0700 Received: from [10.100.253.70] (aslan.btc.adaptec.com [10.100.253.70]) by redfish.adaptec.com (8.8.8p2+Sun/8.8.8) with ESMTP id MAA11323; Thu, 28 Aug 2003 12:49:18 -0700 (PDT) Date: Thu, 28 Aug 2003 13:51:03 -0600 From: "Justin T. Gibbs" To: Don Bowman , "'freebsd-scsi@freebsd.org'" , "'aic7xxx@freebsd.org'" Message-ID: <1509578112.1062100263@aslan.btc.adaptec.com> In-Reply-To: References: X-Mailer: Mulberry/3.1.0b5 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: Infinite interrupt loop, INTSTAT = 0 in ahd driver? X-BeenThere: aic7xxx@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Justin T. Gibbs" List-Id: Adaptec Device Drivers in FreeBSD and Linux List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2003 19:49:20 -0000 > In aic79xx.c, in ahd_pause_and_flushwork() there > is a heuristic to prevent looping more than 1000 times. > If this happens a message like > "Infinite interrupt loop, INTSTAT = 0" is emitted. > > I am hitting this case. > System has a aic7902. If i set the clock to 20MHz, > disable wide negotiation, disable packetisation and > qas, the system will come up. There appears to > be no trouble for the bios to access the drive, it > is only the driver that hits this case. The BIOS does not operate in packetized mode. It also only sends one trasaction at a time. This roughly equivalent to the behavior you've setup for the driver with your settings in SCSI-Select. The ahd_pause_and_flushwork() routine is only called from timeouts. While there may be a bug in this routine, it is not the root cause of your failure. What drives are you using? Is the controller operating in PCI or PCI-X mode? Are there any other busmasters on the same PCI(-X) segment? What chipset is on your MB (include revision numbers if your system is using the P64H2 PCI-X hub)? You might avoid the loop problem with this change: do { struct scb *waiting_scb; + /* + * Give the sequencer some time to service + * any active selections. + */ ahd_unpause(ahd); + ahd_delay(200); + ahd_intr(ahd); ahd_pause(ahd); But you should continue to look into the root cause of your failure. -- Justin